Closed GoogleCodeExporter closed 9 years ago
Original comment by habamax
on 15 Mar 2012 at 6:58
The problem occurs b/c vimwiki#diary#make_note() eventually tries to access
g:vimwiki_rxHeader before it has been defined.
Variables related to syntax are defined when the chosen syntax file
vimwiki_xxx.vim is first read.
If the user has not yet opened a vimwiki file, then these variables will not
yet be initialized.
I have provided a temporary fix in rb3e447292365, where
vimwiki#diary#goto_index() is called whenever make_note() is called, ensuring
that the syntax file is loaded. The user will briefly see the index file flash
on the screen, before the a new blank note is displayed.
Should we try to detect whether the syntax file has not yet been read, and
force it to be read directly ??
Original comment by stu.andrews
on 16 Mar 2012 at 3:24
Well...this must be a regression because it works just fine in the stable
version. :)
Thanks,
Scott
Original comment by firecat4...@gmail.com
on 16 Mar 2012 at 4:10
firecat4153: that is right.
Stuart, I think calling vimwiki#diary#goto_index() is a good solution here.
Original comment by habamax
on 16 Mar 2012 at 6:08
Sorry about the mixup with branches. Please ignore the earlier revision on
the link-properties branch. I've applied the same patch to the trunk in
r3f8159f103a8.
Thanks for catching this bug. The reason that this error cropped up is because
the previous implementation was agnostic about the user's chosen syntax ... it
assumed the user had syntax='default'. I made changes to the dev version to
make it syntax-aware; in particular, to create headings in the diary's index
page using the chosen syntax.
- Stu
Original comment by stu.andrews
on 16 Mar 2012 at 10:13
Original comment by habamax
on 17 Mar 2012 at 6:49
This is fixed without calling goto_index.
Original comment by habamax
on 3 May 2012 at 4:40
Original issue reported on code.google.com by
firecat4...@gmail.com
on 15 Mar 2012 at 6:47