summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_misc.c8
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;