summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r--Src/Zle/zle_misc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 1cb113a2d..aa8d1058d 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -64,7 +64,8 @@ selfinsert(UNUSED(char **args))
#ifdef MULTIBYTE_SUPPORT
if (!lastchar_wide_valid)
- getrestchar(lastchar);
+ if (getrestchar(lastchar) == WEOF)
+ return 1;
#endif
tmp = LASTFULLCHAR;
doinsert(&tmp, 1);
@@ -1018,6 +1019,9 @@ executenamedcommand(char *prmt)
#ifdef MULTIBYTE_SUPPORT
if (!lastchar_wide_valid)
getrestchar(lastchar);
+ if (lastchar_wide == WEOF)
+ feep = 1;
+ else
#endif
if (ZC_icntrl(LASTFULLCHAR))
feep = 1;