From b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 11:57:56 +0100 Subject: 32436: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses --- Src/Zle/complist.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Src') 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'; -- cgit v1.2.3 From 97115e0e7f33378390aabd3c15d0cd69bf8d191c Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 12:14:01 +0100 Subject: 32448: fix seg fault if $WIDGET is accessed after recursive-edit is interrupted --- ChangeLog | 2 ++ Src/Zle/zle_params.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/ChangeLog b/ChangeLog index cf4e223d3..78ba84809 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-03-03 Oliver Kiddle + * 32448: Src/Zle/zle_params.c: fix seg fault after recursive-edit + * 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete: add new show-ambiguity style 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 : ""; } /**/ -- cgit v1.2.3 From f62bd9c06c76b2b34a5e5454aa6f8617c7289b30 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 12:17:28 +0100 Subject: 32450: make get-line widget set the history number that was saved with the line --- ChangeLog | 3 +++ Src/Zle/zle_hist.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'Src') diff --git a/ChangeLog b/ChangeLog index 78ba84809..af2fac8d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-03-03 Oliver Kiddle + * 32450: Src/Zle/zle_hist.c: make get-line set the history + number that was saved with the line + * 32448: Src/Zle/zle_params.c: fix seg fault after recursive-edit * 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete: 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; } -- cgit v1.2.3