Repository navigation
Fix clearing abandoned line with VTE - #4243
Conversation
With VTE-based terminals, resizing currently causes multi-line prompts to go weird. This changes the sequence we use to clear the line to one suggested by a VTE developer (https://bugzilla.gnome.org/show_bug.cgi?id=763390#c4). It changes nothing in konsole 17.04.3 and urxvt 9.22, but they already work. Note that this does not fix the case where output did not end in a newline, but that doesn't seem to be up to us. Also, it only affects those lines. Fixes fish-shell#2320.
|
I tested this in
Also note that right prompts are broken in sakura and mate-terminal. |
|
I think we only forced the string of "[2K" because curses didn't have it in terminfo. For the more typical "[K" you can get that escape where it's valid via the terminfo definition (like the other stuff we |
|
Sure, what's the |
|
You don't need to use tparm. Can just use |
|
As in, |
|
Any reason not to merge this? |
|
Yes. Sorry for the delay. The issue I still have is that this isn't a complete fix, so it's likely to break something else. This kind of stuff is really fragile because of the fifty million terminals available. Cases it does not fix:
However, it fixes the case without right prompt and tmux in any vte-based term I've tried (and whether we are responsible for the issue with tmux requires further research), and I cannot find any case it makes worse. Plus, we're backed up on this by a vte developer. So: I'm merging this. |
Unfortunately, this breaks the expect tests. So, until I can figure out how to unbreak them: This reverts commit 09cb31a.
|
This needs to be readded since I've reverted it because it breaks the expect tests. So far I haven't found where this sequence is checked there, so I haven't figured out how to fix it. |
This reverts commit 745a88f.
This reverts commit 745a88f.
With VTE-based terminals, resizing currently causes multi-line prompts
to go weird.
This changes the sequence we use to clear the line to one suggested by
a VTE
developer (https://bugzilla.gnome.org/show_bug.cgi?id=763390#c4).
It changes nothing in konsole 17.04.3 and urxvt 9.22, but they already
work.
Note that this does not fix the case where output did not end in a
newline, but that doesn't seem to be up to us. Also, it only affects
those lines.
Fixes #2320.
TODOs: