kovidgoyal/kitty

scroll lock support

Closed this issue · 7 comments

Is your feature request related to a problem? Please describe.
often i get long compiler errors. these errors are best read from top to bottom, but kitty automatically scrolls to the bottom.

Describe the solution you'd like
many terminals will disable automatic scrolling to the bottom when the scroll lock key is pressed, however kitty does not have this functionality as far as i can tell. i think kitty should add a new action to toggle this scrolling behavior, and bind it to scroll lock by default.

Describe alternatives you've considered

  • Shell integration: i can't get this to work for me, and also it wouldn't work in some situations, like in a language repl.

I cannot replicate. Steps I tried:

  1. Run

for i in {0..10000}; do sleep 1; echo $i; done

  1. Scroll up

kitty stays scrolled up even though the for loop is outputting new lines
every second.

The only case where it will scroll down is if its scrollback buffer
fills up. So increase the size of the buffer in kitty.conf. Or press
ctrl+shift+g or ctrl+shift+h to browse the scrollback in a pager.

you are misunderstanding my request.

with scroll lock enabled, it shouldn't scroll down, even while you are at the bottom of the screen.

the problem with scrolling up is then you can't see when the command is finished, and if you scroll down to check, you might end up scrolling all the way down, and then kitty will track the bottom of the scrollback buffer. this is expecially a problem for programs that take a few seconds to print their first line of output.

I still dont understand your request or how it is a problem. Simply
browse the scrollback in a pager and you will never have any scrolling
other than what you create.

ctrl-shift-g only works if shell integration is set up, otherwise it will browse the entire scrollback, which is extremely unhelpful.

my request is very simple: enabling scroll lock should completely disable any automatic scrolling, even if you are scrolled all the way to the bottom.

So setup shell integration

my request is very simple: enabling scroll lock should completely disable any automatic scrolling, even if you are scrolled all the way to the bottom.

No it isnt.

  1. Modern keyboards often dont have a scroll lock key

  2. There is absolutely no reason for anyone to think that enabling scroll lock should have that effect. The feature is completely non-discoverable and confusing if you happen to use scroll lock for other reasons.

Again, simply enable shell integration. That is the correct solution to your problem. I am not going to spend time implementing workarounds that arent actually needed.