zsh-users
 help / color / mirror / code / Atom feed
From: John Hawkinson <jhawk@alum.mit.edu>
To: zsh-users@zsh.org
Subject: Why does zsh clear to end-of-screen after prompt?
Date: Fri, 25 Aug 2023 15:52:43 -0400	[thread overview]
Message-ID: <ZOkGi5f6hPuk_1-b@louder-room.local> (raw)

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


             reply	other threads:[~2023-08-25 19:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 19:52 John Hawkinson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZOkGi5f6hPuk_1-b@louder-room.local \
    --to=jhawk@alum.mit.edu \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).