You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When moving to source view full screen please allow left arrow to go back #1729
Is your feature request related to a problem? Please describe.
In "Status [1]" tab, you can navigate right to the source code with right arrow. But then you have to hit escape to navigate back left.
Describe the solution you'd like
Please make left arrow navigate left.
Describe alternatives you've considered
Escape.
Additional context
now I click "right arrow"
Now I can't go back left with left arrow. Only with Escape I can go back.
Thank you for gitui it is amazing.
Reacted by ShrykeWindgrace, raphCode, Fabian Neumann, Variant9, matteo, Sam Birch, ryo., Daniel Hooper, Anthony Cleaver, Tony Narlock and 5 more
I recently updated to v0.23 and this feels very frustrating to me. I'll try to take up this issue later today and temporarily roll back to v0.22.x on my machine until a new release is made.
I am also not a fan of the current solution but the big UX fail that comes with allowing arrow-left is visualised here:
Screenflick.Movie.5.mp4
hope someone has an idea how to solve this.
one idea (also not great) is to open the full-screen diff with a separate key press and not via arrow-right and then one has to naturally escape that fullscreen view via esc and can freely scroll left/right by holding down the arrow keys
To me, restoring the old functionality but allowing a full-screen diff with a dedicated keybind sounds like a good solution. I've been using the v0.23 release lately but I still find the old behavior of resizing the diff view more ergonomic.
Another solution would be to allow word-wrapping which removes the need for scrolling altogether. Wrapped lines could be shown by putting a ↩ (U+21A9) at the end of the wrapped lines. I don't think this needs to be mutually exclusive with the other option though.
Word-wrapping seems to be a good solution. Another possible approach - scroll the diff viewer only with vim-like hjkl and use arrows only for pane navigation.
I'm not a big fan of hjkl because it assumes a qwerty-like keyboard layout and it's not very intuitive. However, I'll take it over the current behavior which I find more confusing.
Perhaps we can only allow key-repeat when scrolling and require a new keypress to exit out of the view.
I want to discuss the initial question about this issue.
I meet the same problem like the beginning.
But i found that if i open the same view of Log[2] > Files: > Diff, i can use q to exit the preview of difference.
So maybe we can use the same way for the Status > Unstaged Changes > Diff to exit the preview with q.
It seems like #1955 is relevant here — the distinction between diff-as-pane (in the status view) and fullscreen diff seems important for usability.
In my opinion a good usability guideline for arrow key navigation is: If you can ENTER a mode with right arrow, you should be able to EXIT it with left arrow.
It seems like there are a few ways to fix this:
Restore pre-0.23 behavior. Add a keybinding to "zoom" into fullscreen diff, where left/right-arrows scroll and Esc exits back to status view.
Restore pre-0.23 behavior. Add new keybindings for horizontal scrolling. (Maybe < and > by default? They're near the arrow keys in a lot of layouts.)
(This is kinda wild but hear me out.) Keep the current behavior, but add a guard time after which left-arrow will exit the fullscreen diff. Could be a good proxy for whether the user is just holding down the left arrow to scroll or not. Idk, just a thought.
Pseudocode for option 3:
put 666ms into guardTime
on leftArrow
if can scroll left
put current time into lastLeftArrowTime
scroll left
else
if current time > lastLeftArrowTime + guardTime
exit diff view
else
do nothing
end if
end if
end leftArrow
I am still using v0.22 because I strongly feel that moving to the diff panel should not automatically make it full screen.
I think it makes sense to still see at a glance what files are staged/unstaged, and having it automatically go fullscreen makes the navigation visually confusing to me.
Also, as already said, "If you can ENTER a mode with right arrow, you should be able to EXIT it with left arrow"
Anyway gitui is amazing thanks for making it happen
If you can ENTER a mode with right arrow, you should be able to EXIT it with left arrow.
That's where lynx mode folks feel right at home, and it's quite disruptive to the swift navigation flow if you're "trapped" in a view where Left doesn't get you back to the previous view.
I'd be happy already if this could be set up via key_bindings.ron, but I haven't managed to do so specifically for fullscreen views. (I wouldn't like to have to close e. g. the branch popup by Left.)
Any ideas if this is possible?
add a guard time after which left-arrow will exit the fullscreen diff
A compulsory delay before leaving full screen would be rather annoying. However, with the guard time in place, you would:
exit upon Left immediately unless you happened to use the Left key in the last 0.5 s or so before.
This fully qualifies as a solution, in my view.
(That said, I'd be fine with wrapping, or </> to scroll horizontally, as well.)
Activity
raphCode commentedon Jul 5, 2023
I believe that worked prior to v0.23.0.
holly-hacker commentedon Jul 11, 2023
I recently updated to v0.23 and this feels very frustrating to me. I'll try to take up this issue later today and temporarily roll back to v0.22.x on my machine until a new release is made.
extrawurst commentedon Aug 14, 2023
I am also not a fan of the current solution but the big UX fail that comes with allowing
arrow-leftis visualised here:Screenflick.Movie.5.mp4
hope someone has an idea how to solve this.
one idea (also not great) is to open the full-screen diff with a separate key press and not via
arrow-rightand then one has to naturally escape that fullscreen view viaescand can freely scroll left/right by holding down the arrow keysholly-hacker commentedon Aug 15, 2023
To me, restoring the old functionality but allowing a full-screen diff with a dedicated keybind sounds like a good solution. I've been using the v0.23 release lately but I still find the old behavior of resizing the diff view more ergonomic.
Another solution would be to allow word-wrapping which removes the need for scrolling altogether. Wrapped lines could be shown by putting a
↩(U+21A9) at the end of the wrapped lines. I don't think this needs to be mutually exclusive with the other option though.ShrykeWindgrace commentedon Aug 22, 2023
Word-wrapping seems to be a good solution. Another possible approach - scroll the diff viewer only with vim-like
hjkland use arrows only for pane navigation.holly-hacker commentedon Aug 22, 2023
I'm not a big fan of
hjklbecause it assumes a qwerty-like keyboard layout and it's not very intuitive. However, I'll take it over the current behavior which I find more confusing.Perhaps we can only allow key-repeat when scrolling and require a new keypress to exit out of the view.
extrawurst commentedon Aug 22, 2023
unfortunately terminals do not allow that distinction
gogongxt commentedon Oct 8, 2023
I want to discuss the initial question about this issue.
I meet the same problem like the beginning.
But i found that if i open the same view of
Log[2] > Files: > Diff, i can useqto exit the preview of difference.So maybe we can use the same way for the
Status > Unstaged Changes > Diffto exit the preview withq.smammy commentedon Nov 23, 2023
It seems like #1955 is relevant here — the distinction between diff-as-pane (in the status view) and fullscreen diff seems important for usability.
In my opinion a good usability guideline for arrow key navigation is: If you can ENTER a mode with right arrow, you should be able to EXIT it with left arrow.
It seems like there are a few ways to fix this:
Restore pre-0.23 behavior. Add a keybinding to "zoom" into fullscreen diff, where left/right-arrows scroll and Esc exits back to status view.
Restore pre-0.23 behavior. Add new keybindings for horizontal scrolling. (Maybe
<and>by default? They're near the arrow keys in a lot of layouts.)(This is kinda wild but hear me out.) Keep the current behavior, but add a guard time after which left-arrow will exit the fullscreen diff. Could be a good proxy for whether the user is just holding down the left arrow to scroll or not. Idk, just a thought.
Pseudocode for option 3:
mttdr commentedon Oct 16, 2024
I want to add my 2cents on the issue:
I am still using v0.22 because I strongly feel that moving to the diff panel should not automatically make it full screen.
I think it makes sense to still see at a glance what files are staged/unstaged, and having it automatically go fullscreen makes the navigation visually confusing to me.
Also, as already said, "If you can ENTER a mode with right arrow, you should be able to EXIT it with left arrow"
Anyway gitui is amazing thanks for making it happen
GfEW commentedon Mar 31, 2026
That's where lynx mode folks feel right at home, and it's quite disruptive to the swift navigation flow if you're "trapped" in a view where
Leftdoesn't get you back to the previous view.I'd be happy already if this could be set up via
key_bindings.ron, but I haven't managed to do so specifically for fullscreen views. (I wouldn't like to have to close e. g. the branch popup byLeft.)Any ideas if this is possible?
A compulsory delay before leaving full screen would be rather annoying. However, with the guard time in place, you would:
exit upon
Leftimmediately unless you happened to use theLeftkey in the last 0.5 s or so before.This fully qualifies as a solution, in my view.
(That said, I'd be fine with wrapping, or
</>to scroll horizontally, as well.)