aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-30 22:32:11 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-30 22:32:11 +1300
commit610fca5da8e7481a0ac09df9f3c21bde586623b3 (patch)
tree48b61a44d8c7838a7f0471e83d457050200bd2ab
parentAppend "usetab" to `switchbuf`, not switched set (diff)
downloaddotfiles-610fca5da8e7481a0ac09df9f3c21bde586623b3.tar.gz
dotfiles-610fca5da8e7481a0ac09df9f3c21bde586623b3.zip
Switch on local formatoptions setting, not global
The actual option settings performed by the function are local, so the test should be, too.
-rw-r--r--vim/config/format.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim
index b307c4b6..f0cb6af5 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -21,7 +21,7 @@ endif
"
if has('eval')
function! s:ToggleFormatFlag(flag)
- let l:operation = (&formatoptions =~ a:flag) ? '-=' : '+='
+ let l:operation = (&l:formatoptions =~ a:flag) ? '-=' : '+='
silent! exec 'setlocal formatoptions' . l:operation . a:flag
setlocal formatoptions?
endfunction