diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/Zle/compcore.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 9f8e5a0c3..a8f2c0b1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2016-11-04 Oliver Kiddle <opk@zsh.org> + * 39829: Src/Zle/compcore.c: when compstate[insert] is emptied + by the completion function and AUTO_MENU is set, start menu + completion on the second tab press rather than the third + * 39834: Src/builtin.c, Completion/Zsh/Command/_print, Completion/Zsh/Command/_fc, Completion/Zsh/Type/_ps1234: when print used with -v and -l, include a final @@ -3363,7 +3367,7 @@ 2015-09-11 Daniel Shahaf <d.s@daniel.shahaf.name> - * 36443: Doc/Zsh/zle.yo Src/Zle/zle_refresh.c: + * 36443: Doc/Zsh/zle.yo Src/Zle/zle_refresh.c: Highlight pasted/yanked text as standout by default (i.e., when $zle_highlight doesn't specify otherwise). diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index fe16c1300..536bca7b3 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -835,6 +835,7 @@ callcompfunc(char *s, char *fn) endparamscope(); lastcmd = 0; incompfunc = icf; + startauto = 0; if (!complist) uselist = 0; @@ -882,8 +883,13 @@ callcompfunc(char *s, char *fn) useline = 1, usemenu = 1; else if (strpfx("auto", compinsert)) useline = 1, usemenu = 2; - else + else { useline = usemenu = 0; + /* if compstate[insert] was emptied, no unambiguous prefix + * ever gets inserted so allow the next tab to already start + * menu completion */ + startauto = lastambig = isset(AUTOMENU); + } if (useline && (p = strchr(compinsert, ':'))) { insmnum = atoi(++p); @@ -896,7 +902,7 @@ callcompfunc(char *s, char *fn) #endif } } - startauto = ((compinsert && + startauto = startauto || ((compinsert && !strcmp(compinsert, "automenu-unambiguous")) || (bashlistfirst && isset(AUTOMENU) && (!compinsert || !*compinsert))); |