8000 Error calling VimwikiMakeDiaryNote · Issue #497 · vimwiki/vimwiki · GitHub
[go: up one dir, main page]

Skip to content

Error calling VimwikiMakeDiaryNote #497

@szaffarano

Description

@szaffarano

I've one single wiki configured with an alternate path:

let g:vimwiki_list = [{ 'path': '~/.wiki/', 'syntax': 'markdown', 'ext': '.md'}]                                          

And before commit 057fa39 I could call either :VimwikiMakeDiaryNote or call vimwiki#diary#make_note(v:count1) from anywhere. After that, both calls only work when are called from a wiki page, for example:

  1. Execute vim
  2. Inside vim execute :VimwikiIndex
  3. Execute :VimwikiMakeDiaryNote

But if I execute vim and after that :VimwikiMakeDiaryNote it seems that the plugin tries to use another wiki because it creates the "default folder" (~/vimwiki) and puts inside it the diary wiki.

If I change line 178 in autoload/vimwiki/diary.vim by adding one to wiki_nr variable in case a:wnum is zero, everything works fine:

176 function! vimwiki#diary#make_note(wnum, ...)                                                                              
177   if a:wnum == 0                                                                                                          
178     let wiki_nr = vimwiki#vars#get_bufferlocal('wiki_nr') + 1
179   else                                                                                                                    
180     let wiki_nr = a:wnum - 1                                                                                              
181   endif 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0