From 0439e808cb0ca999218f8a466e4a9a57113f4e0c Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Wed, 24 Dec 2014 13:57:26 +0100 Subject: vim-patch:7.4.521 Problem: When using "vep" a mark is moved to the next line. (Maxi Padulo, Issue 283) Solution: Decrement the line number. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-521 --- src/nvim/ops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nvim/ops.c') diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 931b877a95..9b33b6732c 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2979,9 +2979,11 @@ do_put ( } if (VIsual_active) lnum++; - } while ( - VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum - ); + } while (VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum); + + if (VIsual_active) { /* reset lnum to the last visual line */ + lnum--; + } curbuf->b_op_end = curwin->w_cursor; /* For "CTRL-O p" in Insert mode, put cursor after last char */ -- cgit