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

Fix incorrect behaviour of up and down keys in diff view when opened from diff preview #835

Merged
merged 1 commit into from
May 28, 2018

Conversation

koutcher
Copy link
Collaborator

I believe issue #802 is the main reason why so many people ask about remapping up and down keys. If the current behaviour is actually a feature maybe a parameter can be introduced.

src/tig.c Outdated
@@ -235,7 +235,7 @@ view_driver(struct view *view, enum request request)

case REQ_NEXT:
case REQ_PREVIOUS:
if (view->parent) {
if (view == display[1]) {
int line;

view = view->parent;
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe view->parent && view == display [1] so this won't default.

@jonas
Copy link
Owner

jonas commented May 28, 2018

Contextually speaking, I guess this makes more sense. I don't personally use the fullscreen navigation, but I remember doing it that way be because it felt more consistent at the time.

@koutcher
Copy link
Collaborator Author

I personally switch to full screen only when a commit requires extra attention and I always end up using the the arrow keys to navigate as there is not the commit list to remind me that up and down keys are bound to this list.

I amended the PR to have view->parent && view == display [1].

@jonas
Copy link
Owner

jonas commented May 28, 2018

Thanks.

@jonas jonas merged commit 2272096 into jonas:master May 28, 2018
koutcher added a commit that referenced this pull request Dec 14, 2020
Rework #478 and #835. Keep special Up/Down keys behaviour when split
diff view is maximized with `O` but restore normal Up/Down keys
behaviour when switching to any view.

Closes #1053
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.

2 participants