mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 09:07:41 +00:00
LibLine: Default to resetting styles when a cell has no styles set
This commit is contained in:
parent
01a085d3a6
commit
679a84d44c
1 changed files with 2 additions and 2 deletions
|
@ -998,14 +998,14 @@ void VT::move_relative(int x, int y)
|
||||||
Style Editor::find_applicable_style(size_t offset) const
|
Style Editor::find_applicable_style(size_t offset) const
|
||||||
{
|
{
|
||||||
// Walk through our styles and merge all that fit in the offset.
|
// Walk through our styles and merge all that fit in the offset.
|
||||||
Style style;
|
auto style = Style::reset_style();
|
||||||
auto unify = [&](auto& entry) {
|
auto unify = [&](auto& entry) {
|
||||||
if (entry.key >= offset)
|
if (entry.key >= offset)
|
||||||
return;
|
return;
|
||||||
for (auto& style_value : entry.value) {
|
for (auto& style_value : entry.value) {
|
||||||
if (style_value.key <= offset)
|
if (style_value.key <= offset)
|
||||||
return;
|
return;
|
||||||
style.unify_with(style_value.value);
|
style.unify_with(style_value.value, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue