vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 7969810b494c6ea66fd353b9071fb4d3fe06fc07
parent a32a06f3b81f80d6b839955a8f47964388e56d84
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date:   Fri, 26 Oct 2018 16:35:02 +0200

Fix losing highlighting after VimwikiAll2HTML

Apparently, switching buffers in connection with disabled events caused
the highlighting to disappear. Solution: use the :wa command to save all
buffers. A disadvantage is that now also non-Vimwiki buffers are saved,
but I think that is bearable.

Diffstat:
Mautoload/vimwiki/html.vim | 15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim @@ -204,13 +204,6 @@ function! s:subst_func(line, regexp, func, ...) endfunction -function! s:save_vimwiki_buffer() - if &filetype ==? 'vimwiki' && filewritable(expand('%')) - silent update - endif -endfunction - - function! s:process_date(placeholders, default_date) if !empty(a:placeholders) for [placeholder, row, idx] in a:placeholders @@ -1586,9 +1579,11 @@ function! vimwiki#html#WikiAll2HTML(path_html) echomsg 'Vimwiki: Saving Vimwiki files ...' let save_eventignore = &eventignore let &eventignore = "all" - let cur_buf = bufname('%') - bufdo call s:save_vimwiki_buffer() - exe 'buffer '.cur_buf + try + wall + catch + " just ignore errors + endtry let &eventignore = save_eventignore let path_html = expand(a:path_html)