Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Multi-line prompts are repeated when the terminal window is resized. (repeat of #321) #2320
Could you add some more information? Which OS, which terminal, which fish version? What's your prompt? Any custom functions, especially signal handlers for SIGWINCH?
I cannot reproduce this on archlinux with konsole, fish 2.2.0-188-g3f43050, the classic+git prompt, a custom right-prompt and no custom SIGWINCH handlers.
Mac OS X 10.10.5. Was able to replicate with both iTerm2 and Terminal. fish 2.2.0. Prompts that have shown this are Pythonista and bira. 4 of us at my work can all replicate this (same environment).
No custom functions, and it occurs when resizing window of the terminal.
Sorry, but I'm using 2.2.0. The problem still exists.
On Saturday, October 31, 2015, Fabian Homborg email@example.com
--- This information is automatically generated ---
ted.sybil aka. ymfoi aka. Ted Yin
referenced this issue
Mar 13, 2016
I'm not sure about Github notifications when an issue is referenced from another, but I wanted to point out the duplicate issue I filed #2816 (sorry for the dup -- I searched but didn't see this one). I'm able to replicate this issue with all terminal emulators based on recent (gtk3) versions of vte.
I filed a bug report against vte here, and one of the developers seemed to figure out what the problem was. See comment 4 specifically.
I'd love to contribute to fish, and I have some C++ knowledge, but I'm still learning the basics of how shells work. I implemented the vte dev's suggestion here, but I have no idea whether or not this will cause side effects. Tests seem to pass, and I'm using it as my daily driver without issue so far.
@joesanford: Can you try erasing
The idea is that these terminals (iTerm2 and newer VTE) will reflow text themselves, so fish doing it just gets in the way. Or maybe their reflow doesn't work for our needs, let's see.
Apr 11, 2016
@0xbaadf00d (I assume this happens when you shrinked the terminal window.) This happens with the right prompt probably because when you shrink the window, then the last character of the right prompt will be overflown into the next line. fish then proceeds to rewrite the prompt, but does not go to the previous line and writes it one the current one instead. This means that there is a bunch of garbage on the previous line that fish doesn't even know about. (This also happens to me
I just wanted to let you know that this problem also exists in zsh for years, and almost every ohmyzsh theme I tested. The glitch also occurs on many single line prompts. I am "living" with this glitch for a couple of years already, from Mac OS 10.7 up to 10.12, using iTerm, iTerm2 and Terminal.app
EDIT: I just found this forum post about the same problem and I thought it would be helpful to tell you that the workaround fixed the issue for me. I can't believe that I found a solution after so many years...
The idea is to let the prompt act as a single line and do a simple print using a specific function which is called by zsh before drawing the actual prompt. This may work for the fish-shell as well, I guess?
This issue is still not fixed, environment:
This annoy me for a long time (at least over a year), so I try to find a solution just now, and searching for solution leads me to this page.
Not only when resizing panes, but when splitting current pane, there's something wrong with the prompt.
added a commit
Jul 25, 2017
I can confirm that this does not happen with an up-to-date konsole, and I don't think we want to support terminals that are 15 years out of date.
Anyway, please test #4243.
@faho yes, Konsole v2.3.3, I'm using Linux Box in my company, and it is a very old of Linux distribution, it is chosen by my software development, I can not use the latest one.
About the test, I installed (using yum) the stable version of fish-shell which is currently v2.6.0 from a repo for my version of Linux, and I cannot compile and install it from the source code directly since compiling requires higher version of tools.
It took a while to install new version of gcc/g++ in my CentOS6.5 (instructions from link.
Before installing the #4243.
After installing the #4243. I cannot say that it is fixed.
I'll let you know the result of another test in Fedora (new version of Konsole) when I get home.