From 03de6ee94df6824dec19f6392d83bb6f65cd911f Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 2 Sep 2014 15:06:52 +0200 Subject: [PATCH] Fix filenames with spaces - again References #102. --- autoload/startify.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 67e733f..46f0538 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -298,7 +298,7 @@ function! s:show_dir(cnt) abort let entries = {} let cwd = escape(getcwd(), '\') let files = filter(map(copy(v:oldfiles), - \ 'glob(fnameescape(fnamemodify(resolve(v:val), ":p")))'), 'match(v:val, cwd) == 0') + \ 'glob(fnamemodify(resolve(v:val), ":p"))'), 'match(v:val, cwd) == 0') if !empty(files) if exists('s:last_message') @@ -321,7 +321,7 @@ function! s:show_dir(cnt) abort let display_path = fnamemodify(abs_path, s:relative_path ? ':.' : ':p:~') call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . display_path) - execute 'nnoremap ' index ':edit' abs_path ' call check_user_options()' + execute 'nnoremap ' index ':edit' fnameescape(abs_path) ' call check_user_options()' let cnt += 1 let num -= 1 @@ -352,7 +352,7 @@ function! s:show_files(cnt) abort let entries = {} for fname in v:oldfiles - let abs_path = glob(fnameescape(fnamemodify(resolve(fname), ':p'))) + let abs_path = glob(fnamemodify(resolve(fname), ':p')) " filter duplicates, bookmarks and entries from the skiplist if has_key(entries, abs_path) @@ -367,7 +367,7 @@ function! s:show_files(cnt) abort let display_path = fnamemodify(abs_path, s:relative_path ? ':.' : ':p:~') call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . display_path) - execute 'nnoremap ' index ':edit' abs_path ' call check_user_options()' + execute 'nnoremap ' index ':edit' fnameescape(abs_path) ' call check_user_options()' let cnt += 1 let num -= 1