From e420e7f38db7fd8a5433237d7839b6a39e6feac3 Mon Sep 17 00:00:00 2001 From: xulongwu4 Date: Thu, 7 May 2020 03:21:20 -0400 Subject: [PATCH] Use transparent background for gutter line number in GUI mode (#204) The `LineNr` and `CursorLineNr` highlight groups now have a transparent background in GUI mode. Before it was set to `nord0_gui` which worked fine in most cases. However, some plugins use these highlight groups to render their content in a popup window which can potentially have a different background color. This caused some issues e.g. for the fuzzy search plugin LeaderF [1]. The compatibility with the `g:nord_cursor_line_number_background` theme configuration has been verified to work as expected in both modes when it is set to `0` or `1`. This change is not related to the terminal mode or when using `set notermguicolors` since `ctermbg` for `LineNr` and `CursorLineNr` is set to `NONE` by default. [1]: https://github.com/Yggdroot/LeaderF --- colors/nord.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colors/nord.vim b/colors/nord.vim index 0ba4416d..6b4054ee 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -170,7 +170,7 @@ call s:hi("Cursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "") call s:hi("CursorLine", "", s:nord1_gui, "NONE", s:nord1_term, "NONE", "") call s:hi("Error", s:nord4_gui, s:nord11_gui, "", s:nord11_term, "", "") call s:hi("iCursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "") -call s:hi("LineNr", s:nord3_gui, s:nord0_gui, s:nord3_term, "NONE", "", "") +call s:hi("LineNr", s:nord3_gui, "NONE", s:nord3_term, "NONE", "", "") call s:hi("MatchParen", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "") call s:hi("NonText", s:nord2_gui, "", s:nord3_term, "", "", "") call s:hi("Normal", s:nord4_gui, s:nord0_gui, "NONE", "NONE", "", "") @@ -219,7 +219,7 @@ endif "+--- Gutter ---+ call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "") if g:nord_cursor_line_number_background == 0 - call s:hi("CursorLineNr", s:nord4_gui, s:nord0_gui, "NONE", "", "NONE", "") + call s:hi("CursorLineNr", s:nord4_gui, "", "NONE", "", "NONE", "") else call s:hi("CursorLineNr", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") endif