Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 1/2] zle: Make sure state changes are refreshed after init hook



If `zrefresh' is not called _after_ the zle-line-init hook, any changes
made to the editor's state (be it changes to $CURSOR or $BUFFER or
called widgets like `clear-screen') will only be picked up after the
first character is typed into the editor.
---
 Src/Zle/zle_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e1a575b..5157ad3 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1219,12 +1219,12 @@ zleread(char **lp, char **rp, int flags, int context)
     initmodifier(&zmod);
     prefixflag = 0;
 
-    zrefresh();
-
     unqueue_signals();	/* Should now be safe to acknowledge SIGWINCH */
 
     zlecallhook("zle-line-init", NULL);
 
+    zrefresh();
+
     zlecore();
 
     if (errflag)
-- 
1.8.2.rc1



Messages sorted by: Reverse Date, Date, Thread, Author