about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-11-21 15:22:12 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-11-21 15:22:12 +0000
commit09a854378a739840138eb959da329945958a6a18 (patch)
tree0ddff43ff6d36f9e8c6d4fef0e4b47c579fdc3d3
parent5930b8fa6b706e390e21b24aaf57fc6976708349 (diff)
downloadzsh-09a854378a739840138eb959da329945958a6a18.tar.gz
zsh-09a854378a739840138eb959da329945958a6a18.tar.xz
zsh-09a854378a739840138eb959da329945958a6a18.zip
22009: another double-width character fix
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_refresh.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f3350b6fa..8f44b794a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-21  Peter Stephenson  <pws@csr.com>
+
+	* 22009: Src/Zle/zle_refresh.c: fix for double-width characters:
+	stop when we reach the NULL at the end of the new line.
+
 2005-11-18  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* users/9690: Completion/Unix/Command/_ssh: improved Hannu's
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index fbf241919..bd3875e19 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1201,6 +1201,12 @@ refreshline(int ln)
     /* we can't do any fancy tricks, so just dump the single character
        and keep on trying */
 #ifdef MULTIBYTE_SUPPORT
+	/*
+	 * in case we were tidying up a funny-width character when we
+	 * reached the end of the new line...
+	 */
+	if (!*nl)
+	    break;
 	do {
 #endif
 	    zputc(*nl);