From b0a659e71062cd80af82a0a60101d2a122da8cdb Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 5 Dec 2014 19:03:24 +0100 Subject: 33845: save correct cursor position with push-line from vi command mode --- ChangeLog | 5 +++++ Src/Zle/zle_hist.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 594f95179..7c15d969b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-12-05 Oliver Kiddle + + * 33845: Src/Zle/zle_hist.c: save correct cursor position with + push-line from vi command mode + 2014-12-05 Peter Stephenson * 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; -- cgit 1.4.1