Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: vi-forward-char at end of buffer
- X-seq: zsh-workers 33519
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: vi-forward-char at end of buffer
- Date: Thu, 23 Oct 2014 21:45:17 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1414093518; bh=qMwl10mt/Pi6XmcoC7Kf6aFAxJha8KIr/xLcDjAQcDg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=Y+KazSkJo2gHPVKS4qwwPWSNYvNHqr6idRsvHD00T2q3/X0/7Abnw+rwv3y0JBN5V2ZBiCmMbGV/DxYDCaKKs2i0zXaEWjeMFcP7CQFlw9IEuBDPElM6219Srwb7piecyHUjM7/RQry/5LPwZuatKD70Ld8fdkEWKdOVzxeQs3c=
- 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
It is supposed to be possible to combine l with keys like y, c and d to
cut the last character in the buffer. This fixes it.
Oliver
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index 7312b3f..35e4193 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -599,7 +599,7 @@ vimatchbracket(UNUSED(char **args))
int
viforwardchar(char **args)
{
- int lim = findeol() - invicmdmode();
+ int lim = findeol() - invicmdmode() + virangeflag;
int n = zmult;
if (n < 0) {
diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
index 507107e..d275372 100644
--- a/Test/X02zlevi.ztst
+++ b/Test/X02zlevi.ztst
@@ -10,6 +10,11 @@
%test
+ zletest $'goox\ecld'
+0:change last character in buffer
+>BUFFER: good
+>CURSOR: 4
+
zletest $'yankee doodle\ebhDyy0"1P'
0:paste register 1 to get last deletion
>BUFFER: doodleyankee
Messages sorted by:
Reverse Date,
Date,
Thread,
Author