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: 41656d28d6 ("vim:autocmd: Reset textwidth value in colorcolumn")
This commit is contained in:
2022-03-21 15:24:31 +01:00
parent 71f41ab994
commit 94271371dc

View File

@@ -58,7 +58,7 @@ endif
autocmd SourcePost termdebug.vim tnoremap <Esc> <C-\><C-n>
" 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