summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-01-05 13:12:56 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-01-05 13:12:56 +0000
commit104fccc31e3d4bea207a469c53accd74920b93b2 (patch)
tree8790053d9042a03c66f9181397c35843ea5afd37 /Src/Zle
parent2a1d7a11aafb01ccae97f6f6bb21e1f9ec249af8 (diff)
downloadzsh-104fccc31e3d4bea207a469c53accd74920b93b2.tar.gz
zsh-104fccc31e3d4bea207a469c53accd74920b93b2.tar.xz
zsh-104fccc31e3d4bea207a469c53accd74920b93b2.zip
24362: problem redrawing line with multibyte character first
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_refresh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 7983c7770..a705f67cf 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1055,6 +1055,18 @@ refreshline(int ln)
 	ccs = lpromptw;
     }
 
+#ifdef MULTIBYTE_SUPPORT
+    /*
+     * Realign to a real character after any jiggery pokery at
+     * the start of the line.
+     */
+    while (*nl == WEOF) {
+	nl++, ccs++, vcs++;
+	if (*ol)
+	    ol++;
+    }
+#endif
+
 /* 3: main display loop - write out the buffer using whatever tricks we can */
 
     for (;;) {