diff options
-rw-r--r-- | src/testdir/test_undo.vim | 33 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim index e521e3540..fb1cdc836 100644 --- a/src/testdir/test_undo.vim +++ b/src/testdir/test_undo.vim @@ -129,6 +129,39 @@ func Test_undo_del_chars() close! endfunc +func Test_undolist() + new + set ul=100 + + let a=execute('undolist') + call assert_equal("\nNothing to undo", a) + + " 1 leaf (2 changes). + call feedkeys('achange1', 'xt') + call feedkeys('achange2', 'xt') + let a=execute('undolist') + call assert_match("^\nnumber changes when *saved\n *2 *2 .*$", a) + + " 2 leaves. + call feedkeys('u', 'xt') + call feedkeys('achange3\<Esc>', 'xt') + let a=execute('undolist') + call assert_match("^\nnumber changes when *saved\n *2 *2 *.*\n *3 *2 .*$", a) + close! +endfunc + +func Test_U_command() + new + set ul=100 + call feedkeys("achange1\<Esc>", 'xt') + call feedkeys("achange2\<Esc>", 'xt') + norm! U + call assert_equal('', getline(1)) + norm! U + call assert_equal('change1change2', getline(1)) + close! +endfunc + func Test_undojoin() new call feedkeys("Goaaaa\<Esc>", 'xt') diff --git a/src/version.c b/src/version.c index f0f9c827f..95eec668f 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2296, +/**/ 2295, /**/ 2294, |