summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-03-18 18:27:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-03-18 18:27:51 +0000
commit63f6742e9aae5238c83c3c7223a29e044e45d66f (patch)
tree1e0690016ad7d8718aef47bc6dc6a728177ccc32
parentbcdad28d3e03f3e70a5f3d6b414b9d08f651c65a (diff)
downloadzsh-63f6742e9aae5238c83c3c7223a29e044e45d66f.tar.gz
zsh-63f6742e9aae5238c83c3c7223a29e044e45d66f.tar.xz
zsh-63f6742e9aae5238c83c3c7223a29e044e45d66f.zip
21014: remember_edits() was broken
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_hist.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e3815e44..e3af31081 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-03-18  Peter Stephenson  <pws@csr.com>
 
+	* 21014: Src/Zle/zle_hist.c: remember_edits() was broken,
+	which meant that searching the current line didn't work.
+
 	* zsh-users/8609: Doc/Zsh/expn.yo: document order of (u), (o)
 	and (O) parameter expansion flags.
 
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index f187d171b..67827d530 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -107,7 +107,9 @@ remember_edits(void)
 	    ZS_memcmp(ent->zle_text, zleline, zlell) != 0) {
 	    if (ent->zle_text)
 		free(ent->zle_text);
-	    ent->zle_text = stringaszleline(ent->text, &ent->zle_len, NULL);
+	    ent->zle_text = zalloc(zlell * ZLE_CHAR_SIZE);
+	    ent->zle_len = zlell;
+	    ZS_memcpy(ent->zle_text, zleline, zlell);
 	}
     }
 }