diff --git a/highlight.cpp b/highlight.cpp index a988ad9fe..74ea4bac8 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -61,7 +61,8 @@ static const wchar_t * const highlight_var[] = L"fish_color_escape", L"fish_color_quote", L"fish_color_redirection", - L"fish_color_autosuggestion" + L"fish_color_autosuggestion", + L"fish_color_selection" }; /* If the given path looks like it's relative to the working directory, then prepend that working directory. */ @@ -366,6 +367,8 @@ rgb_color_t highlight_get_color(highlight_spec_t highlight, bool is_background) // debug( 1, L"%d -> %d -> %ls", highlight, idx, val ); + + if (val_wstr.missing()) val_wstr = env_get_string(highlight_var[0]); @@ -389,6 +392,7 @@ rgb_color_t highlight_get_color(highlight_spec_t highlight, bool is_background) result.set_underline(true); } } + return result; } diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index b9afedd4a..a05d7985b 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -117,6 +117,9 @@ function __fish_config_interactive -d "Initializations that should be performed # Background color for search matches set_default fish_color_search_match --background=purple + # Background color for selections + set_default fish_color_selection --background=purple + # Pager colors set_default fish_pager_color_prefix cyan set_default fish_pager_color_completion normal