Jelajahi Sumber

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.
Ali Mohammad Pur 2 tahun lalu
induk
melakukan
e312d6530b
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      Userland/Libraries/LibLine/Editor.cpp

+ 2 - 0
Userland/Libraries/LibLine/Editor.cpp

@@ -1709,6 +1709,8 @@ void Style::unify_with(Style const& other, bool prefer_other)
     // Unify links.
     // Unify links.
     if (prefer_other || m_hyperlink.is_empty())
     if (prefer_other || m_hyperlink.is_empty())
         m_hyperlink = other.hyperlink();
         m_hyperlink = other.hyperlink();
+
+    m_is_empty &= other.m_is_empty;
 }
 }
 
 
 DeprecatedString Style::to_deprecated_string() const
 DeprecatedString Style::to_deprecated_string() const