mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 16:52:46 +08:00
screen: Unset color at the end of a line even without clr_eol
This is a sensible thing to do, and fixes some cases where we're state-dependent. E.g. this fixes the case in the pager where some things are bold and some aren't, because that bolding is (rather awkwardly) implicitly triggered when we have a background, and so we don't notice we need to re-do that bolding after we moved to the next line because we think we still have the same color. Fixes #9617
This commit is contained in:
parent
b32cc65166
commit
10d91b0249
|
@ -883,8 +883,12 @@ void screen_t::update(const wcstring &left_prompt, const wcstring &right_prompt,
|
|||
clear_remainder = prev_width > current_width;
|
||||
}
|
||||
}
|
||||
|
||||
// We unset the color even if we don't clear the line.
|
||||
// This means that we switch background correctly on the next,
|
||||
// including our weird implicit bolding.
|
||||
set_color(highlight_spec_t{});
|
||||
if (clear_remainder && clr_eol) {
|
||||
set_color(highlight_spec_t{});
|
||||
this->move(current_width, static_cast<int>(i));
|
||||
this->write_mbs(clr_eol);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user