diff --git a/src/lib.rs b/src/lib.rs
index 9c6e8c6fa8b85ce55893c25538926779c31cd5b3..3a0452095c960793c03aaadc803a9bf8da0e2b71 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1187,34 +1187,31 @@ fn blink_cursor(
     mut cosmic_editor_q: Query<(&mut CosmicEditor, &BackgroundColor), Without<ReadOnly>>,
 ) {
     if let Some(e) = active_editor.entity {
-        match cosmic_editor_q.get_mut(e) {
-            Ok((mut editor, bg_color)) => {
-                let timer =
-                    timer.get_or_insert_with(|| Timer::from_seconds(0.53, TimerMode::Repeating));
+        if let Ok((mut editor, bg_color)) = cosmic_editor_q.get_mut(e) {
+            let timer =
+                timer.get_or_insert_with(|| Timer::from_seconds(0.53, TimerMode::Repeating));
 
-                timer.tick(time.delta());
-                if !timer.just_finished() && !active_editor.is_changed() {
-                    return;
-                }
-                *visible = !*visible;
-
-                // always start cursor visible on focus
-                if active_editor.is_changed() {
-                    *visible = true;
-                    timer.set_elapsed(Duration::from_secs(0));
-                }
+            timer.tick(time.delta());
+            if !timer.just_finished() && !active_editor.is_changed() {
+                return;
+            }
+            *visible = !*visible;
 
-                let mut cursor = editor.0.cursor();
-                let new_color = if *visible {
-                    None
-                } else {
-                    Some(bevy_color_to_cosmic(bg_color.0))
-                };
-                cursor.color = new_color;
-                editor.0.set_cursor(cursor);
-                editor.0.buffer_mut().set_redraw(true);
+            // always start cursor visible on focus
+            if active_editor.is_changed() {
+                *visible = true;
+                timer.set_elapsed(Duration::from_secs(0));
             }
-            Err(_) => {}
+
+            let mut cursor = editor.0.cursor();
+            let new_color = if *visible {
+                None
+            } else {
+                Some(bevy_color_to_cosmic(bg_color.0))
+            };
+            cursor.color = new_color;
+            editor.0.set_cursor(cursor);
+            editor.0.buffer_mut().set_redraw(true);
         }
     }
 }