Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] Line number in prompt after `zle reset-prompt'
- X-seq: zsh-workers 37046
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] Line number in prompt after `zle reset-prompt'
- Date: Sun, 1 Nov 2015 10:59:38 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=jXdequIVmbU1qhqWPAHI+icYjs7DknqXzMXO2BYPuGY=; b=QwKSeUra826HiaWsROcXjyCbTeQ9+k97bDArQ+449RU7J2oHVS+bqXkNMHXSm1nJah e3eCF/Ei3adOPP0hU9aWLBpD4/Ac/43M5W9hs0l5/1wwZ11mkhwVTcpjF+MIAjnrBFyy gyHCuDryOF0ve+hNcytWVoG3K6gqJRsGX1IJ5iora8iW45jVXel1TePcBgVwGCbGPn32 gDnLS7iTTQiFM/I6ffnpIhWIOS5UWU95fyZSJn+Hs+CiH78IEanemAvFWYMGwliPEVjD Phe89DjDuJN9nOcVc21mvJWd2D0NKiT2TRaAE8GKED1KqaAHjU+sr1r9rRr4W7/A1Fxy YdGQ==
- In-reply-to: <CAKc7PVAREgNTYv8KD6Oh2aA6kUa+fa2cvHUUCcidKvufT2qK3Q@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDMKDHq+0nHrUa=VnTAVT6_iLLuLY4TM-fbV4HmROqd3g@mail.gmail.com> <151031132331.ZM21501@torch.brasslantern.com> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author