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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home/End keys do not work in diff view #6295

Closed
jessetan opened this issue Nov 27, 2018 · 6 comments 路 Fixed by #8644
Closed

Home/End keys do not work in diff view #6295

jessetan opened this issue Nov 27, 2018 · 6 comments 路 Fixed by #8644
Labels
help wanted Issues marked as ideal for external contributors
Projects

Comments

@jessetan
Copy link
Contributor

jessetan commented Nov 27, 2018

Description

It can be convenient to jump to the end of a long list of changed files using the End key. It can also be convenient to jump to the end of a long diff by pressing the End key.

The first one works, the second doesn't 馃槩

Version

  • GitHub Desktop: 1.5.0
  • Operating system: macOS 10.13.6

Steps to Reproduce

  1. Open a repo and make changes to multiple files, so that the list does not fit in the window height
  2. Click a file name
  3. Press End and Home to jump to the bottom and top of the list
  4. Click on a file that has a large diff that does not fit in the window height
  5. Click on the diff to focus it
  6. Press End and Home to attempt to jump to the button and top of the diff
  7. Be slightly disappointed when nothing happens in 6.

Expected Behavior

The diff can be navigated using Home and End keys.

Actual Behavior

Diff window does not respond to Home and End keys (it does respond to PgUp and PgDn).
Changed files list only responds when the focused file is on screen. If it scrolls outside the visible area, keys no longer function.

@iAmWillShepherd
Copy link
Contributor

Thanks for creating this issue, @jessetan

This is likely because all the engineers (4 of us) use MacBook Pros for development. As far as I know, there is no Home or End keys on our keyboards. This could be 100% false, two of our engineers are not based in America, so maybe their keyboards have it 馃 .

In any case, I'm going to add the help wanted label to this for anyone in the community who is interested in tackling this.

@iAmWillShepherd iAmWillShepherd added the help wanted Issues marked as ideal for external contributors label Nov 27, 2018
@iAmWillShepherd iAmWillShepherd added this to Available in Community via automation Nov 27, 2018
@HZooly
Copy link

HZooly commented Nov 27, 2018

@iAmWillShepherd Aren't Cmd + Up/Down same than Home End key ? I'm not sure

@msftrncs
Copy link
Contributor

msftrncs commented Nov 27, 2018

@jessetan, CTRL-HOME and CTRL-END seem to work for me in the DIFF view. Both (CTRL or no CTRL) seem to work in the changed files list of a commit view. They only seem to work once while in the commit history list; in this case, the selection is removed from the item, the display moves accordingly and then nothing happens if you try HOME or END or CTRL-HOME or CTRL-END until another item is selected.

@jessetan
Copy link
Contributor Author

jessetan commented Nov 28, 2018

Cmd+Up and Cmd+Down also work for me in diff view, but the native Home and End keys don't.

I also see what @msftrncs is reporting in the Changes file list: only if the focused item is visible on the screen the Home and End keys work, otherwise they do nothing. I've updated the report to include this, although it might be a separate issue.

@tierninho
Copy link
Contributor

Looks like three parts of the History feature would benefit from this, as outlined in the pic.

screen shot 2018-11-28 at 11 06 27 am

Currently, Fn+Left/Right arrows kind of work on a Mac for Home & End, but it is far from perfect and functionality is inconsistent.

Ideally, cmd+up/down arrows seems like a better fit to be implement.

@AndreiMaga
Copy link
Contributor

AndreiMaga commented Nov 16, 2019

I wanna take a swing at this one.
So the expected behavior is :

  • Press Home => Jump to start of the diff
  • Press End => Jump to end of diff

Without messing with the current shortcuts.
As for the other history elements: Looks like sometimes home/end works (at least on windows), but only after you refocus.

@niik niik closed this as completed in #8644 Jul 9, 2020
Community automation moved this from Available to Done Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues marked as ideal for external contributors
Projects
Development

Successfully merging a pull request may close this issue.

7 participants
@iAmWillShepherd @jessetan @HZooly @tierninho @msftrncs @AndreiMaga and others