diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-04-23 21:08:31 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-04-23 21:08:31 +0000 |
commit | 62b7e68a63650922463c52b108cbac397909312e (patch) | |
tree | 30365da99b4c8f4a2415eda96a42ddf3d6cbccd3 /Src/Zle/zle_misc.c | |
parent | ed1029afab41344e6d665cf7f7a5b90e9420f142 (diff) | |
download | zsh-62b7e68a63650922463c52b108cbac397909312e.tar.gz zsh-62b7e68a63650922463c52b108cbac397909312e.tar.xz zsh-62b7e68a63650922463c52b108cbac397909312e.zip |
unposted: fix overwrite without MULTIBYTE_SUPPORT
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r-- | Src/Zle/zle_misc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 554830244..8379b2333 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -49,7 +49,9 @@ doinsert(ZLE_STRING_T zstr, int len) if (insmode) spaceinline(m * len); - else { + else +#ifdef MULTIBYTE_SUPPORT + { int pos = zlecs, diff, i; /* @@ -94,6 +96,10 @@ doinsert(ZLE_STRING_T zstr, int len) shiftchars(zlecs, diff); } } +#else + if (zlecs + m * len > zlell) + spaceinline(zlecs + m * len - zlell); +#endif while (m--) for (s = zstr, count = len; count; s++, count--) zleline[zlecs++] = *s; |