diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 18:01:26 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 18:01:26 +1200 |
commit | efdc942419bbea46c75de349a03e4b8b32ee3ba6 (patch) | |
tree | c34db50e7499d4ae0b42d94b382c15b90edbc35e | |
parent | Move functions into autoload (diff) | |
download | vim-toggle-flags-efdc942419bbea46c75de349a03e4b8b32ee3ba6.tar.gz vim-toggle-flags-efdc942419bbea46c75de349a03e4b8b32ee3ba6.zip |
Add abort attribute to functions
-rw-r--r-- | autoload/toggle_flags.vim | 6 |
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' |