diff options
| author | jdhao <jdhao@hotmail.com> | 2020-09-27 19:20:42 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2020-09-27 19:20:42 +0800 |
| commit | c226973bd5507781fa20bcacfd2620ac7f0934b4 (patch) | |
| tree | 6d75d83ee7f199497d33b89f650cf84dfc07614a /autoload/utils.vim | |
| parent | 32d69040d6f02cc1c17f8991eb240c024105d5d9 (diff) | |
refactor: simplify if else
Diffstat (limited to 'autoload/utils.vim')
| -rw-r--r-- | autoload/utils.vim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim index 6afda90..0f9ee19 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -56,13 +56,13 @@ function! utils#VimFolds(lnum) abort if l:cur_line =~# '^"{' return '>' . (matchend(l:cur_line, '"{*') - 1) - else - if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1 - return 0 - else - return '=' - endif endif + + if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1 + return 0 + endif + + return '=' endfunction " Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292 |
