diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 11:56:07 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 11:56:07 +1300 |
commit | 65fda89e04424b454d9e3c5792344bba98fb5f60 (patch) | |
tree | 7988162a17b2dfd99e1a6f2d5e813d2a271b32ed /vim/plugin | |
parent | Extend toggle_option_flag.vim for string flags (diff) | |
download | dotfiles-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.vim | 2 |
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 |