Skip to content

Commit

Permalink
fix: #391 [Editor] cursor always blinks even when not in focus
Browse files Browse the repository at this point in the history
  • Loading branch information
KhodyrevDS committed Jan 19, 2025
1 parent 5248709 commit 45dcfde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/views/editor/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ impl EditorView {

pub fn paint_text(
cx: &mut PaintCx,
view_id: &ViewId,
ed: &Editor,
viewport: Rect,
is_active: bool,
Expand Down Expand Up @@ -763,7 +762,7 @@ impl EditorView {
}

let is_cursor_visible = cx.app_state.is_focused(view_id);
if (is_cursor_visible) {
if is_cursor_visible {
Self::paint_cursor_caret(cx, ed, is_active, screen_lines);
}

Expand Down Expand Up @@ -901,7 +900,6 @@ impl View for EditorView {
let screen_lines = ed.screen_lines.get_untracked();
EditorView::paint_text(
cx,
&self.id(),
&ed,
viewport,
self.is_active.get_untracked(),
Expand Down

0 comments on commit 45dcfde

Please sign in to comment.