aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-15 07:48:14 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-02-15 07:49:23 +0800
commit440ce0d2462677685d2f981ad3e928c28526e6d3 (patch)
treed4fec646688be8da26b96c95c5acf6540b6e3186
parentd09957e0a06f350443c750d9838b5f1016c0cccc (diff)
downloadrneovim-440ce0d2462677685d2f981ad3e928c28526e6d3.tar.gz
rneovim-440ce0d2462677685d2f981ad3e928c28526e6d3.tar.bz2
rneovim-440ce0d2462677685d2f981ad3e928c28526e6d3.zip
vim-patch:9.1.0068: Visual highlighting can still be improved
Problem: Visual highlighting can still be improved Solution: Update Visual highlighting for 8 color terminals, use uniform grey highlighting for dark and light bg (Maxim Kim) Update terminal Visual 1. Use `ctermbg=Grey ctermfg=Black` for both dark and light This uniforms Visual highlighting between default dark and light colors And should work for vim usually detecting light background for terminals with black/dark background colors. Previously used `ctermfg=White` leaks `cterm=bold` if available colors are less than 16. 2. Use `term=reverse cterm=reverse ctermbg=NONE ctermfg=NONE` for terminals reporting less than 8 colors available If the terminal has less than 8 colors, grey just doesn't work right closes: vim/vim#13940 https://github.com/vim/vim/commit/59bafc8171b08cf326ed40ccb4ee917f9643290e Co-authored-by: Maxim Kim <habamax@gmail.com>
-rw-r--r--runtime/colors/vim.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/colors/vim.lua b/runtime/colors/vim.lua
index b4ede93357..53b232eeb5 100644
--- a/runtime/colors/vim.lua
+++ b/runtime/colors/vim.lua
@@ -231,7 +231,7 @@ if vim.o.background == 'light' then
hi('SpellRare', { sp = 'Magenta', undercurl = true, ctermbg = 'LightMagenta' })
hi('TabLine', { bg = 'LightGrey', underline = true, ctermfg = 'Black', ctermbg = 'LightGrey', cterm = { underline = true } })
hi('Title', { fg = 'Magenta', bold = true, ctermfg = 'DarkMagenta' })
- hi('Visual', { bg = 'LightGrey', ctermfg = 'White', ctermbg = 'DarkGrey' })
+ hi('Visual', { bg = 'LightGrey', ctermfg = 'Black', ctermbg = 'Grey' })
hi('WarningMsg', { fg = 'Red', ctermfg = 'DarkRed' })
hi('Comment', { fg = 'Blue', ctermfg = 'DarkBlue' })
hi('Constant', { fg = 'Magenta', ctermfg = 'DarkRed' })