neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 440ce0d2462677685d2f981ad3e928c28526e6d3
parent d09957e0a06f350443c750d9838b5f1016c0cccc
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 15 Feb 2024 07:48:14 +0800

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>

Diffstat:
Mruntime/colors/vim.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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' })