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

Re: Bug in RPROMPT code?



Ah, go it.  Thanks, Nikolay.

Nicholas


> On Dec 16, 2016, at 6:07 AM, Nikolay Aleksandrovich Pavlov (ZyX) <kp-pav@xxxxxxxxx> wrote:
> 
> 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?
>>  
>> <Terminal_—_-zsh_—_39×44_and_Setup_Vim__Powerline_and_iTerm2_on_Mac_OS_X__Example_.png>
>>  
>> 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.
>  
> <image.png>
> <screenshot-2016-12-16@15:01:44:359251459.png>



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