parent
1a8a15d835
commit
593e67cf2d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user