Skip to content

Commit

Permalink
fix: reset blink only if position changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kneemund committed Nov 10, 2024
1 parent 65ebf89 commit bcdc42c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/rnote-engine/src/pens/typewriter/penevents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ impl Typewriter {
if let Ok(new_cursor) =
textstroke.get_cursor_for_global_coord(element.pos)
{
let previous_cursor_position = cursor.cur_cursor();
*cursor = new_cursor;

match mode {
Expand Down Expand Up @@ -253,7 +254,9 @@ impl Typewriter {
SelectionMode::Caret => {}
}

self.reset_blink();
if previous_cursor_position != cursor.cur_cursor() {
self.reset_blink();
}
}
}
}
Expand Down

0 comments on commit bcdc42c

Please sign in to comment.