summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_thingy.c
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2019-04-09 20:45:37 +0200
committerPeter Stephenson <p.stephenson@samsung.com>2019-04-10 09:41:04 +0100
commitc5519372808d78519e1bac2db165d19a34534f74 (patch)
tree45e5f952339bb9c97bb62e0f2907f5626ffc7186 /Src/Zle/zle_thingy.c
parentfe228c5984339a303c88279429ee52e5af58de05 (diff)
downloadzsh-c5519372808d78519e1bac2db165d19a34534f74.tar.gz
zsh-c5519372808d78519e1bac2db165d19a34534f74.zip
44215: Maintain LASTWIDGET across reset-prompt.
This avoids side effects of asynchronous notifications.
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r--Src/Zle/zle_thingy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 6b892b822..ce61db27b 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -703,7 +703,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
{
Thingy t;
struct modifier modsave = zmod;
- int ret, saveflag = 0, setbindk = 0, remetafy;
+ int ret, saveflag = 0, setbindk = 0, setlbindk, remetafy;
char *wname = *args++, *keymap_restore = NULL, *keymap_tmp;
if (!wname)
@@ -787,7 +787,8 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
* a vi range to detect a repeated key */
setbindk = setbindk ||
(t->widget && (t->widget->flags & (WIDGET_INT | ZLE_VIOPER)) == WIDGET_INT);
- ret = execzlefunc(t, args, setbindk);
+ setlbindk = t->widget && (t->widget->flags & ZLE_NOLAST) == ZLE_NOLAST;
+ ret = execzlefunc(t, args, setbindk, setlbindk);
unrefthingy(t);
if (saveflag)
zmod = modsave;