Fix messing up folding when Vim is in diff mode
This commit is contained in:
parent
2185815b00
commit
5605f285c1
@ -157,6 +157,7 @@ endfunction
|
||||
" Vim defaults. So we enforce our settings here when the cursor enters a
|
||||
" Vimwiki buffer.
|
||||
function! s:set_windowlocal_options()
|
||||
if !&diff " if Vim is currently in diff mode, don't interfere with its folding
|
||||
let foldmethod = vimwiki#vars#get_global('folding')
|
||||
if foldmethod =~? '^expr.*'
|
||||
setlocal foldmethod=expr
|
||||
@ -175,6 +176,7 @@ function! s:set_windowlocal_options()
|
||||
setlocal foldmethod=manual
|
||||
normal! zE
|
||||
endif
|
||||
endif
|
||||
|
||||
if vimwiki#vars#get_global('conceallevel') && exists("+conceallevel")
|
||||
let &conceallevel = vimwiki#vars#get_global('conceallevel')
|
||||
|
Loading…
Reference in New Issue
Block a user