fix: request redraw when editor needs to redraw

chore: update libcosmic

fix: redraw when deleting text where cursor doesn't move

editor only redraws if the action causes the cursor to move.
ctrl+a+backspace or presseing delete doesn't move the cursor.
This commit is contained in:
Hojjat 2026-08-04 14:00:50 -06:00
parent 4ac0da3af9
commit aad6c21ab4
2 changed files with 24 additions and 18 deletions

View file

@ -1089,11 +1089,13 @@ where
Named::Backspace => {
delete_modifiers(&mut editor, Motion::LeftWord, *modifiers);
editor.action(Action::Backspace);
editor.set_redraw(true);
shell.capture_event();
}
Named::Delete => {
delete_modifiers(&mut editor, Motion::RightWord, *modifiers);
editor.action(Action::Delete);
editor.set_redraw(true);
shell.capture_event();
}
Named::Tab => {
@ -1412,6 +1414,10 @@ where
shell.publish(on_changed.clone());
}
}
if editor.redraw() {
shell.request_redraw();
}
}
}