sainnhe / gruvbox-material

Gruvbox with Material Palette
MIT License
1.96k stars 166 forks source link

Trailing whitespace(s) is showing up as orange when it used to gray-ish and less distracting #211

Closed CaffeineViking closed 4 months ago

CaffeineViking commented 4 months ago

I have done the following steps before reporting this issue:

Operating system/version

Windows 10

GUI client/version

gVim 9.1

Feature matrix

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jul 09 2024 07:07:42)
Included patches: 1-532
Compiled by <https://www.msys2.org/>
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl/dyn          +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3/dyn       +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby/dyn          +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             +xattr
-dnd               -mouseshape        +spell             -xfontset
-ebcdic            +mouse_dec         +startuptime       -xim
+emacs_tags        -mouse_gpm         +statusline        -xpm
+eval              -mouse_jsbterm     -sun_workshop      -xsmp
+ex_extra          +mouse_netterm     +syntax            -xterm_clipboard
+extra_search      +mouse_sgr         +tag_binary        -xterm_save
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim91"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/include/ncursesw -march=nocona -msahf -mtune=generic -O2 -pipe -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,--as-needed -o vim.exe -lm -lncursesw -liconv -lacl -lintl

Minimal vimrc that can reproduce this bug.

set background=dark
colorscheme gruvbox-material
set list
set listchars=tab:›\ ,trail:•,extends:>,precedes:<,nbsp:_

Steps to reproduce this bug using minimal vimrc

  1. Open gVim (or Vim)
  2. Set colorscheme to gruvbox-material (dark)
  3. Enable "list" to display trailing whitespace
  4. Notice trailing whitespace displaying as orange, when it was gray before

Expected behavior

Trailing whitespace is shown in a "dim" gray. Orange for trailing whitespace is a bit too distracting.

Screenshot below is from colorscheme gruvbox since I can't figure out what is causing gruvbox-material to look strange, but this is also how gruvbox-material showed trailing whitespaces not so long ago. I don't know which change caused the issue (and if it was intentional or not). This must be a very recent change, as I did not experience this ~1 or 2 months ago.

image

Actual behavior

Trailing whitespace shows as orange.

image

CaffeineViking commented 4 months ago

Feel free to close the issue if the change was intentional.

antoineco commented 4 months ago

This change originates from https://github.com/sainnhe/sonokai/issues/104, for context. It was indeed intentional, however SpecialKey is not supposed to affect listchars.^1

antoineco commented 4 months ago

I was able to reproduce, and to find the root cause.

This is what trailing whitespaces look like in Neovim both with Neovim's defaults and with the listchars from your vimrc:

Screenshot 2024-07-13 at 17 01 09 Screenshot 2024-07-13 at 17 02 31

I'm pushing a fix to master. Thanks for reporting! 🙌

CaffeineViking commented 4 months ago

Wow, it's already been fixed. Thank you @antoineco!