From 4d885829f69edc404fd5a7a54efb21085ccb1d7a Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Wed, 6 Feb 2019 12:26:58 +0100 Subject: [PATCH] Skip earlier to prevent I/O on slow file systems Fixes https://github.com/mhinz/vim-startify/issues/353 --- autoload/startify.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autoload/startify.vim b/autoload/startify.vim index b3a8f45..0aacf38 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -550,6 +550,11 @@ function! s:filter_oldfiles(path_prefix, path_format, use_env) abort break endif + if s:is_in_skiplist(fname) + " https://github.com/mhinz/vim-startify/issues/353 + continue + endif + let absolute_path = fnamemodify(resolve(fname), ":p") " filter duplicates, bookmarks and entries from the skiplist if has_key(entries, absolute_path) @@ -601,6 +606,11 @@ function! s:filter_oldfiles_unsafe(path_prefix, path_format, use_env) abort break endif + if s:is_in_skiplist(fname) + " https://github.com/mhinz/vim-startify/issues/353 + continue + endif + let absolute_path = glob(fnamemodify(fname, ":p")) if empty(absolute_path) \ || has_key(entries, absolute_path)