From 5cf2ffb327faf84b73beb812ff2f7e9bf08e7ecf Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 26 Sep 2016 11:55:33 +0200 Subject: Call the pre-redraw hook if there is text in the buffer on init --- ChangeLog | 6 ++++++ Src/Zle/zle_main.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8450407c8..b49289b63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-09-30 Mikael Magnusson + + * 39452 + comment from 39432: Src/Zle/zle_main.c: Call the + pre-redraw hook if there is text in the buffer on init (from + popping or zle-line-init setting $BUFFER) + 2016-09-30 Oliver Kiddle * 39514: Completion/Unix/Command/_git: handle --git-dir diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 9a83d4141..0bdd82ba4 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1162,7 +1162,16 @@ zlecore(void) popheap(); } -/* Read a line. It is returned metafied. */ +/* Read a line. It is returned metafied. + * + * Parameters: + * - lp: left prompt, e.g., $PS1 + * - rp: right prompt, e.g., $RPS1 + * - flags: ZLRF_* flags (I think), see zlereadflags + * - context: ZLCON_* flags (I think), see zlecontext + * - init: "zle-line-init" + * - finish: "zle-line-finish" + */ /**/ char * @@ -1299,6 +1308,9 @@ zleread(char **lp, char **rp, int flags, int context, char *init, char *finish) zlecallhook(init, NULL); + if (zleline && *zleline) + redrawhook(); + if ((bracket = getaparam("zle_bracketed_paste")) && arrlen(bracket) == 2) fputs(*bracket, shout); -- cgit v1.3