From e312d6530b7e194df4bcfb81f744f28031a9ed95 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 20 Mar 2023 16:35:51 +0330 Subject: [PATCH] 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. --- Userland/Libraries/LibLine/Editor.cpp | 2 ++ 1 file changed, 2 insertions(+) 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