mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 08:51:18 +02:00
17405: adapt 17390 to reset PREDISPLAY and POSTDISPLAY when zle is entered
This commit is contained in:
parent
c2dd10edc9
commit
76c1e26713
@ -1,3 +1,9 @@
|
||||
2002-07-04 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 17405: Src/Zle/zle_main.c, Src/Zle/zle_params.c, Doc/Zsh/zle.yo:
|
||||
adapt 17390 so that PREDISPLAY and POSTDISPLAY are reset when zle
|
||||
is entered.
|
||||
|
||||
2002-07-04 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 17403: Src/Zle/compcore.c, Src/Zle/complete.c,
|
||||
|
@ -666,17 +666,15 @@ vindex(PREDISPLAY)
|
||||
item(tt(PREDISPLAY) (scalar))(
|
||||
Text to be displayed before the start of the editable text buffer. This
|
||||
does not have to be a complete line; to display a complete line, a newline
|
||||
must be appended explicitly. Note that the text survives between calls to zle
|
||||
and hence must be removed explicitly by assigning an empty value to the
|
||||
parameter.
|
||||
must be appended explicitly. The text is reset on each new invocation
|
||||
(but not recursive invocation) of zle.
|
||||
)
|
||||
vindex(POSTDISPLAY)
|
||||
item(tt(POSTDISPLAY) (scalar))(
|
||||
Text to be displayed after the end of the editable text buffer. This
|
||||
does not have to be a complete line; to display a complete line, a newline
|
||||
must be prepended explicitly. Note that the text survives between calls to
|
||||
zle and hence must be removed explicitly by assigning an empty value to the
|
||||
parameter.
|
||||
must be prepended explicitly. The text is reset on each new invocation
|
||||
(but not recursive invocation) of zle.
|
||||
)
|
||||
vindex(RBUFFER)
|
||||
item(tt(RBUFFER) (scalar))(
|
||||
|
@ -752,6 +752,7 @@ zleread(char *lp, char *rp, int flags)
|
||||
pmpt_attr = txtchange;
|
||||
rpromptbuf = promptexpand(rp, 1, NULL, NULL);
|
||||
rpmpt_attr = txtchange;
|
||||
free_prepostdisplay();
|
||||
|
||||
zlereadflags = flags;
|
||||
histline = curhist;
|
||||
|
@ -516,3 +516,13 @@ get_postdisplay(Param pm)
|
||||
{
|
||||
return get_prepost(postdisplay, postdisplaylen);
|
||||
}
|
||||
|
||||
/**/
|
||||
void
|
||||
free_prepostdisplay(void)
|
||||
{
|
||||
if (predisplaylen)
|
||||
set_prepost(&predisplay, &predisplaylen, NULL);
|
||||
if (postdisplaylen)
|
||||
set_prepost(&postdisplay, &postdisplaylen, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user