From 267f945ffee8b7820e1e9dc7f483d1ddac3870bf Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 14 Apr 2016 15:52:50 +0200 Subject: 38287: fix position for the end of a visual selection range for the cursor on an empty last line in the buffer --- Src/Zle/zle_vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src') 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 * -- cgit 1.4.1