diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-21 04:17:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-21 04:17:23 +0200 |
| commit | d7594f9c33d1a855a5a071e6191e3ccd0a0b44ee (patch) | |
| tree | abe6b2b203676374c331aa114753e8b80687c7c0 /src/nvim/testdir | |
| parent | a3a9ef9ad4ecf6ee1db98148d165755043d3ff04 (diff) | |
| parent | b5b8966760773421b285ee8b63015fc767bca18d (diff) | |
| download | rneovim-d7594f9c33d1a855a5a071e6191e3ccd0a0b44ee.tar.gz rneovim-d7594f9c33d1a855a5a071e6191e3ccd0a0b44ee.tar.bz2 rneovim-d7594f9c33d1a855a5a071e6191e3ccd0a0b44ee.zip | |
Merge #7420 'vim-patch:8.0.0962, 8.0.1019'
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_virtualedit.vim | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index d55170c27c..535e290a34 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -34,4 +34,5 @@ source test_taglist.vim source test_true_false.vim source test_unlet.vim source test_utf8.vim +source test_virtualedit.vim source test_window_cmd.vim diff --git a/src/nvim/testdir/test_virtualedit.vim b/src/nvim/testdir/test_virtualedit.vim new file mode 100644 index 0000000000..2b8849f488 --- /dev/null +++ b/src/nvim/testdir/test_virtualedit.vim @@ -0,0 +1,43 @@ +" Tests for 'virtualedit'. + +func Test_yank_move_change() + new + call setline(1, [ + \ "func foo() error {", + \ "\tif n, err := bar();", + \ "\terr != nil {", + \ "\t\treturn err", + \ "\t}", + \ "\tn = n * n", + \ ]) + set virtualedit=all + set ts=4 + function! MoveSelectionDown(count) abort + normal! m` + silent! exe "'<,'>move'>+".a:count + norm! `` + endfunction + + xmap ]e :<C-U>call MoveSelectionDown(v:count1)<CR> + 2 + normal 2gg + normal J + normal jVj + normal ]e + normal ce + bwipe! + set virtualedit= + set ts=8 +endfunc + +func Test_paste_end_of_line() + new + set virtualedit=all + call setline(1, ['456', '123']) + normal! gg0"ay$ + exe "normal! 2G$lllA\<C-O>:normal! \"agP\r" + call assert_equal('123456', getline(2)) + + bwipe! + set virtualedit= +endfunc |