input: Pause blink and keep show cursor on moving or editing. (#1236)
https://github.com/user-attachments/assets/751d0b62-18f9-41c8-80a0-e11439e3b91e
This commit is contained in:
parent
43c848893c
commit
5beaed2a9e
2 changed files with 3 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ impl BlinkCursor {
|
|||
/// Pause the blinking, and delay 500ms to resume the blinking.
|
||||
pub fn pause(&mut self, cx: &mut Context<Self>) {
|
||||
self.paused = true;
|
||||
self.visible = true;
|
||||
cx.notify();
|
||||
|
||||
// delay 500ms to start the blinking
|
||||
|
|
|
|||
|
|
@ -2082,6 +2082,8 @@ impl EntityInputHandler for InputState {
|
|||
return;
|
||||
}
|
||||
|
||||
self.pause_blink_cursor(cx);
|
||||
|
||||
let range = range_utf16
|
||||
.as_ref()
|
||||
.map(|range_utf16| self.range_from_utf16(range_utf16))
|
||||
|
|
|
|||
Loading…
Reference in a new issue