summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-17 22:09:45 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-17 22:09:45 +0100
commit5e4e1b12998b1ed99138cad1c5da4d430f798547 (patch)
treeaee404f261c89b5ef780e506ef80ae829bfe7d1b /src/testdir
parenteb46f8fa14a586779f55b1c7f1648f559618322e (diff)
downloadvim-5e4e1b12998b1ed99138cad1c5da4d430f798547.zip
patch 8.0.0205: wrong behavior after :undojoin
Problem: After :undojoin some commands don't work properly, such as :redo. (Matthew Malcomson) Solution: Don't set curbuf->b_u_curhead. (closes #1390)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_undo.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index f2ac6a8ea..06732af71 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -176,7 +176,17 @@ func Test_undojoin()
call assert_equal(['aaaa', 'bbbb', 'cccc'], getline(2, '$'))
call feedkeys("u", 'xt')
call assert_equal(['aaaa'], getline(2, '$'))
- close!
+ bwipe!
+endfunc
+
+func Test_undojoin_redo()
+ new
+ call setline(1, ['first line', 'second line'])
+ call feedkeys("ixx\<Esc>", 'xt')
+ call feedkeys(":undojoin | redo\<CR>", 'xt')
+ call assert_equal('xxfirst line', getline(1))
+ call assert_equal('second line', getline(2))
+ bwipe!
endfunc
func Test_undo_write()