Mercurial > vim
comparison src/testdir/test_undo.vim @ 22506:a6fe2e1ad5b0 v8.2.1801
patch 8.2.1801: undo file not found when using ":args" or ":next"
Commit: https://github.com/vim/vim/commit/55b419b871dd35f5b05dd2aed65f14461b493ba9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 4 19:56:39 2020 +0200
patch 8.2.1801: undo file not found when using ":args" or ":next"
Problem: Undo file not found when using ":args" or ":next".
Solution: Handle like editing another file. (closes https://github.com/vim/vim/issues/7072)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Oct 2020 20:00:03 +0200 |
parents | f27473034f26 |
children | 72e9b861bc92 |
comparison
equal
deleted
inserted
replaced
22505:6b21190550ad | 22506:a6fe2e1ad5b0 |
---|---|
394 call assert_fails('rundo Xundofile', 'E823:') | 394 call assert_fails('rundo Xundofile', 'E823:') |
395 | 395 |
396 call delete('Xundofile') | 396 call delete('Xundofile') |
397 endfunc | 397 endfunc |
398 | 398 |
399 func Test_undofile_next() | |
400 set undofile | |
401 new Xfoo.txt | |
402 execute "norm ix\<c-g>uy\<c-g>uz\<Esc>" | |
403 write | |
404 bwipe | |
405 | |
406 next Xfoo.txt | |
407 call assert_equal('xyz', getline(1)) | |
408 silent undo | |
409 call assert_equal('xy', getline(1)) | |
410 silent undo | |
411 call assert_equal('x', getline(1)) | |
412 bwipe! | |
413 | |
414 call delete('Xfoo.txt') | |
415 call delete('.Xfoo.txt.un~') | |
416 set undofile& | |
417 endfunc | |
418 | |
399 " Test for undo working properly when executing commands from a register. | 419 " Test for undo working properly when executing commands from a register. |
400 " Also test this in an empty buffer. | 420 " Also test this in an empty buffer. |
401 func Test_cmd_in_reg_undo() | 421 func Test_cmd_in_reg_undo() |
402 enew! | 422 enew! |
403 let @a = "Ox\<Esc>jAy\<Esc>kdd" | 423 let @a = "Ox\<Esc>jAy\<Esc>kdd" |