about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_move.c2
-rw-r--r--Test/X02zlevi.ztst5
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 79e1701c8..1b5f77cba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-10-23  Oliver Kiddle  <opk@zsh.org>
 
+	* 33519: Src/Zle/zle_move.c, Test/X02zlevi.ztst: last character
+	in the buffer can be cut, changed or yanked using vi-forward-char
+
 	* 33518: Doc/Zsh/zle.yo, Src/Zle/zle.h, Src/Zle/zle_utils.c,
 	Src/Zle/zle_vi.c, Test/X02zlevi.ztst: add support for "_ vi
 	buffer and arguments to vi-set-buffer from a zle widget
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index 7312b3f20..35e419369 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 4a39442e1..b4426a8fb 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