mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Unable to delete empty lines in text editor (#2588)
fixes for issue #2587
(cherry picked from commit b835c48a0c)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user