1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +01:00

36525: revert only the selfinsert() bit of 36496

selfinsert() may be called with incomplete wide character processing from
places other than getkeymapcmd()
This commit is contained in:
Barton E. Schaefer 2015-09-12 20:49:13 -07:00
parent 9cb8c3f4b5
commit 8a818381cf
2 changed files with 8 additions and 1 deletions

View file

@ -5,6 +5,10 @@
2015-09-12 Barton E. Schaefer <schaefer@zsh.org>
* 36525: Src/Zle/zle_misc.c: revert only the selfinsert() bit of
36496 because selfinsert() may be called with incomplete wide
character processing from places other than getkeymapcmd()
* unposted: Functions/Zle/bracketed-paste-magic: revert 36483 as
multibyte is now handled by "zle .read-command"; adapt to new
default behavior of zle_highlight for paste

View file

@ -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);