aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_visual.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-01-26 22:39:45 +0100
committerGitHub <noreply@github.com>2022-01-26 22:39:45 +0100
commit6006e15e7ac055de1e87bbd12d17d017dfa8737f (patch)
tree642c79cdb1a78647d0ad400fb02e5b90fb67e996 /src/nvim/testdir/test_visual.vim
parent17e2938b100070d91bd956c8734760ca16f6d3f2 (diff)
parent540264306b6340bdd8133cd3307b169f7708c4d6 (diff)
downloadrneovim-6006e15e7ac055de1e87bbd12d17d017dfa8737f.tar.gz
rneovim-6006e15e7ac055de1e87bbd12d17d017dfa8737f.tar.bz2
rneovim-6006e15e7ac055de1e87bbd12d17d017dfa8737f.zip
Merge pull request #17205 from clason/vim-8.2.4214
Vim 8.2.{4214,4215,4217,4219} various illegal memory accesses
Diffstat (limited to 'src/nvim/testdir/test_visual.vim')
-rw-r--r--src/nvim/testdir/test_visual.vim33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim
index e1e7765e06..b087c88c35 100644
--- a/src/nvim/testdir/test_visual.vim
+++ b/src/nvim/testdir/test_visual.vim
@@ -1103,6 +1103,13 @@ func Test_visual_put_blockedit_zy_and_zp()
bw!
endfunc
+func Test_visual_block_yank_zy()
+ new
+ " this was reading before the start of the line
+ exe "norm o\<C-T>\<Esc>\<C-V>zy"
+ bwipe!
+endfunc
+
func Test_visual_block_with_virtualedit()
CheckScreendump
@@ -1151,5 +1158,31 @@ func Test_visual_reselect_with_count()
call delete('XvisualReselect')
endfunc
+" this was leaving the end of the Visual area beyond the end of a line
+func Test_visual_ex_copy_line()
+ new
+ call setline(1, ["aaa", "bbbbbbbbbxbb"])
+ /x
+ exe "normal ggvjfxO"
+ t0
+ normal gNU
+ bwipe!
+endfunc
+
+" This was leaving the end of the Visual area beyond the end of a line.
+" Set 'undolevels' to start a new undo block.
+func Test_visual_undo_deletes_last_line()
+ new
+ call setline(1, ["aaa", "ccc", "dyd"])
+ set undolevels=100
+ exe "normal obbbbbbbbbxbb\<Esc>"
+ set undolevels=100
+ /y
+ exe "normal ggvjfxO"
+ undo
+ normal gNU
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab