vimwiki

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

commit c2b0fd843bffa8798d247d5dbc08964182d0296d
parent 77fca9080c88f43119087ac62643ca2288320d9b
Author: Ivan Tishchenko <ivan.tishchenko@dsr-company.com>
Date:   Fri,  4 Dec 2015 15:33:03 +0400

Fix bug: saving a page would err out trying to open fold if folds are disabled or are configured differently.

Diffstat:
Mautoload/vimwiki/base.vim | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim @@ -1152,7 +1152,7 @@ function! vimwiki#base#update_listing_in_buffer(strings, start_header, let lines_diff = 0 if already_there - let is_fold_closed = ( foldclosed(start_lnum) > 1 ) + let is_fold_closed = ( foldclosed(start_lnum) > -1 ) " delete the old listing let whitespaces_in_first_line = matchstr(getline(start_lnum), '\m^\s*') let end_lnum = start_lnum + 1 @@ -1195,7 +1195,7 @@ function! vimwiki#base#update_listing_in_buffer(strings, start_header, endif " Open fold, if needed - if !is_fold_closed && foldclosed(start_of_listing) + if !is_fold_closed && ( foldclosed(start_of_listing) > -1 ) exe start_of_listing norm! zo endif