zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] Line number in prompt after `zle reset-prompt'
Date: Sun, 1 Nov 2015 10:59:38 -0800	[thread overview]
Message-ID: <151101105938.ZM16472@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVAREgNTYv8KD6Oh2aA6kUa+fa2cvHUUCcidKvufT2qK3Q@mail.gmail.com>

On Nov 1,  4:18pm, Sebastian Gniazdowski wrote:
}
} a() { zle redisplay }
} b() { zle redisplay; zle -M "test" }
} c() { zle -M "test" }
} 
} "a" and "c" will not reexpand prompt, while "b" will, apparently with
} no reason

Each of redisplay and -M is setting a different flag indicating that
a part of the prompt, buffer, and "status line" needs to be redrawn.
Only when both of the of those flags are set is the display considered
to be in a sufficiently indeterminate state that the whole thing needs
to be regenerated.

(If you reverse "zle -M" + "zle redisplay" the prompt will start to
climb up the screen and the -M text will never appear, because those
two flags are now being considered in the wrong order.)

Ultimately this is because ZLE does not attempt to do "full screen"
management of the display, i.e., it does not maintain a full internal
mapping of the display to minimize updates; it only tracks horizontal
positions where the prompt starts and ends, and number of lines used
by the prompt and the buffer.  So it will do a complete repaint in
some circumstances that might seem unnecessary.


      reply	other threads:[~2015-11-01 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31 18:42 Sebastian Gniazdowski
2015-10-31 20:23 ` Bart Schaefer
2015-11-01 15:18   ` Sebastian Gniazdowski
2015-11-01 18:59     ` Bart Schaefer [this message]

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=151101105938.ZM16472@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).