-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make scroll-to-bottom on input behaviour configurable #1824
Comments
@Eugeny are you sure that's the right fix for Eugeny/tabby#543? This particular case in VS Code is handled by this option which let's you force normal selection (not apply tmux selection) and copy that way: Lines 150 to 157 in b5f1c33
|
Judging by
I'd say that's the case |
@Eugeny but tmux doesn't have access to the scrollback, it maintains it's own scrollback buffer which is why this is confusing me. If you were using tmux's copy mechanism, you must be at the bottom of the (xterm.js) viewport? |
After more discussion in Eugeny/tabby#1578, it's not to do with tmux apparently, people just want the option to disable it so accidentally hitting a key doesn't scroll. Proposal for new option: scrollOnInput?: boolean; // default true |
@Tyriar Not sure how this is currently coupled to input - is the scrolling triggered by keyboard input or by pty output (thus Edit: There are two DECSET modes from rxvt, which further specify this:
xterm updates its settings directly from these (thus applications are allowed to change it). Proposal - support both as well, but rename tty output to write (since we are not strictly bound to pty/tty output): scrollOnWrite?: boolean; // default true, same as DECSET 1010
scrollOnKeypress?: boolean; // default false, same as DECSET 1011 +support for DECSET 1010 / 1011. |
@jerch 👍 the
|
@Tyriar xterm seems to allow to change that by apps on the fly. Imho for those things the user should always be in control - I agree with you. Edit: Given that - maybe we should not bother with DECSET here? Imho app side is seen as restricted to active viewport manipulations (cannot interact with scrollbuffer at all), I dont see any valid use case for DECSET 1010/1011 beside messing with user settings. So skip it and go only with those options? Edit2: Another way to deal with it and have DECSET support would be a 3-state option:
Not sure if the implementation overhead for that is worth anything, still see no value in the DECSET modes here. |
This is what I was suggesting, we might be over thinking it though and adding a thing no one would use? It's similar to the cursor style sequence that I added which doesn't have a 3 state thing, instead the sequence updates the option and that's the source of truth. |
Well I currently lean towards having the options only, no DECSET at all for this. Would be straight forward to implement. Imho application side should not be able to alter those settings (thus DECSET 1010/1011 are ignored like now). I really dont get why these settings have DECSET modes at all (maybe I just dont see the valid use cases). |
I'm using xterm in Reactjs and just upgade to 4.8.1. My app constantly writing long SSH output chunks to terminal. Default behaviour is to scroll to bottom whenewer a new text chunk is written. My app's user is supposed to activate / deactivate this behaviour. i.e, he'll freeze the terminal to prevent this scroll to bottom thing as he wishes. Couldn't find a way. Is it possible to switch scrollTtyOutput behaviour in the app? |
Added in #4289 |
Hi Tyriar, I wonder whether we want to keep this issue open as the other option "scrollOnWrite" still haven't been implemented? |
Was a long time ago that we discussed this, I don't think scroll on write is ever really desirable is it? |
Personally, I don't use it. But in the older version of our app which supports it, I can see that ~1% of users use it. Another thing is that it is not hard to implement "scroll on write" outside of xterm.js --- we just need to subscrube to I will leave the decision to you. |
Since the usage should be low and it's trivial to implement by the embedder I think we can leave this out. Key press on the other hand was enabled by default so the embedder didn't have a choice. |
This is still not implemented in xterm? It's quite a common feature in other desktop terminals. |
xterm will unconditionally scroll to bottom on user input: https://github.com/xtermjs/xterm.js/blob/master/src/Terminal.ts#L1518
It'd be handy if this could be programmatically disabled.
The text was updated successfully, but these errors were encountered: