summaryrefslogtreecommitdiff
path: root/Libraries/LibLine
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-23 19:15:23 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-23 17:05:18 +0200
commit679a84d44cc7bb9190c6f1ee0fdedd42b2de5325 (patch)
tree6713e13c56d004428f6b91514e43cfbd17164da1 /Libraries/LibLine
parent01a085d3a6d83b1c7c51ae33771954bd83273cd2 (diff)
downloadserenity-679a84d44cc7bb9190c6f1ee0fdedd42b2de5325.zip
LibLine: Default to resetting styles when a cell has no styles set
Diffstat (limited to 'Libraries/LibLine')
-rw-r--r--Libraries/LibLine/Editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index 86297f15f7..15cc8e6840 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -998,14 +998,14 @@ void VT::move_relative(int x, int y)
Style Editor::find_applicable_style(size_t offset) const
{
// Walk through our styles and merge all that fit in the offset.
- Style style;
+ auto style = Style::reset_style();
auto unify = [&](auto& entry) {
if (entry.key >= offset)
return;
for (auto& style_value : entry.value) {
if (style_value.key <= offset)
return;
- style.unify_with(style_value.value);
+ style.unify_with(style_value.value, true);
}
};