aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:56:07 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:56:07 +1300
commit65fda89e04424b454d9e3c5792344bba98fb5f60 (patch)
tree7988162a17b2dfd99e1a6f2d5e813d2a271b32ed /vim/plugin
parent57b34a5645b5d0325426dbb60b8d3f80ff6bfe7a (diff)
downloaddotfiles-65fda89e04424b454d9e3c5792344bba98fb5f60.tar.gz
dotfiles-65fda89e04424b454d9e3c5792344bba98fb5f60.zip
Escape option value assign correctly
This allows e.g.: ':ToggleOptionFlag fillchars diff: '; note the whitespace!
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/toggle_option_flag.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim
index 68db2703..809e1f53 100644
--- a/vim/plugin/toggle_option_flag.vim
+++ b/vim/plugin/toggle_option_flag.vim
@@ -49,7 +49,7 @@ function! s:Toggle(option, flag, local)
let l:operation = l:current =~# '\V\C' . l:flag_pattern ? '-=' : '+='
" Build the command strings to set and then show the value
- let l:cmd_set = l:set . ' ' . a:option . l:operation . a:flag
+ let l:cmd_set = l:set . ' ' . a:option . l:operation . escape(a:flag, '\ ')
let l:cmd_show = l:set . ' ' . a:option . '?'
" Run the set and show command strings