pager: fix selected color regression

To check:

```fish
fish_config theme choose None
set -g fish_pager_color_selected_completion blue
```

Now the selected color will only apply to the parentheses

Missed in 43e2d7b48c (Port pager.cpp)

(cherry picked from commit 6c4d658c15)
This commit is contained in:
Fabian Boehm
2025-01-30 16:22:07 +01:00
parent 5aec9e3b47
commit 93ac5d0eb3

View File

@@ -495,15 +495,17 @@ fn completion_print_item(
let bg_role = modify_role(HighlightRole::pager_background);
let bg = HighlightSpec::with_bg(bg_role);
let prefix_col = HighlightSpec::with_fg_bg(
if self.highlight_prefix {
modify_role(if self.highlight_prefix {
HighlightRole::pager_prefix
} else {
HighlightRole::pager_completion
},
}),
bg_role,
);
let comp_col = HighlightSpec::with_fg_bg(HighlightRole::pager_completion, bg_role);
let desc_col = HighlightSpec::with_fg_bg(HighlightRole::pager_description, bg_role);
let comp_col =
HighlightSpec::with_fg_bg(modify_role(HighlightRole::pager_completion), bg_role);
let desc_col =
HighlightSpec::with_fg_bg(modify_role(HighlightRole::pager_description), bg_role);
// Print the completion part
let mut comp_remaining = comp_width;