Verbatim matching of path prefix

Closes #146.
This commit is contained in:
Marco Hinz 2015-01-30 13:08:00 +01:00
parent 62094fab84
commit 66083493ed

View file

@ -401,9 +401,10 @@ endfunction
" Function: s:filter_oldfiles {{{1 " Function: s:filter_oldfiles {{{1
function! s:filter_oldfiles(path_prefix, path_format) abort function! s:filter_oldfiles(path_prefix, path_format) abort
let counter = s:numfiles let path_prefix = '\V'. escape(a:path_prefix, '\')
let entries = {} let counter = s:numfiles
let oldfiles = [] let entries = {}
let oldfiles = []
for fname in v:oldfiles for fname in v:oldfiles
if counter <= 0 if counter <= 0
@ -420,7 +421,7 @@ function! s:filter_oldfiles(path_prefix, path_format) abort
continue continue
endif endif
if match(absolute_path, a:path_prefix) if match(absolute_path, path_prefix)
continue continue
endif endif