Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for move to parent in main view. #506

Closed
wants to merge 3 commits into from

Conversation

rdnetto
Copy link

@rdnetto rdnetto commented Jun 10, 2016

Fixed #388.

@@ -266,7 +266,11 @@ view_driver(struct view *view, enum request request)
break;

case REQ_PARENT:
report("Moving to parent is not supported by the %s view", view->name);
if (! strcmp(view->name, "main")) {
move_view(view, request);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to support REQ_PARENT should go in src/main.c which is all the main view specific code. There's a main_request method where the case REQ_PARENT and related move_view changes in this patch can exist.

@rdnetto rdnetto force-pushed the move-to-parent-in-main-view branch from f9e732e to 034d61f Compare June 17, 2016 07:35
@rdnetto
Copy link
Author

rdnetto commented Jun 17, 2016

I've moved the code into main_request(), and modified it to reuse an existing method instead of duplicating the scrolling logic.

I also added a special case for treating HEAD as the parent of Unstaged Changes.

Sorry about the delay - it's been a hectic week.

@jonas
Copy link
Owner

jonas commented Aug 4, 2016

Thanks, I ended up massaging the code a bit myself and also added a test and a NEWS entry.

@jonas jonas closed this Aug 4, 2016
@chenkaie
Copy link

That would be nicer if support 2 direction movement, a really intuitive musle memory when I doing the movement :)

  • , : move to parent
  • SHIFT + , : move to child

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants