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