From 94271371dcb0beda6f20da7f604314543c21982f Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 21 Mar 2022 15:24:31 +0100 Subject: [PATCH] vim:autocmd: Fix typo in `OptionSet textwidth` The old `textwidth` value is meant to be subtracted from colorcolumn, to then add the new one. Fixes: 41656d28d6e9 ("vim:autocmd: Reset textwidth value in colorcolumn") --- .config/vim/vimrc.d/80-autocommands.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/vim/vimrc.d/80-autocommands.vim b/.config/vim/vimrc.d/80-autocommands.vim index 382cfaf..2cd732f 100644 --- a/.config/vim/vimrc.d/80-autocommands.vim +++ b/.config/vim/vimrc.d/80-autocommands.vim @@ -58,7 +58,7 @@ endif autocmd SourcePost termdebug.vim tnoremap " Adjust the colorcolumn together with &textwidth -autocmd OptionSet textwidth exec 'set cc=' . v:option_old . ' | set cc+=' . &tw +autocmd OptionSet textwidth exec 'set cc-=' . v:option_old . ' | set cc+=' . &tw " " Highlight word under cursor augroup highlight_current_word