From 66083493ed545e29eaef2c3faadd73189cc4665e Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 30 Jan 2015 13:08:00 +0100 Subject: [PATCH] Verbatim matching of path prefix Closes #146. --- autoload/startify.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 7171eba..4f36cff 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -401,9 +401,10 @@ endfunction " Function: s:filter_oldfiles {{{1 function! s:filter_oldfiles(path_prefix, path_format) abort - let counter = s:numfiles - let entries = {} - let oldfiles = [] + let path_prefix = '\V'. escape(a:path_prefix, '\') + let counter = s:numfiles + let entries = {} + let oldfiles = [] for fname in v:oldfiles if counter <= 0 @@ -420,7 +421,7 @@ function! s:filter_oldfiles(path_prefix, path_format) abort continue endif - if match(absolute_path, a:path_prefix) + if match(absolute_path, path_prefix) continue endif