summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-02-11 19:32:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-02-11 19:32:21 +0000
commit459953f02973284288c933002fb5a9ef785b52ad (patch)
tree63503562f52cc40f54ce4267962f1f3c18dca96b
parent2c31feef4d7fef24a19e633fbf50b846aeaccb34 (diff)
downloadzsh-459953f02973284288c933002fb5a9ef785b52ad.tar.gz
zsh-459953f02973284288c933002fb5a9ef785b52ad.zip
28671: better cursor positioning after undo
-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 &&