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

fixes for issue #2587
This commit is contained in:
paxcut
2025-12-29 12:01:26 -07:00
committed by GitHub
parent 40b604c6e4
commit b835c48a0c

View File

@@ -510,10 +510,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;
}