about summary refs log tree commit diff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-22 15:08:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-22 15:08:04 +0000
commit2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f (patch)
treea1725b9e9fba5cc1959b029167bd8137183cf092 /Src/Zle/zle_hist.c
parenta58d02fd2e11f8453b912859b2f774b6cadace4c (diff)
downloadzsh-2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f.tar.gz
zsh-2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f.tar.xz
zsh-2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f.zip
24861 (with tweaks): logic to use alternative wcwidth() if needed;
slightly improve test for overwriting with combining characters.
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 5af482f9e..91d2d1016 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1045,6 +1045,7 @@ doisearch(char **args, int dir)
 		free(last_line);
 	    last_line = ztrdup(zt.text);
 
+	    sbuf[sbptr] = '\0';
 	    for (;;) {
 		char *t;
 
@@ -1076,7 +1077,6 @@ doisearch(char **args, int dir)
 		 * First search for a(nother) match within the
 		 * current line, unless we've been told to skip it.
 		 */
-		sbuf[sbptr] = '\0';
 		if (!skip_line && ((sbuf[0] == '^') ?
 				   (t = (zlinecmp(zt.text, sbuf + 1) < sens
 					 ? zt.text : NULL)) :