Use b:var for :SignifyFold!

Fixes #249.
This commit is contained in:
Marco Hinz 2017-12-24 00:15:15 +01:00
parent 1a8a15d835
commit 593e67cf2d
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -62,21 +62,21 @@ endfunction
" Function: #disable {{{1 " Function: #disable {{{1
function! sy#fold#disable() abort function! sy#fold#disable() abort
let &l:foldmethod = w:sy_folded.method let &l:foldmethod = b:sy_folded.method
let &l:foldtext = w:sy_folded.text let &l:foldtext = b:sy_folded.text
normal! zv normal! zv
endfunction endfunction
" Function: #toggle {{{1 " Function: #toggle {{{1
function! sy#fold#toggle() abort function! sy#fold#toggle() abort
if exists('w:sy_folded') if exists('b:sy_folded')
call sy#fold#disable() call sy#fold#disable()
if w:sy_folded.method == 'manual' if b:sy_folded.method == 'manual'
loadview loadview
endif endif
unlet w:sy_folded unlet b:sy_folded
else else
let w:sy_folded = { 'method': &foldmethod, 'text': &foldtext } let b:sy_folded = { 'method': &foldmethod, 'text': &foldtext }
if &foldmethod == 'manual' if &foldmethod == 'manual'
let old_vop = &viewoptions let old_vop = &viewoptions
mkview mkview