mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 08:58:01 +00: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
(cherry picked from commit 10d91b0249
)
This commit is contained in:
parent
3027bc355b
commit
577dc2be94
1 changed files with 5 additions and 1 deletions
|
@ -878,8 +878,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 a new issue