aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-09-21 20:18:32 +0800
committerGitHub <noreply@github.com>2020-09-21 20:18:32 +0800
commite2b32df47ffad7bae10e009dbfc56f676682b19a (patch)
tree56492892fdf5f785047137b26aca1e083ed375c4 /autoload
parent3e97ae117ff5ff88e45607b114d0b59de03c24de (diff)
add abort for functions
Diffstat (limited to 'autoload')
-rw-r--r--autoload/utils.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim
index 9575a31..ad6078a 100644
--- a/autoload/utils.vim
+++ b/autoload/utils.vim
@@ -49,7 +49,7 @@ function! utils#RandInt(Low, High) abort
endfunction
" Custom fold expr, adapted from https://vi.stackexchange.com/a/9094/15292
-function! utils#VimFolds(lnum)
+function! utils#VimFolds(lnum) abort
" get content of current line and the line below
let l:cur_line = getline(a:lnum)
let l:next_line = getline(a:lnum+1)
@@ -67,7 +67,7 @@ endfunction
" Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292
" and https://vi.stackexchange.com/a/6608/15292
-function! utils#MyFoldText()
+function! utils#MyFoldText() abort
let line = getline(v:foldstart)
let folded_line_num = v:foldend - v:foldstart
let line_text = substitute(line, '^"{\+', '', 'g')
@@ -76,7 +76,7 @@ function! utils#MyFoldText()
endfunction
" Toggle cursor column
-function! utils#ToggleCursorCol()
+function! utils#ToggleCursorCol() abort
if &cursorcolumn
set nocursorcolumn
echo "cursorcolumn: OFF"