1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

refactor: simplify if else

This commit is contained in:
jdhao 2020-09-27 19:20:42 +08:00
parent 32d69040d6
commit c226973bd5

View File

@ -56,13 +56,13 @@ function! utils#VimFolds(lnum) abort
if l:cur_line =~# '^"{'
return '>' . (matchend(l:cur_line, '"{*') - 1)
else
endif
if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1
return 0
else
endif
return '='
endif
endif
endfunction
" Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292