瀏覽代碼

Skip earlier to prevent I/O on slow file systems

Fixes https://github.com/mhinz/vim-startify/issues/353
Marco Hinz 7 年之前
父節點
當前提交
4d885829f6
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      autoload/startify.vim

+ 10 - 0
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)