summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-11-25 18:51:00 +0100
committerAxel Beckert <abe@deuxchevaux.org>2015-11-25 18:51:00 +0100
commit317ec32cb1cbd15b31e17bcb07f09c52cd37c44a (patch)
tree88a02c853dfafd82a2d551d862d8dfb056b1bee6 /Src/Zle/zle_main.c
parent1637291aaea12ddcfd549d50d49c480185995c1a (diff)
parentcce4261a3c6f4bf78b483db61623c80e3c98d10b (diff)
downloadzsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.tar.gz
zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.zip
Merge tag 'zsh-5.1.1-test-1' into debian
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index ec3d2c354..593d636cc 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -933,7 +933,7 @@ getfullchar(int do_keytmout)
int inchar = getbyte((long)do_keytmout, NULL);
#ifdef MULTIBYTE_SUPPORT
- return getrestchar(inchar);
+ return getrestchar(inchar, NULL, NULL);
#else
return inchar;
#endif
@@ -951,7 +951,7 @@ getfullchar(int do_keytmout)
/**/
mod_export ZLE_INT_T
-getrestchar(int inchar)
+getrestchar(int inchar, char *outstr, int *outcount)
{
char c = inchar;
wchar_t outchar;
@@ -965,6 +965,8 @@ getrestchar(int inchar)
*/
lastchar_wide_valid = 1;
+ if (outcount)
+ *outcount = 0;
if (inchar == EOF) {
/* End of input, so reset the shift state. */
memset(&mbs, 0, sizeof mbs);
@@ -1013,6 +1015,10 @@ getrestchar(int inchar)
return lastchar_wide = WEOF;
}
c = inchar;
+ if (outstr) {
+ *outstr++ = c;
+ (*outcount)++;
+ }
}
return lastchar_wide = (ZLE_INT_T)outchar;
}
@@ -1396,7 +1402,8 @@ execzlefunc(Thingy func, char **args, int set_bindk)
opts[XTRACE] = oxt;
sfcontext = osc;
endparamscope();
- lastcmd = 0;
+ lastcmd = w->flags;
+ w->flags = 0;
r = 1;
redup(osi, 0);
}
@@ -1975,7 +1982,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, "aAcef:hi:M:m:p:r:t:", NULL),
- BUILTIN("zle", 0, bin_zle, 0, -1, 0, "aAcCDFgGIKlLmMNrRTUw", NULL),
+ BUILTIN("zle", 0, bin_zle, 0, -1, 0, "aAcCDfFgGIKlLmMNrRTUw", NULL),
};
/* The order of the entries in this table has to match the *HOOK