about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-12-05 19:03:24 +0100
committerOliver Kiddle <opk@zsh.org>2014-12-05 20:13:32 +0100
commitb0a659e71062cd80af82a0a60101d2a122da8cdb (patch)
tree294d73e87e0122ef33a05a7a2770f400622611e2
parent02a8a8c7e4fea2c368098a4ea466240046200eaa (diff)
downloadzsh-b0a659e71062cd80af82a0a60101d2a122da8cdb.tar.gz
zsh-b0a659e71062cd80af82a0a60101d2a122da8cdb.tar.xz
zsh-b0a659e71062cd80af82a0a60101d2a122da8cdb.zip
33845: save correct cursor position with push-line from vi command mode
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_hist.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 594f95179..7c15d969b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-05  Oliver Kiddle  <opk@zsh.org>
+
+	* 33845: Src/Zle/zle_hist.c: save correct cursor position with
+	push-line from vi command mode
+
 2014-12-05  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 33866: Completion/compinit: need multifuncdef for TRAPINT
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index bf7b5f46d..9f65994dc 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -821,6 +821,8 @@ pushline(UNUSED(char **args))
     zpushnode(bufstack, zlelineasstring(zleline, zlell, 0, NULL, NULL, 0));
     while (--n)
 	zpushnode(bufstack, ztrdup(""));
+    if (invicmdmode())
+	INCCS();
     stackcs = zlecs;
     *zleline = ZWC('\0');
     zlell = zlecs = 0;