aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-25 18:01:26 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-25 18:01:26 +1200
commitefdc942419bbea46c75de349a03e4b8b32ee3ba6 (patch)
treec34db50e7499d4ae0b42d94b382c15b90edbc35e /autoload
parentMove functions into autoload (diff)
downloadvim-toggle-flags-efdc942419bbea46c75de349a03e4b8b32ee3ba6.tar.gz
vim-toggle-flags-efdc942419bbea46c75de349a03e4b8b32ee3ba6.zip
Add abort attribute to functions
Diffstat (limited to 'autoload')
-rw-r--r--autoload/toggle_flags.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/toggle_flags.vim b/autoload/toggle_flags.vim
index 38f6c3f..eba30c2 100644
--- a/autoload/toggle_flags.vim
+++ b/autoload/toggle_flags.vim
@@ -1,5 +1,5 @@
" Show an error-highlighted message and beep, but without a real :echoerr
-function! s:Error(message)
+function! s:Error(message) abort
execute "normal! \<Esc>"
echohl ErrorMsg
echomsg a:message
@@ -7,7 +7,7 @@ function! s:Error(message)
endfunction
" Test whether an option currently has a flag as part of its value
-function! s:Has(option, flag)
+function! s:Has(option, flag) abort
" Horrible :execute to get the option's current setting into a variable
let current = ''
@@ -31,7 +31,7 @@ function! s:Has(option, flag)
endfunction
" Internal function to do the toggling
-function! toggle_flags#Toggle(option, flag, local)
+function! toggle_flags#Toggle(option, flag, local) abort
" Check for spurious option strings, we don't want to :execute anything funny
if a:option =~# '\L'