Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Prompt wrapping problems since 42285 ("off by one fix in multiple prompts ")



I have an asynchronous ZSH prompt
(https://github.com/agkozak/agkozak-zsh-theme) that works quite well in ZSH
4.3.11-5.4.2. Ever since v5.5 came out, I've been having a lot of trouble
when the prompt wraps; the cursor frequently appears a few characters back
from where it should. Eliminating the RPROMPT sometimes helps a bit, but
even then, if I enter something and then delete the line, the cursor will
snap back on top of the text of the left prompt, not at its end.

A simple test demonstration can be had (without downloading my prompt) by
loading v5.5 or v5.5.1 with zsh -f and then entering

    PROMPT='abc@def
~/abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz %# '

Make the terminal window narrow or the type very large so that the prompt
wraps. Enter a command that wraps to the next line, then delete the command
(in vi mode, ESC d d). Depending on the width of the terminal window, the
cursor may land one or more places before it should.

If you throw in an RPROMPT, such as

    RPROMPT='(foo bar bat)'

some real ugliness can be had -- always depending, of course, on the width
of the screen. I've tested this out in Ubuntu and FreeBSD with mintty,
PuTTY, lxterminal, and Blink Shell.

Reverting the change in

	
https://github.com/zsh-users/zsh/commit/d8d9fee137a5aa2cf9bf8314b06895bfc2a0
5518

fixes the problems I've described.

Any suggestions? Many thanks in advance/


Alexandros Kozak




Messages sorted by: Reverse Date, Date, Thread, Author