zsh-users
 help / color / mirror / code / Atom feed
* Why does zsh clear to end-of-screen after prompt?
@ 2023-08-25 19:52 John Hawkinson
  2023-08-26  0:18 ` Bart Schaefer
  0 siblings, 1 reply; 9+ messages in thread
From: John Hawkinson @ 2023-08-25 19:52 UTC (permalink / raw)
  To: zsh-users

When I reposition the cursor to the top left corner of the screen (or anywhere), as with ESC [ H, when zsh prints a prompt it clears from the prompt to the end of the screen, oblitering any text on the screen already, which defeats the point of my cursor positioning.

Why does this happen, and why is it desirable?
I can workaround it by setting TERM=dumb, but that has other annoying side effects.
It does not appear to tbe the result of a precmd, and I still see it invoking zsh --no-rcs.

To reproduce:

   seq 1 10; export TERM=xterm-color; echo "\e[H foo\n"

Most of the ten lines output of seq is overwritten and nothing is seen.
By contrast:

  seq 1 10; export TERM=dumb; echo "\e[H foo\n"

prints the ten lines and moves the cursor to the top above them, as expected.

How can I get cursor positining to work without forgoing, e.g., line editing?


I feel like I'm missing something obvious.

--
jhawk@alum.mit.edu
John Hawkinson


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

end of thread, other threads:[~2023-09-09 23:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 19:52 Why does zsh clear to end-of-screen after prompt? John Hawkinson
2023-08-26  0:18 ` Bart Schaefer
2023-08-26  0:59   ` John Hawkinson
2023-08-26  1:39     ` Bart Schaefer
2023-08-27  8:34     ` Roman Perepelitsa
2023-08-27 15:36       ` Grant Taylor
2023-08-27 16:02         ` Roman Perepelitsa
2023-08-27 18:55           ` Grant Taylor
2023-09-09 23:23     ` Bart Schaefer

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