-
Notifications
You must be signed in to change notification settings - Fork 644
Closed
Labels
3rd-partyIssues related to a 3rd party plugin or toolIssues related to a 3rd party plugin or toolbug
Description
Error detected while processing function calendar#show[337]..vimwiki#diary#calendar_sign[6]..VimwikiGet:
line 3:
E684: list index out of range: 0
E116: Invalid arguments for function has_key(g:vimwiki_list[idx], a:option)
E15: Invalid expression: has_key(g:vimwiki_list[idx], a:option)
Steps to reproduce:
- install Calendar.vim (https://github.com/mattn/calendar-vim)
- let g:vimwiki_list = []
- open vim
- try to open calendar (:Calendar or cal)
Looks like that Calendar.vim hooks are always installed and hook methods don't check if any wiki actually exist. Hot and dirty fix for me at the moment:
--- vimwiki/autoload/vimwiki/diary.vim 2017-01-15 15:43:06.837918480 +0100
+++ vimwiki/autoload/vimwiki/diary.vim 2017-01-15 15:42:49.651220557 +0100
@@ -284,6 +284,9 @@
" Sign function.
function vimwiki#diary#calendar_sign(day, month, year) "{{{
+ if len(g:vimwiki_list) <= 0
+ return
+ endif
let day = s:prefix_zero(a:day)
let month = s:prefix_zero(a:month)
let sfile = VimwikiGet('path').VimwikiGet('diary_rel_path').
Metadata
Metadata
Assignees
Labels
3rd-partyIssues related to a 3rd party plugin or toolIssues related to a 3rd party plugin or toolbug