* Zsh line editor backwards delete
@ 2024-01-18 12:49 Dieter Bolz
2024-01-18 15:25 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Dieter Bolz @ 2024-01-18 12:49 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
Hi guys
I am using zsh version 5.8 (and oh-my-zsh) under WSL2 and observed the following effect (in both Windows Terminal and PuTTY):
When creating a longer line with several words in it:
db@machine: 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
and then backspacing (either with just Backspace or Meta-Backspace or the like) the text is actually deleted in the line buffer but there are characters remaining on the screen.
db@machine➜ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
I think this easily reproducible 🙂 I know this is not always the case, so if not, please contact me for more analysis.
This does not happen within bash e.g.
Is there some broken optimization going on?
Keep on the wonderful work.
Dieter
[-- Attachment #2: Type: text/html, Size: 7652 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Zsh line editor backwards delete
2024-01-18 12:49 Zsh line editor backwards delete Dieter Bolz
@ 2024-01-18 15:25 ` Bart Schaefer
2024-01-18 16:08 ` AW: " Dieter Bolz
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2024-01-18 15:25 UTC (permalink / raw)
To: Dieter Bolz; +Cc: zsh-workers
On Thu, Jan 18, 2024 at 4:49 AM Dieter Bolz <franz.dieter.bolz@gmail.com> wrote:
>
> When creating a longer line with several words in it:
> and then backspacing (either with just Backspace or Meta-Backspace or the like) the text is actually deleted in the line buffer but there are characters remaining on the screen.
The most likely cause of this is that the display width of characters
in your prompt is not being correctly measured.
What's going on here with the prompt changing?
> db@machine: 1234
> db@machine➜ 1
I suspect you need to adjust your PS1 value to specify a correct
character width for that ➜ glyph. Search for "glitch" in the manual.
^ permalink raw reply [flat|nested] 3+ messages in thread
* AW: Zsh line editor backwards delete
2024-01-18 15:25 ` Bart Schaefer
@ 2024-01-18 16:08 ` Dieter Bolz
0 siblings, 0 replies; 3+ messages in thread
From: Dieter Bolz @ 2024-01-18 16:08 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]
Hi Bart
Thanks for the quick answer.
* The most likely cause of this is that the display width of characters
* in your prompt is not being correctly measured.
I just tried it again with setting PS1 to ">" only.
And now this it works perfectly. So that was the problem.
I will have a closer look at what you proposed now.
>What's going on here with the prompt changing?
>> db@machine: 1234
>> db@machine➜ 1
My bad!!! It edited that (which I should not have done, as this just pointed you to the problem) manually.
Regards
Dieter
________________________________
Von: Bart Schaefer <schaefer@brasslantern.com>
Gesendet: Donnerstag, 18. Januar 2024 16:25
An: Dieter Bolz <franz.dieter.bolz@gmail.com>
Cc: zsh-workers@zsh.org <zsh-workers@zsh.org>
Betreff: Re: Zsh line editor backwards delete
On Thu, Jan 18, 2024 at 4:49 AM Dieter Bolz <franz.dieter.bolz@gmail.com> wrote:
>
> When creating a longer line with several words in it:
> and then backspacing (either with just Backspace or Meta-Backspace or the like) the text is actually deleted in the line buffer but there are characters remaining on the screen.
The most likely cause of this is that the display width of characters
in your prompt is not being correctly measured.
What's going on here with the prompt changing?
> db@machine: 1234
> db@machine➜ 1
I suspect you need to adjust your PS1 value to specify a correct
character width for that ➜ glyph. Search for "glitch" in the manual.
[-- Attachment #2: Type: text/html, Size: 12825 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-18 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 12:49 Zsh line editor backwards delete Dieter Bolz
2024-01-18 15:25 ` Bart Schaefer
2024-01-18 16:08 ` AW: " Dieter Bolz
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).