diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 19:59:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-11 19:59:37 +0100 |
| commit | f389196a344591da2f6cc2a63f4953e34316f954 (patch) | |
| tree | 8cce092c29f33ae109dcf61e12e822d84aa014c7 /src/nvim/testdir/test_undo.vim | |
| parent | 2cfc1b055bba6bb0f7e263a69079c7f52303a78a (diff) | |
| parent | f26a4d484b486019c90fc55af5e74e33de374bc4 (diff) | |
| download | rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.gz rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.bz2 rneovim-f389196a344591da2f6cc2a63f4953e34316f954.zip | |
Merge #7960 'vim patches'
Diffstat (limited to 'src/nvim/testdir/test_undo.vim')
| -rw-r--r-- | src/nvim/testdir/test_undo.vim | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 0f9f6c3310..2bc6073d52 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -3,7 +3,6 @@ " undo-able pieces. Do that by setting 'undolevels'. " Also tests :earlier and :later. -set belloff=all func Test_undotree() exe "normal Aabc\<Esc>" set ul=100 @@ -266,3 +265,26 @@ func Test_undofile_earlier() call delete('Xfile') call delete('Xundofile') endfunc + +" Test for undo working properly when executing commands from a register. +" Also test this in an empty buffer. +func Test_cmd_in_reg_undo() + enew! + let @a="Ox\<Esc>jAy\<Esc>kdd" + edit +/^$ test_undo.vim + normal @au + call assert_equal(0, &modified) + return + new + normal @au + call assert_equal(0, &modified) + only! + let @a='' +endfunc + +func Test_redo_empty_line() + new + exe "norm\x16r\x160" + exe "norm." + bwipe! +endfunc |