diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-19 00:35:37 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-19 00:35:37 +1200 |
commit | 17c9a8344a67411d4ec7cf469eea989b145cc446 (patch) | |
tree | f3623f6510661be0c73dcd2867bf25a8a4d65e0b | |
parent | Join conditionals (diff) | |
download | dotfiles-17c9a8344a67411d4ec7cf469eea989b145cc446.tar.gz dotfiles-17c9a8344a67411d4ec7cf469eea989b145cc446.zip |
Correct ColorScheme event handling for old Vim
-rw-r--r-- | vim/vimrc | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1053,10 +1053,15 @@ endif " background. For any other color scheme, turn the option off, because it " almost always stands out too much for my liking. " +" You'd think the autocommand pattern here could be used to match the colour +" scheme name, and it can be...after patch v7.4.108, when Christian Brabandt +" fixed it. Until that version, it matched against the current buffer name, +" so we're forced to have an explicit test in the command instead. +" +" <https://github.com/vim/vim/releases/tag/v7.4.108> +" autocmd vimrc ColorScheme * - \ set nocursorline -autocmd vimrc ColorScheme sahara - \ set cursorline + \ let &cursorline = g:colors_name ==# 'sahara' " Use 'dark' as my default value for 'background', in the absence of an " environment variable COLORFGBG or a response in v:termrbgresp that would set |