about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-04-14 15:52:50 +0200
committerOliver Kiddle <opk@zsh.org>2016-04-14 15:52:50 +0200
commit267f945ffee8b7820e1e9dc7f483d1ddac3870bf (patch)
treec95c2e1080aa53bf24e96ea54147ffc4124b4538 /Src/Zle
parentc7eead3950d3d53dd0c4012b272aef024f7a4ea3 (diff)
downloadzsh-267f945ffee8b7820e1e9dc7f483d1ddac3870bf.tar.gz
zsh-267f945ffee8b7820e1e9dc7f483d1ddac3870bf.tar.xz
zsh-267f945ffee8b7820e1e9dc7f483d1ddac3870bf.zip
38287: fix position for the end of a visual selection range for the cursor on an empty last line in the buffer
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_vi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 86840bdd6..953af2401 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -255,7 +255,7 @@ getvirange(int wf)
     }
 
     /* visual selection mode needs to include additional position */
-    if (visual == 1 && invicmdmode())
+    if (visual == 1 && pos < zlell && invicmdmode())
 	INCPOS(pos);
 
     /* Was it a line-oriented move?  If so, the command will have set *