fixed denote directory support
This commit is contained in:
@@ -48,7 +48,7 @@ function s:DenoteNotesByTag(tag)
|
||||
" Clear location list
|
||||
call denote#loclist#clear()
|
||||
" Find files
|
||||
let files = glob(t:denote_directory .. "*_" .. a:tag .. "*", 0, v:true)->filter('v:val =~ "_' .. a:tag .. '\\(==\\|@@\\|__\\|_\\|\\.\\)"')
|
||||
let files = glob(t:denote_directory .. "*_" .. a:tag .. "*", 0, v:true)->filter('v:val->split("/")[-1] =~ "_' .. a:tag .. '\\(==\\|@@\\|__\\|_\\|\\.\\)"')
|
||||
" Populate location list
|
||||
let locTitle="Denote notes: " .. a:tag
|
||||
call setloclist(0, [], 'r',
|
||||
@@ -72,10 +72,10 @@ function s:DenoteNotes(search)
|
||||
echom "Denote directory not specified, see |vim-denote|."
|
||||
return
|
||||
endif
|
||||
let s = substitute(" " .. a:search .. " ", " ", "*", "g")
|
||||
" Clear location list
|
||||
call denote#loclist#clear()
|
||||
" Find files
|
||||
let s = substitute(" " .. a:search .. " ", " ", "*", "g")
|
||||
let files = glob(t:denote_directory .. s, 0, v:true)
|
||||
" Populate location list
|
||||
let locTitle="Denote notes search:" .. a:search
|
||||
|
||||
Reference in New Issue
Block a user