diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-03-20 16:35:51 +0330 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-03-20 23:25:21 +0100 |
commit | e312d6530b7e194df4bcfb81f744f28031a9ed95 (patch) | |
tree | 706c45cadd2c2923987f839bf4c652e287952df0 /Userland | |
parent | a6d1307aa4eaa9aee34829879d9ba711174cce4d (diff) | |
download | serenity-e312d6530b7e194df4bcfb81f744f28031a9ed95.zip |
LibLine: Unify the is-empty flag in Style::unify_with() as well
Not doing so can make the final unified state incorrectly marked as
empty, and will make LibLine ignore the style.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 6d8f9c4a78..0569a27bd7 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -1709,6 +1709,8 @@ void Style::unify_with(Style const& other, bool prefer_other) // Unify links. if (prefer_other || m_hyperlink.is_empty()) m_hyperlink = other.hyperlink(); + + m_is_empty &= other.m_is_empty; } DeprecatedString Style::to_deprecated_string() const |