fix: Unable to delete empty lines in text editor (#2588)

fixes for issue #2587

(cherry picked from commit b835c48a0c)
This commit is contained in:
paxcut
2025-12-29 12:01:26 -07:00
committed by WerWolv
parent f0f6a22391
commit 87ebcff525

View File

@@ -505,10 +505,12 @@ namespace hex::ui {
bool TextEditor::isEmpty() const {
auto size = m_lines.size();
for (u32 i = 0; i < size; ++i) {
if (!m_lines[i].empty())
return false;
}
if (size > 1)
return false;
if (size == 0)
return true;
if (m_lines[0].empty())
return true;
return true;
}