From b83f0e229097626fa8e667486c48d7a3139d2e4a Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 22 Feb 2005 13:12:35 +0000 Subject: Andrej: 20838: get ZLE_UNICODE_SUPPORT basically working --- Src/Zle/zle_misc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Src/Zle/zle_misc.c') diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 081c720cd..2c7c364a2 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -61,9 +61,13 @@ mod_export int selfinsert(UNUSED(char **args)) { #ifdef ZLE_UNICODE_SUPPORT + /* wint_t and wchar_t not neccessarily the same size */ + wchar_t tmp; + if (!lastchar_wide_valid) getrestchar(lastchar); - doinsert(&lastchar_wide, 1); + tmp = lastchar_wide; + doinsert(&tmp, 1); #else char s = lastchar; doinsert(&s, 1); @@ -921,7 +925,7 @@ executenamedcommand(char *prmt) #ifdef ZLE_UNICODE_SUPPORT if (!lastchar_wide_valid) getrestchar(0); - if (iswcntrl(lastchar)) + if (iswcntrl(lastchar_wide)) #else if (icntrl(lastchar)) #endif -- cgit 1.4.1