Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim-patch:9.1.{0068,0106}: Visual highlighting can be improved #27474

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

zeertzjq
Copy link
Member

@zeertzjq zeertzjq commented Feb 15, 2024

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.

  1. 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

vim/vim@59bafc8

Co-authored-by: Maxim Kim habamax@gmail.com

vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'

Problem: Visual highlight hard to read with 'termguicolors'
(Maxim Kim)
Solution: Set Visual GUI foreground to black (with background=light)
and lightgrey (with background=dark)
(Maxim Kim)

closes: vim/vim#14025

vim/vim@34e4a05

Co-authored-by: Maxim Kim habamax@gmail.com

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

vim/vim@59bafc8

Co-authored-by: Maxim Kim <habamax@gmail.com>
@zeertzjq zeertzjq changed the title vim-patch:9.1.0068,9.1.0106 vim-patch:9.1.{0068,0106}: Visual highlighting can be improved Feb 15, 2024
@github-actions github-actions bot added the vim-patch See https://neovim.io/doc/user/dev_vimpatch.html label Feb 15, 2024
Problem:  Visual highlight hard to read with 'termguicolors'
          (Maxim Kim)
Solution: Set Visual GUI foreground to black (with background=light)
          and lightgrey (with background=dark)
          (Maxim Kim)

fixes: vim/vim#14024
closes: vim/vim#14025

vim/vim@34e4a05

Co-authored-by: Maxim Kim <habamax@gmail.com>
@zeertzjq zeertzjq merged commit b76a010 into neovim:master Feb 15, 2024
24 checks passed
@zeertzjq zeertzjq deleted the vim-9.1.0068 branch February 15, 2024 03:17
@github-actions github-actions bot removed the request for review from seandewar February 15, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vim-patch See https://neovim.io/doc/user/dev_vimpatch.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant