Fix: count ignored when looking up diary frequency
When calling VimwikiMakeYesterdayDiary (or Tomorrow) the wiki_nr is looked up by vimwiki#diary#diary_date_link without access to the passed count, which would result in the creation of the file in the correct place, but with the diary_frequency of another wiki. Modify vimwiki#diary#diary_date_link to take a possible third argument as the wiki_nr+1 and modify the commands to pass <count> as the third argument. Fixes: #1365
This commit is contained in:
committed by
NobleRat
parent
65575fb103
commit
5d86b625f5
@@ -37,8 +37,12 @@ endfunction
|
||||
|
||||
function! vimwiki#diary#diary_date_link(...) abort
|
||||
" Return: <String> date
|
||||
|
||||
let wiki_nr = vimwiki#vars#get_bufferlocal('wiki_nr')
|
||||
if a:0 > 2
|
||||
" user supply wiki number as 1 indexed, not 0 indexed
|
||||
let wiki_nr = a:3 - 1
|
||||
else
|
||||
let wiki_nr = vimwiki#vars#get_bufferlocal('wiki_nr')
|
||||
endif
|
||||
if wiki_nr < 0 " this happens when called outside a wiki buffer
|
||||
let wiki_nr = 0
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user