diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-22 13:12:35 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-22 13:12:35 +0000 |
commit | b83f0e229097626fa8e667486c48d7a3139d2e4a (patch) | |
tree | dd125c9521986e7a40e4d13a67db90757aee9ad5 /Src/Zle/zle_misc.c | |
parent | c8883a5a08e6a9c0fbb088acab11c1ef8788b3d8 (diff) | |
download | zsh-b83f0e229097626fa8e667486c48d7a3139d2e4a.tar.gz zsh-b83f0e229097626fa8e667486c48d7a3139d2e4a.tar.xz zsh-b83f0e229097626fa8e667486c48d7a3139d2e4a.zip |
Andrej: 20838: get ZLE_UNICODE_SUPPORT basically working
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r-- | Src/Zle/zle_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 |