about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2016-09-26 11:55:33 +0200
committerMikael Magnusson <mikachu@gmail.com>2016-09-30 10:48:20 +0200
commit5cf2ffb327faf84b73beb812ff2f7e9bf08e7ecf (patch)
tree08bf1973d3e17d7091735716f95eed35abfb8183 /Src/Zle/zle_main.c
parent13d0b278be9f9f10655a53a88b863351d85b523d (diff)
downloadzsh-5cf2ffb327faf84b73beb812ff2f7e9bf08e7ecf.tar.gz
zsh-5cf2ffb327faf84b73beb812ff2f7e9bf08e7ecf.tar.xz
zsh-5cf2ffb327faf84b73beb812ff2f7e9bf08e7ecf.zip
Call the pre-redraw hook if there is text in the buffer on init
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c14
1 files changed, 13 insertions, 1 deletions
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);