mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Update pager colors, tweak pager.cpp
Adds a color reset thing, to ensure fish tries to use hard colors during testing. Also, work on a discrepancy (not introduced by my changes, afaik) when with some combinations of color settings, and usage of --bold, caused super flakey color paninting in the pager. Downwards movements that trigger scrolling vs. upwards movement in the pager would only apply bold to selections when moving upwards. The bold state of the command completions in the pager was flipping flops on and off, depending on if there is a description on the preceding line. Implement a lame fix by reseting the color to normal and applying a different style on the rightmost ')' which seems to be what was influencing it. Makes fish use terminfo for coloring the newline glich char.
This commit is contained in:
@@ -130,9 +130,10 @@ line_t pager_t::completion_print_item(const wcstring &prefix, const comp_t *c, s
|
||||
{
|
||||
written += print_max(L" ", packed_color, 1, false, &line_data);
|
||||
}
|
||||
print_max(L"(", packed_color, 1, false, &line_data);
|
||||
// hack - this just works around the issue
|
||||
print_max(L"(", highlight_spec_pager_completion | highlight_make_background(bg_color), 1, false, &line_data);
|
||||
print_max(c->desc, packed_color, desc_width, false, &line_data);
|
||||
print_max(L")", packed_color, 1, false, &line_data);
|
||||
print_max(L")", highlight_spec_pager_completion | highlight_make_background(bg_color), 1, false, &line_data);
|
||||
} else {
|
||||
while (written < width) {
|
||||
written += print_max(L" ", 0, 1, false, &line_data);
|
||||
|
||||
Reference in New Issue
Block a user