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

Re: ZSH vertical resize - last terminal line disappears



On Feb 9,  8:13pm, Florian Meier wrote:
} 
} Every time I split my terminal vertically (or just resize it), the
} last line of the text output disappears or just gets overwritten by
} the prompt, I don't know.


On Feb 10,  4:40pm, Florian Meier wrote:
}
} As a follow-up, i found a workaround by accident.
} When the first line (the "-----------" line) does not reach the column
} on the very right, the problem disappears...
} Is someone able to reproduce this weird behavior?


So what's happening is that the terminal *might* scroll when a character
is printed in the bottom right corner.  This behavior depends on the
terminal type and sometimes on a configurable setting for the terminal.
Sometimes it depends on whether that last character is a space or a
newline or is followed by a newline.  There's some discussion of this
in the manual under the ZLE_RPROMPT_INDENT variable.

Depending on whether this happens or not, ZLE can get confused about
the number of lines it needs to move upward from the bottom of the
screen in order to redraw the prompt.

The difficulty is that there's no reliable way to determine how any
given terminal will behave; even when there is a corresponding terminfo
field, it is often incorrect.  No matter what we do it'll always be
wrong for somebody.  Your workaround -- avoiding lines that print all
the way to the right margin is the only 100% effective approach.



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