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

Re: Bug in RPROMPT code?



16.12.2016, 14:33, "Nicholas Sterling" <nicholas.sterling@xxxxxxxxx>:
Hi folks.  Is this a bug?  When I use %S%s to make the RPROMPT inverse video, zsh leaves a space at the end.  Without inverse video, it is flush with the margin.  Is it possible that the calculation to figure out at which column to start the RPROMPT is not taking into account that %s is non-printing?
 
 
This is obviously not critical, but I thought you would want to know.
 
Nicholas
 
RPROMPT should always be shifted by default, behaviour is controlled by $ZLE_RPROMPT_INDENT which defaults to 1.
 
Setting it to zero does not work well, see attached screenshot (screenshot was done in `zsh -f`). Note that on screenshot you see cursor right after `%` after zeroing ZLE_RPROMPT_INDENT, while it should be aligned with `R`, `R` and `Z`, but space is left both with and without inverse by default.
 

Attachment: screenshot-2016-12-16@15:01:44:359251459.png
Description: PNG image



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