Skip to content

Commit

Permalink
wip: simplify testing as explained in the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lervag committed Dec 13, 2024
1 parent 800be76 commit 7f0de89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/vimtex/fold.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"

function! vimtex#fold#init_buffer() abort
let b:__vimtex_fold_lasttick = -1
let b:__vimtex_fold_cache = []

if !g:vimtex_fold_enabled
\ || s:foldmethod_in_modeline() | return | endif

Expand All @@ -13,9 +16,6 @@ function! vimtex#fold#init_buffer() abort
setlocal foldexpr=vimtex#fold#level(v:lnum)
setlocal foldtext=vimtex#fold#text()

let b:__vimtex_fold_lasttick = -1
let b:__vimtex_fold_cache = []

if g:vimtex_fold_manual
" Remap zx to refresh fold levels
nnoremap <silent><buffer><nowait> zx :call vimtex#fold#refresh('zx')<cr>
Expand Down

0 comments on commit 7f0de89

Please sign in to comment.