aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/toggle_option_flag.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim
index c3ea01a0..5376a279 100644
--- a/vim/plugin/toggle_option_flag.vim
+++ b/vim/plugin/toggle_option_flag.vim
@@ -39,9 +39,13 @@ function! s:Toggle(option, flag, local)
let l:op = ''
execute 'let l:op = &' . a:option . ' =~# a:flag ? "-=" : "+="'
- " :execute to perform the option toggle and then print the value
- execute l:set . ' ' . a:option . l:op . a:flag
- execute l:set . ' ' . a:option . '?'
+ " Build the command strings to set and then show the value
+ let l:cmd_set = l:set . ' ' . a:option . l:op . a:flag
+ let l:cmd_show = l:set . ' ' . a:option . '?'
+
+ " Run the set and show command strings
+ execute l:cmd_set
+ execute l:cmd_show
endfunction