From 0439e808cb0ca999218f8a466e4a9a57113f4e0c Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Wed, 24 Dec 2014 13:57:26 +0100 Subject: [PATCH] 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 +++++--- src/nvim/version.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) 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 */ diff --git a/src/nvim/version.c b/src/nvim/version.c index b469d0e804..dc7c62305a 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -217,7 +217,7 @@ static int included_patches[] = { //524, //523 NA //522, - //521, + 521, 520, //519, 518,