parent
1a8a15d835
commit
593e67cf2d
@ -62,21 +62,21 @@ endfunction
|
||||
|
||||
" Function: #disable {{{1
|
||||
function! sy#fold#disable() abort
|
||||
let &l:foldmethod = w:sy_folded.method
|
||||
let &l:foldtext = w:sy_folded.text
|
||||
let &l:foldmethod = b:sy_folded.method
|
||||
let &l:foldtext = b:sy_folded.text
|
||||
normal! zv
|
||||
endfunction
|
||||
|
||||
" Function: #toggle {{{1
|
||||
function! sy#fold#toggle() abort
|
||||
if exists('w:sy_folded')
|
||||
if exists('b:sy_folded')
|
||||
call sy#fold#disable()
|
||||
if w:sy_folded.method == 'manual'
|
||||
if b:sy_folded.method == 'manual'
|
||||
loadview
|
||||
endif
|
||||
unlet w:sy_folded
|
||||
unlet b:sy_folded
|
||||
else
|
||||
let w:sy_folded = { 'method': &foldmethod, 'text': &foldtext }
|
||||
let b:sy_folded = { 'method': &foldmethod, 'text': &foldtext }
|
||||
if &foldmethod == 'manual'
|
||||
let old_vop = &viewoptions
|
||||
mkview
|
||||
|
Loading…
Reference in New Issue
Block a user