zsh-workers
 help / color / mirror / code / Atom feed
* ZLE got wrong prompt line size, resulting redisplay eats lines when called
@ 2022-10-24  7:27 Zang
  2022-10-24  8:20 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Zang @ 2022-10-24  7:27 UTC (permalink / raw)
  To: zsh-workers

Step to reproduce:

1. Run zsh in clean mode
```
zsh -d -f -i
```

2. Set PROMPT, fill line with dash, then carriage return, fill line
with dash again
```
PROMPT="${(pl:${COLUMNS}::-:)}$terminfo[cr]\
${(pl:${COLUMNS}::-:)}$terminfo[cr]\

%# "
```

By using this PROMPT, we filled the first line of the PROMPT with
dashes twice, it takes only a single line.
But it seems that ZLE doesn't understand carriage return, it considers
that the PROMPT takes multiple lines.

3. Bind ctrl-X to redisplay
```
bindkey "^X" redisplay
```

4. By pressing ctrl-x, one will experience the bug, that PROMPT is
eating lines from previous command outputs.


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

end of thread, other threads:[~2022-10-24  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24  7:27 ZLE got wrong prompt line size, resulting redisplay eats lines when called Zang
2022-10-24  8:20 ` Mikael Magnusson
2022-10-24  8:38   ` Zang

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).