Browse Source

GTextEditor: Always call did_change() after deleting with backspace

This is needed for the on_change callback to fire.
Andreas Kling 5 năm trước cách đây
mục cha
commit
fcf85d8fef
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Libraries/LibGUI/GTextEditor.cpp

+ 2 - 0
Libraries/LibGUI/GTextEditor.cpp

@@ -616,6 +616,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
             current_line().remove(m_cursor.column() - 1);
             update_content_size();
             set_cursor(m_cursor.line(), m_cursor.column() - 1);
+            did_change();
             return;
         }
         if (m_cursor.column() == 0 && m_cursor.line() != 0) {
@@ -627,6 +628,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
             update_content_size();
             update();
             set_cursor(m_cursor.line() - 1, previous_length);
+            did_change();
             return;
         }
         return;