diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2014-03-03 23:52:20 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-03-03 23:52:20 -0800 |
commit | ff6d8115efaa8d50ec107508c8678ec49d300ed6 (patch) | |
tree | f05ff427c1665d115c903f2f203359f9f730f4c7 /Src | |
parent | e6d99759e8aff6f17ff08d977c7e7471ac0ebec5 (diff) | |
parent | 3c25cb29aba4d4c1a907aa29db48c36d8dbac18e (diff) | |
download | zsh-ff6d8115efaa8d50ec107508c8678ec49d300ed6.tar.gz zsh-ff6d8115efaa8d50ec107508c8678ec49d300ed6.tar.xz zsh-ff6d8115efaa8d50ec107508c8678ec49d300ed6.zip |
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complist.c | 17 | ||||
-rw-r--r-- | Src/Zle/zle_hist.c | 4 | ||||
-rw-r--r-- | Src/Zle/zle_params.c | 2 |
3 files changed, 20 insertions, 3 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index b852ee99f..5e5ba9f20 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -383,12 +383,25 @@ getcoldef(char *s) } else if (*s == '=') { char *p = ++s, *t, *cols[MAX_POS]; int ncols = 0; + int nesting = 0; Patprog prog; /* This is for a pattern. */ - while (*s && *s != '=') - s++; + while (*s && (nesting || *s != '=')) { + switch (*s++) { + case '\\': + if (*s) + s++; + break; + case '(': + nesting++; + break; + case ')': + nesting--; + break; + } + } if (!*s) return s; *s++ = '\0'; diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index bd5bc36d5..44b39d186 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -890,6 +890,10 @@ zgetline(UNUSED(char **args)) free(s); free(lineadd); clearlist = 1; + if (stackhist != -1) { + histline = stackhist; + stackhist = -1; + } } return 0; } diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index a9bbf136a..5845207fa 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -363,7 +363,7 @@ get_prebuffer(UNUSED(Param pm)) static char * get_widget(UNUSED(Param pm)) { - return bindk->nam; + return bindk ? bindk->nam : ""; } /**/ |