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
Multi-line prompt not clearing correctly upon resizing vte-based terminal emulators #2816
When using a multi-line fish prompt and a gtk3 vte-based terminal emulator (e.g. termite, gnome-terminal), the prompt gets copied/mangled when resizing the emulator horizontally.
Reproduction Steps:
Use a multi-line fish_prompt, such as: printf '%s@%s\n$ ' (whoami) (hostname)
Run fish in a vte-based emulator (note: vte based on gtk3 -- issue doesn't seem to be reproducible on gtk2-based emulators like xfce's emulator)
Resize the window horizontally to make it smaller (note: it doesn't have to be smaller than the length of the prompt)
Expected behavior:
Unless the resize causes the emulator window to become smaller than the prompt, I would expect resizing to not affect the shell prompt at all.
Observed behavior:
Here is a simple example using vte's testvte program with fish and zsh, showing the copying of the prompt upon window resize slightly with fish:
I use a tiling window manager, and the effect is amplified each time a new horizontal split is created, otherwise the pictured behavior wouldn't be all that much to complain about.
Additional information:
I filed a bug report against vte here. As you can see, the vte developer blames fish for this behavior. See comment 4 for his explanation of the potential cause and a possible solution. I found that the \r \r mentioned is implemented here in src/screen.cpp.
I have implemented his suggestion (replace \r \r with \e[K), which you can see here. This does seem to work, but I don't understand it well enough to know if it will cause undesired side effects, hence no pull request.
Activity
ridiculousfish commentedon Mar 13, 2016
Let's track in #2320. Thanks for filing this!