zsh-workers
 help / color / mirror / code / Atom feed
* Bug in RPROMPT code?
@ 2016-12-16 11:30 Nicholas Sterling
  2016-12-16 12:07 ` Nikolay Aleksandrovich Pavlov (ZyX)
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Sterling @ 2016-12-16 11:30 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

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


[-- Attachment #2.1: Type: text/html, Size: 1000 bytes --]

[-- Attachment #2.2: Terminal_—_-zsh_—_39×44_and_Setup_Vim__Powerline_and_iTerm2_on_Mac_OS_X__Example_.png --]
[-- Type: image/png, Size: 12598 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in RPROMPT code?
  2016-12-16 11:30 Bug in RPROMPT code? Nicholas Sterling
@ 2016-12-16 12:07 ` Nikolay Aleksandrovich Pavlov (ZyX)
  2016-12-16 21:00   ` Nicholas Sterling
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Aleksandrovich Pavlov (ZyX) @ 2016-12-16 12:07 UTC (permalink / raw)
  To: Nicholas Sterling, zsh-workers


[-- Attachment #1.1: Type: text/html, Size: 1254 bytes --]

[-- Attachment #1.2: image.png --]
[-- Type: image/png, Size: 5792 bytes --]

[-- Attachment #1.3: Terminal_���_-zsh_���_39��44_and_Setup_Vim__Powerline_and_iTerm2_on_Mac_OS_X__Example_.png --]
[-- Type: image/png, Size: 12598 bytes --]

[-- Attachment #2: screenshot-2016-12-16@15:01:44:359251459.png --]
[-- Type: image/png, Size: 1573 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in RPROMPT code?
  2016-12-16 12:07 ` Nikolay Aleksandrovich Pavlov (ZyX)
@ 2016-12-16 21:00   ` Nicholas Sterling
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Sterling @ 2016-12-16 21:00 UTC (permalink / raw)
  To: Nikolay Aleksandrovich Pavlov (ZyX); +Cc: zsh-workers

Ah, go it.  Thanks, Nikolay.

Nicholas


> On Dec 16, 2016, at 6:07 AM, Nikolay Aleksandrovich Pavlov (ZyX) <kp-pav@yandex.ru> wrote:
> 
> 16.12.2016, 14:33, "Nicholas Sterling" <nicholas.sterling@gmail.com>:
>> 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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-16 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 11:30 Bug in RPROMPT code? Nicholas Sterling
2016-12-16 12:07 ` Nikolay Aleksandrovich Pavlov (ZyX)
2016-12-16 21:00   ` Nicholas Sterling

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).