From 8b3c0b87ffdf88c7f299720c625f50cdf67c8b3a Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Sun, 19 May 2019 15:25:18 -0300 Subject: vim-patch:8.1.1352: undofile() reports wrong name Problem: Undofile() reports wrong name. (Francisco Giordano) Solution: Clean up the name before changing path separators. (closes vim/vim#4392, closes vim/vim#4394) https://github.com/vim/vim/commit/e9ebc9a91cac357fd4888f4b71fdff7d97b41160 --- src/nvim/testdir/test_undo.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index beb44f9699..08facb8344 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -389,6 +389,11 @@ funct Test_undofile() " Test undofile() with 'undodir' set to a non-existing directory. " call assert_equal('', undofile('Xundofoo')) + if isdirectory('/tmp') + set undodir=/tmp + call assert_equal('/tmp/%tmp%file', undofile('///tmp/file')) + endif + set undodir& endfunc -- cgit