Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: cursor position with push-line from vi command mode
- X-seq: zsh-workers 33845
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: cursor position with push-line from vi command mode
- Date: Thu, 04 Dec 2014 18:37:23 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1417714645; bh=k3CVLiIYK5iRjok/KBSue1GB+SUfUK7qsXo+2W0jQ3U=; h=From:To:Subject:Date:From:Subject; b=QwLZDSOwKY3w0MR8+i/O65kHmX54UH40ybegX9VxqS34j0FZY5/FcMQKaTplKxPwf6U9bwJhulW8HnKrwV1u7LPdnyFlTB184n84UZdLY5Axp4/2XGyo2s3DSmjPCEtHbR2xvb0ARCPXxOz2Q6dFF27rRguieBfm0/5O8KtthPKchWn8s54slMFtu+STYeYF+BKzBmmdR84m+Tfk1jqcZR3TAZTot+ZxYXd+NX/R+nia5oHK+8ixptJTIS9Ru9eMMgr+/HuDljM7z8Y2dKLK/xODz04Aomw0k0xpAH/PyKmWuQZ1gE0vEaPZUUhnJJTQjfv7sYxw4h/3LEwdn2gFlw==
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=mUsZk2qetvtpSbwsncxeIY1lHlPBlk1GgF82buAfq3rDxtDUy1DsVnS2ZE5/MVe40aM0PB6WcsoB2nCuNUzasK8wmc3laOMF8WYSSxsYTdzJteZVZnTHjeEOZz4vfoLQxoq0SM4sMdd0k85EF2PBIvQh6JcA1jhMMBwbHWMOKebDqMxhsHI1w7y61BNZICcN1LSOo/2+VxO1niuUjabcgFtMELuM/s72N7yx/JuVBc4DpVAl/BgdfdjyT09kM2lgj+PUeVWX+xS0IINs7CBt7kICS0kjQItT829/JHkfweUnvsO6JXcP8nk24absS19fz+JL2w0cdz0Bx8cqA8ZZWw==;
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author