Skip to content

Commit ff00690

Browse files
committed
Make fold levels be buffer local.
Without this I had behavior where doing `SignifyFold!` on a second buffer would change the fold regions of the first buffer. With the fix things were independent as they should be.
1 parent 8670143 commit ff00690

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/sy/fold.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
" SignifyFoldExpr {{{1
44
function! SignifyFoldExpr(lnum)
5-
return s:levels[a:lnum]
5+
return b:levels[a:lnum]
66
endfunction
77

88
" SignifyFoldText {{{1
@@ -49,7 +49,7 @@ function! sy#fold#enable(do_tab) abort
4949
endif
5050

5151
let [s:context0, s:context1] = get(g:, 'signify_fold_context', [3, 8])
52-
let s:levels = s:get_levels(s:get_lines())
52+
let b:levels = s:get_levels(s:get_lines())
5353

5454
setlocal foldexpr=SignifyFoldExpr(v:lnum)
5555
setlocal foldtext=SignifyFoldText()

0 commit comments

Comments
 (0)