From ddcfad47d09d61a5965c816b75e2f933f0ef5cd0 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Wed, 24 Apr 2013 09:28:14 +0200 Subject: [PATCH] use expand() in fname check Fixes a check because $VIMRUNTIME gives an expanded path and v:oldfiles does not. --- plugin/startify.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/startify.vim b/plugin/startify.vim index 1f2c489..ced941d 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -26,18 +26,18 @@ augroup END " Function: s:start {{{1 function! s:start() abort setfiletype startify - setlocal nonumber norelativenumber nobuflisted buftype=nofile - let cnt = 0 - call append('$', [' startify>', '', ' [e] ']) + let cnt = 0 if get(g:, 'startify_show_files', 1) && !empty(v:oldfiles) let numfiles = get(g:, 'startify_show_files_number', 10) call append('$', '') for fname in v:oldfiles - if !filereadable(expand(fname)) || (fname =~# $VIMRUNTIME .'/doc') || (fname =~# 'bundle/.*/doc') + if !filereadable(expand(fname)) + \ || (expand(fname) =~# $VIMRUNTIME .'/doc') + \ || (fname =~# 'bundle/.*/doc') continue endif call append('$', ' ['. cnt .']'. repeat(' ', 3 - strlen(string(cnt))) . fname)