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

Bug: Scrolling with ] in a diff causes the window to close #1245

Closed
jgarte opened this issue Nov 13, 2022 · 1 comment
Closed

Bug: Scrolling with ] in a diff causes the window to close #1245

jgarte opened this issue Nov 13, 2022 · 1 comment
Labels

Comments

@jgarte
Copy link

jgarte commented Nov 13, 2022

Holding down ] to scroll in a diff window causes the window to close so I'm forced to repeatedly press ] to scroll instead of just holding it down.

I'm using

 tig --version
tig version 2.5.6
ncursesw version 6.2.20210619
readline version 8.1

screenshot of the view in which it happens:

image

@jgarte jgarte changed the title Scrolling with ] in a diff causes the window to close Bug: Scrolling with ] in a diff causes the window to close Nov 13, 2022
@krobelus
Copy link
Contributor

] doesn't really scroll but rather increase the diff context by one.
It recomputes the entire diff which can be expensive.

A proper fix would be to add debouncing logic: recomputing the diff should happen in the background, and each new press of ] would cancel any old operation and start a new one.
Not sure if this is easy to implement. It should be if we are willing to accept a slim possibility of race conditions.

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

No branches or pull requests

3 participants