zsh-workers
 help / Atom feed
* Misaligned cursor when prompt linebroken
@ 2019-04-18 15:39 Mikael Magnusson
  2019-04-18 17:56 ` dana
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Magnusson @ 2019-04-18 15:39 UTC (permalink / raw)
  To: zsh-workers

PS1=${(l:$COLUMNS::a:)}b

the cursor is placed on top of the "b" for me, both in urxvt and
xterm. Under zsh -f the initial rendering appears correct, but not
after I type two characters:
b[cursor] -> press 1
b1[cursor] -> press 2
12[cursor]

-- 
Mikael Magnusson

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

* Re: Misaligned cursor when prompt linebroken
  2019-04-18 15:39 Misaligned cursor when prompt linebroken Mikael Magnusson
@ 2019-04-18 17:56 ` dana
  2019-04-18 18:29   ` Mikael Magnusson
  0 siblings, 1 reply; 5+ messages in thread
From: dana @ 2019-04-18 17:56 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Zsh hackers list

On 18 Apr 2019, at 10:39, Mikael Magnusson <mikachu@gmail.com> wrote:
>PS1=${(l:$COLUMNS::a:)}b
>the cursor is placed on top of the "b" for me, both in urxvt and
>xterm. Under zsh -f the initial rendering appears correct, but not
>after I type two characters

Same for me in Terminal.app. The return of workers/43267 (&al.), i suppose?

dana


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

* Re: Misaligned cursor when prompt linebroken
  2019-04-18 17:56 ` dana
@ 2019-04-18 18:29   ` Mikael Magnusson
  2019-04-18 18:40     ` Mikael Magnusson
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Magnusson @ 2019-04-18 18:29 UTC (permalink / raw)
  To: dana; +Cc: Zsh hackers list

On 4/18/19, dana <dana@dana.is> wrote:
> On 18 Apr 2019, at 10:39, Mikael Magnusson <mikachu@gmail.com> wrote:
>>PS1=${(l:$COLUMNS::a:)}b
>>the cursor is placed on top of the "b" for me, both in urxvt and
>>xterm. Under zsh -f the initial rendering appears correct, but not
>>after I type two characters
>
> Same for me in Terminal.app. The return of workers/43267 (&al.), i suppose?

Just a small additional note that it doesn't matter that it's only one
character extra in my example, the same thing happens if you put
bbbbbbbb instead of just b.

-- 
Mikael Magnusson

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

* Re: Misaligned cursor when prompt linebroken
  2019-04-18 18:29   ` Mikael Magnusson
@ 2019-04-18 18:40     ` Mikael Magnusson
  2019-04-18 18:56       ` Mikael Magnusson
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Magnusson @ 2019-04-18 18:40 UTC (permalink / raw)
  To: dana; +Cc: Zsh hackers list

On 4/18/19, Mikael Magnusson <mikachu@gmail.com> wrote:
> On 4/18/19, dana <dana@dana.is> wrote:
>> On 18 Apr 2019, at 10:39, Mikael Magnusson <mikachu@gmail.com> wrote:
>>>PS1=${(l:$COLUMNS::a:)}b
>>>the cursor is placed on top of the "b" for me, both in urxvt and
>>>xterm. Under zsh -f the initial rendering appears correct, but not
>>>after I type two characters
>>
>> Same for me in Terminal.app. The return of workers/43267 (&al.), i
>> suppose?
>
> Just a small additional note that it doesn't matter that it's only one
> character extra in my example, the same thing happens if you put
> bbbbbbbb instead of just b.

I tried reverting that commit (w/42285) and it fixes my problem. I
also can't reproduce any behavior that erases lines with it reverted.
Since having the commit breaks all prompts that are longer than one
line in many(?) terminals, and only fixes the case where it is exactly
as long as one line in some(?) terminals, I would argue for reverting
it in git.

-- 
Mikael Magnusson

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

* Re: Misaligned cursor when prompt linebroken
  2019-04-18 18:40     ` Mikael Magnusson
@ 2019-04-18 18:56       ` Mikael Magnusson
  0 siblings, 0 replies; 5+ messages in thread
From: Mikael Magnusson @ 2019-04-18 18:56 UTC (permalink / raw)
  To: dana; +Cc: Zsh hackers list

On 4/18/19, Mikael Magnusson <mikachu@gmail.com> wrote:
> On 4/18/19, Mikael Magnusson <mikachu@gmail.com> wrote:
>> On 4/18/19, dana <dana@dana.is> wrote:
>>> On 18 Apr 2019, at 10:39, Mikael Magnusson <mikachu@gmail.com> wrote:
>>>>PS1=${(l:$COLUMNS::a:)}b
>>>>the cursor is placed on top of the "b" for me, both in urxvt and
>>>>xterm. Under zsh -f the initial rendering appears correct, but not
>>>>after I type two characters
>>>
>>> Same for me in Terminal.app. The return of workers/43267 (&al.), i
>>> suppose?
>>
>> Just a small additional note that it doesn't matter that it's only one
>> character extra in my example, the same thing happens if you put
>> bbbbbbbb instead of just b.
>
> I tried reverting that commit (w/42285) and it fixes my problem. I
> also can't reproduce any behavior that erases lines with it reverted.
> Since having the commit breaks all prompts that are longer than one
> line in many(?) terminals, and only fixes the case where it is exactly
> as long as one line in some(?) terminals, I would argue for reverting
> it in git.

Dana pointed me more specifically to w/43288 on IRC which was
reportedly committed a while ago but not actually. I checked that it
fixes my case too and doesn't seem to break w/42285, so I've committed
it (actually).

-- 
Mikael Magnusson

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 15:39 Misaligned cursor when prompt linebroken Mikael Magnusson
2019-04-18 17:56 ` dana
2019-04-18 18:29   ` Mikael Magnusson
2019-04-18 18:40     ` Mikael Magnusson
2019-04-18 18:56       ` Mikael Magnusson

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox