diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-09 01:58:54 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-09 01:58:54 -0500 |
commit | b9701c2a2b7b4633e894ad62955e0a0039dc0f95 (patch) | |
tree | 970a236df8b1ab30b5866487ff00f4e49c7c71bf /src/nvim/normal.c | |
parent | 17ae27190d4589b2a35f44bc6c8b552f4bf06d4e (diff) | |
parent | 52692d3cd3e682a4116d3cec1fcf05880f0c77a1 (diff) | |
download | rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.gz rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.bz2 rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.zip |
Merge #4152 'vim-patch:7.4.{798,800,805,810,811,814,815,816,817,820,825}'.
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 9a9cf50e48..4458c8bd5b 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7798,20 +7798,23 @@ static void get_op_vcol( } getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol); - getvvcol(curwin, &(oap->end), &start, NULL, &end); + if (!redo_VIsual_busy) { + getvvcol(curwin, &(oap->end), &start, NULL, &end); - if (start < oap->start_vcol) { - oap->start_vcol = start; - } - if (end > oap->end_vcol) { - if (initial && *p_sel == 'e' - && start >= 1 - && start - 1 >= oap->end_vcol) { - oap->end_vcol = start - 1; - } else { - oap->end_vcol = end; + if (start < oap->start_vcol) { + oap->start_vcol = start; + } + if (end > oap->end_vcol) { + if (initial && *p_sel == 'e' + && start >= 1 + && start - 1 >= oap->end_vcol) { + oap->end_vcol = start - 1; + } else { + oap->end_vcol = end; + } } } + // if '$' was used, get oap->end_vcol from longest line if (curwin->w_curswant == MAXCOL) { curwin->w_cursor.col = MAXCOL; |