Mercurial > vim
changeset 16700:46322a4e6028 v8.1.1352
patch 8.1.1352: undofile() reports wrong name
commit https://github.com/vim/vim/commit/e9ebc9a91cac357fd4888f4b71fdff7d97b41160
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 19 15:27:14 2019 +0200
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 https://github.com/vim/vim/issues/4392,
closes #4394)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 May 2019 15:30:08 +0200 |
parents | ca80f8eea726 |
children | be9769416254 |
files | src/evalfunc.c src/testdir/test_undo.vim src/version.c |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -15128,7 +15128,7 @@ f_undofile(typval_T *argvars UNUSED, typ } else { - char_u *ffname = FullName_save(fname, FALSE); + char_u *ffname = FullName_save(fname, TRUE); if (ffname != NULL) rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
--- a/src/testdir/test_undo.vim +++ b/src/testdir/test_undo.vim @@ -440,5 +440,10 @@ 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