diff --git a/autoload/startify.vim b/autoload/startify.vim index 239d6f0..e5db03b 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -292,7 +292,7 @@ function! s:show_dir(cnt) abort let entries[fullpath] = 1 let index = s:get_index_as_string(cnt) - let display_fname = s:relative_path ? fnamemodify(fname, ':.') : fname + let display_fname = s:relative_path ? fnamemodify(glob(fname), ':.') : fnamemodify(glob(fname), ':p:~') call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . display_fname) execute 'nnoremap ' index ':edit' fnameescape(fname) ' call check_user_options()' @@ -338,7 +338,7 @@ function! s:show_files(cnt) abort let entries[fullpath] = 1 let index = s:get_index_as_string(cnt) - let display_fname = s:relative_path ? fnamemodify(fname, ':.') : fname + let display_fname = s:relative_path ? fnamemodify(glob(fname), ':.') : fnamemodify(glob(fname), ':p:~') call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . display_fname) execute 'nnoremap ' index ':edit' fnameescape(fname) ' call check_user_options()'