summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-23 21:08:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-23 21:08:31 +0000
commit62b7e68a63650922463c52b108cbac397909312e (patch)
tree30365da99b4c8f4a2415eda96a42ddf3d6cbccd3
parented1029afab41344e6d665cf7f7a5b90e9420f142 (diff)
downloadzsh-62b7e68a63650922463c52b108cbac397909312e.tar.gz
zsh-62b7e68a63650922463c52b108cbac397909312e.tar.xz
zsh-62b7e68a63650922463c52b108cbac397909312e.zip
unposted: fix overwrite without MULTIBYTE_SUPPORT
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_misc.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 319d8eb62..dc701050a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-23  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* unposted: Src/Zle/zle_misc.c: overwrite mode without
+	MULTIBYTE_SUPPORT should be as before.
+
 2008-04-23  Peter Stephenson  <pws@csr.com>
 
 	* 24867: Src/system.h: looks like we need _XOPEN_SOURCE_EXTENDED
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;