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

AW: Zsh line editor backwards delete



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@xxxxxxxxxxxxxxxx>
Gesendet: Donnerstag, 18. Januar 2024 16:25
An: Dieter Bolz <franz.dieter.bolz@xxxxxxxxx>
Cc: zsh-workers@xxxxxxx <zsh-workers@xxxxxxx>
Betreff: Re: Zsh line editor backwards delete
 
On Thu, Jan 18, 2024 at 4:49 AM Dieter Bolz <franz.dieter.bolz@xxxxxxxxx> 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.


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