commit a3e06e4e8d97eb399073fb2958d44043510d489f
parent 9fa06803d6bedf56b4464721eca6f22dd1e209bf
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date: Wed, 12 Nov 2014 11:13:14 +0100
Disable updating of TOC while in diff mode
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
@@ -1576,6 +1576,10 @@ endfunction " }}}
" a:create == 1: creates or updates TOC in current file
" a:create == 0: update if TOC exists
function! vimwiki#base#table_of_contents(create)
+ " apparently, Vim behaves strange when files change while in diff mode
+ if &diff
+ return
+ endif
" look for existing TOC
let toc_header = '^\s*'.substitute(g:vimwiki_rxH1_Template, '__Header__',