diff options
-rw-r--r-- | src/ops.c | 4 | ||||
-rw-r--r-- | src/testdir/test_visual.vim | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 13 insertions, 2 deletions
@@ -1814,7 +1814,7 @@ op_change(oparg_T *oap) */ if (oap->block_mode && oap->start.lnum != oap->end.lnum && !got_int) { - size_t ins_len; + int ins_len; // Auto-indenting may have changed the indent. If the cursor was past // the indent, exclude that indent change from the inserted text. @@ -1827,7 +1827,7 @@ op_change(oparg_T *oap) bd.textcol += new_indent - pre_indent; } - ins_len = ml_get_len(oap->start.lnum) - pre_textlen; + ins_len = (int)ml_get_len(oap->start.lnum) - pre_textlen; if (ins_len > 0) { // Subsequent calls to ml_get() flush the firstline data - take a diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 95ac9a6a83..3750ebf6b9 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -2705,4 +2705,13 @@ func Test_visual_block_cursor_delete() bwipe! endfunc +func Test_visual_block_cursor_insert_enter() + new + call setline(1, ['asdf asdf', 'asdf asdf', 'asdf asdf', 'asdf asdf']) + call cursor(1, 5) + exe ":norm! \<c-v>3jcw\<cr>" + call assert_equal(['asdfw', 'asdf', 'asdfasdf', 'asdfasdf', 'asdfasdf'], getline(1, '$')) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 12dc57596c..cc2494521d 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 477, +/**/ 476, /**/ 475, |