about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_utils.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b759532a..f01074d31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-02-11  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 28671: Src/Zle/zle_utils.c: better cursor positioning
+	after undo.
+
 	* users/15738: Functions/Zle/modify-current-argument: better
 	positioning of the cursor after the operation.
 
@@ -14192,5 +14195,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5195 $
+* $Revision: 1.5196 $
 *****************************************************
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 291bdd3cb..5275bdbf6 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -1085,8 +1085,10 @@ mkundoent(void)
     struct change *ch;
 
     UNMETACHECK();
-    if(lastll == zlell && !ZS_memcmp(lastline, zleline, zlell))
+    if(lastll == zlell && !ZS_memcmp(lastline, zleline, zlell)) {
+	lastcs = zlecs;
 	return;
+    }
     for(pre = 0; pre < sh && zleline[pre] == lastline[pre]; )
 	pre++;
     for(suf = 0; suf < sh - pre &&