diff --git a/autoload/vimwiki/diary.vim b/autoload/vimwiki/diary.vim index b47e6c9..16f939b 100644 --- a/autoload/vimwiki/diary.vim +++ b/autoload/vimwiki/diary.vim @@ -37,8 +37,12 @@ endfunction function! vimwiki#diary#diary_date_link(...) abort " Return: 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 diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 8193381..b4819f3 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -4005,6 +4005,7 @@ Contributors and their Github usernames in roughly chronological order: - Julian Prein (@druckdev) - Luke Atkinson (@LukeDAtkinson) - Joe Planisky (@jplanisky) + - Bence Ferdinandy (@ferdinandyb) ============================================================================== @@ -4025,8 +4026,11 @@ This is somewhat experimental, and will probably be refined over time. New:~ * Issue #1279: Fix/Improvement: When re-wrap a long line in a definition - by 'gq' it should insert ':: ' at the new line - + by 'gq' it should insert ':: ' at the new line + +Fixed:~ + * Issue #1365: Fix: count ignored when looking up diary frequency + 2023.04.04~ @@ -4036,7 +4040,7 @@ Fixed:~ * PR #1324: Fix pressing escape in VimwikiGoto prompt (rddunphy) * Issue #1336: vimwiki#diary#calendar_sign throws an error when g:vimwiki_list is not set - + 2023.04.04~ New:~ diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim index 208540d..8d078ac 100644 --- a/plugin/vimwiki.vim +++ b/plugin/vimwiki.vim @@ -366,11 +366,11 @@ command! -count=0 VimwikiTabMakeDiaryNote command! -count=0 VimwikiMakeYesterdayDiaryNote \ call vimwiki#diary#make_note(, 0, - \ vimwiki#diary#diary_date_link(localtime(), -1)) + \ vimwiki#diary#diary_date_link(localtime(), -1, )) command! -count=0 VimwikiMakeTomorrowDiaryNote \ call vimwiki#diary#make_note(, 0, - \ vimwiki#diary#diary_date_link(localtime(), 1)) + \ vimwiki#diary#diary_date_link(localtime(), 1, )) command! VimwikiDiaryGenerateLinks \ call vimwiki#diary#generate_diary_section() @@ -399,10 +399,10 @@ nnoremap