aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.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/search.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/search.c')
-rw-r--r--src/nvim/search.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index ef98944a06..5158e6cd86 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -3294,10 +3294,11 @@ again:
if (VIsual_active) {
/* If the end is before the start there is no text between tags, select
* the char under the cursor. */
- if (lt(end_pos, start_pos))
+ if (lt(end_pos, start_pos)) {
curwin->w_cursor = start_pos;
- else if (*p_sel == 'e')
- ++curwin->w_cursor.col;
+ } else if (*p_sel == 'e') {
+ inc_cursor();
+ }
VIsual = start_pos;
VIsual_mode = 'v';
redraw_curbuf_later(INVERTED); /* update the inversion */