mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 09:18:52 +00:00
GTextEditor: Always call did_change() after deleting with backspace
This is needed for the on_change callback to fire.
This commit is contained in:
parent
07933d0b46
commit
fcf85d8fef
Notes:
sideshowbarker
2024-07-19 12:29:16 +09:00
Author: https://github.com/awesomekling
Commit: fcf85d8fef
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue