Fix vimwiki#diary#calendar_sign when g:vimwiki_list is not set

If a user is happy with the default vimwiki location, they may not set
the g:vimwiki_list global variable. In this case, the
len(g:vimwiki_list) vimwiki#diary#calendar_sign function throws an
error every time it is called. This function is called for every day
displayed in the calendar which is very noisy. Checking if the variable
exists before doing the length check prevents the error and the rest of
the function works fine if the variable is not set.
This commit is contained in:
Luke Atkinson
2023-05-12 22:20:44 +01:00
committed by Tinmarino
parent 7a48268d24
commit cd9cfd299e
4 changed files with 10 additions and 3 deletions
+7
View File
@@ -4002,6 +4002,7 @@ Contributors and their Github usernames in roughly chronological order:
- Thomas Leyh (@leyhline)
- nebulaeandstars (@nebulaeandstars)
- dmitry kim (@jsn)
- Luke Atkinson (@LukeDAtkinson)
==============================================================================
16. Changelog *vimwiki-changelog*
@@ -4021,6 +4022,12 @@ This is somewhat experimental, and will probably be refined over time.
2023.04.04~
Fixed:~
* Issue #1336: vimwiki#diary#calendar_sign throws an error
when g:vimwiki_list is not set
2023.04.04~
New:~
* Issue #1261: Feature: Support for <mark> in Markdown
highlighting with yellow background and back foreground