aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-12-26 14:29:32 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-12-26 14:29:32 -0500
commit775361728a4b71e696b422a20c57e6ee0d538c13 (patch)
tree8d80768ad44b11cb964c36e280eb78c01668deec /src/nvim/ops.c
parentcab88790bcf8fa4ae5a634b1ccaf84d337fa47e2 (diff)
parent28d3923bd8123b0e57f1f9ffef57356f19476915 (diff)
downloadrneovim-775361728a4b71e696b422a20c57e6ee0d538c13.tar.gz
rneovim-775361728a4b71e696b422a20c57e6ee0d538c13.tar.bz2
rneovim-775361728a4b71e696b422a20c57e6ee0d538c13.zip
Merge pull request #1734 from fwalch/small-patches
vim-patch: Multiple small patches (4)
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c8
1 files changed, 5 insertions, 3 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 */