aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-09-26 16:56:19 -0400
committerGitHub <noreply@github.com>2017-09-26 16:56:19 -0400
commite085a50c5982123a5321146b0f93fc1b353d127f (patch)
tree9d8ab10fbcc655537138749c0b31674ff1fcaa48 /src/nvim/search.c
parent5c25d65f4507a3967aa4605dbcd44905be2c0eea (diff)
parent006425b8b683711cfb4f89074034ec1fe2085d40 (diff)
downloadrneovim-e085a50c5982123a5321146b0f93fc1b353d127f.tar.gz
rneovim-e085a50c5982123a5321146b0f93fc1b353d127f.tar.bz2
rneovim-e085a50c5982123a5321146b0f93fc1b353d127f.zip
Merge pull request #7310 from ckelsel/vim-8.0.0330
vim-patch:8.0.0330
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 1bf2317d2a..387614fd09 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -3557,11 +3557,15 @@ extend:
--start_lnum;
if (VIsual_active) {
- /* Problem: when doing "Vipipip" nothing happens in a single white
- * line, we get stuck there. Trap this here. */
- if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum)
+ // Problem: when doing "Vipipip" nothing happens in a single white
+ // line, we get stuck there. Trap this here.
+ if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum) {
goto extend;
- VIsual.lnum = start_lnum;
+ }
+ if (VIsual.lnum != start_lnum) {
+ VIsual.lnum = start_lnum;
+ VIsual.col = 0;
+ }
VIsual_mode = 'V';
redraw_curbuf_later(INVERTED); /* update the inversion */
showmode();