From 8a818381cfa843f6bdc25e3517500da31d63c282 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sat, 12 Sep 2015 20:49:13 -0700 Subject: 36525: revert only the selfinsert() bit of 36496 selfinsert() may be called with incomplete wide character processing from places other than getkeymapcmd() --- Src/Zle/zle_misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 297dc4ca8..0483f758d 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -115,7 +115,10 @@ selfinsert(UNUSED(char **args)) ZLE_CHAR_T tmp; #ifdef MULTIBYTE_SUPPORT - DPUTS(!lastchar_wide_valid, "keybuf did not read full wide character"); + /* may be redundant with getkeymapcmd(), but other widgets call here too */ + if (!lastchar_wide_valid) + if (getrestchar(lastchar, NULL, NULL) == WEOF) + return 1; #endif tmp = LASTFULLCHAR; doinsert(&tmp, 1); -- cgit 1.4.1