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:
parent
32d69040d6
commit
c226973bd5
@ -56,13 +56,13 @@ function! utils#VimFolds(lnum) abort
|
|||||||
|
|
||||||
if l:cur_line =~# '^"{'
|
if l:cur_line =~# '^"{'
|
||||||
return '>' . (matchend(l:cur_line, '"{*') - 1)
|
return '>' . (matchend(l:cur_line, '"{*') - 1)
|
||||||
else
|
|
||||||
if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return '='
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
return '='
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292
|
" Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user