diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2012-02-21 21:52:09 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2012-02-21 21:52:55 +0100 |
commit | b561eedd8b1d70a2b3339d167348771f1a8fc5c7 (patch) | |
tree | a7d7d32a90f391767a921a5fcdb59551cdffa04e /Src/Zle/zle_main.c | |
parent | 340a3b41e51e3f39249a9e28f0615b063f073a3c (diff) | |
parent | 5f25bb8223d090d13af5869893fa35e5b8c44182 (diff) | |
download | zsh-b561eedd8b1d70a2b3339d167348771f1a8fc5c7.tar.gz zsh-b561eedd8b1d70a2b3339d167348771f1a8fc5c7.zip |
New upstream release
Merge branch 'upstream' into debian
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r-- | Src/Zle/zle_main.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 3cdc3b2ed..e1a575bdb 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1200,6 +1200,18 @@ zleread(char **lp, char **rp, int flags, int context) putc('\r', shout); if (tmout) alarm(tmout); + + /* + * On some windowing systems we may enter this function before the + * terminal is fully opened and sized, resulting in an infinite + * series of SIGWINCH when the handler prints the prompt before we + * have done so here. Therefore, hold any such signal until the + * first full refresh has completed. The important bit is that the + * handler must not see zleactive = 1 until ZLE really is active. + * See the end of adjustwinsize() in Src/utils.c + */ + queue_signals(); + zleactive = 1; resetneeded = 1; errflag = retflag = 0; @@ -1209,6 +1221,8 @@ zleread(char **lp, char **rp, int flags, int context) zrefresh(); + unqueue_signals(); /* Should now be safe to acknowledge SIGWINCH */ + zlecallhook("zle-line-init", NULL); zlecore(); @@ -1913,7 +1927,7 @@ zle_main_entry(int cmd, va_list ap) static struct builtin bintab[] = { BUILTIN("bindkey", 0, bin_bindkey, 0, -1, 0, "evaM:ldDANmrsLRp", NULL), BUILTIN("vared", 0, bin_vared, 1, 1, 0, "aAcehM:m:p:r:t:", NULL), - BUILTIN("zle", 0, bin_zle, 0, -1, 0, "aAcCDFgGIKlLmMNRU", NULL), + BUILTIN("zle", 0, bin_zle, 0, -1, 0, "aAcCDFgGIKlLmMNrRTU", NULL), }; /* The order of the entries in this table has to match the *HOOK |