zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: cursor position with push-line from vi command mode
@ 2014-12-04 17:37 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2014-12-04 17:37 UTC (permalink / raw)
  To: Zsh workers

If you bind push-input in vi command mode, the later restored cursor
position doesn't allow for the cursor having moved back for vi command
mode. New command-lines are started in insert mode. This patch adds an
adjustment.

Oliver

diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index bf7b5f4..9f65994 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-04 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 17:37 PATCH: cursor position with push-line from vi command mode Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).