fix: address clippy warning about match single binding

pull/13821/head
cor 2025-06-23 15:17:22 +02:00
parent 395371db51
commit 5af123a4d9
No known key found for this signature in database
1 changed files with 6 additions and 9 deletions

View File

@ -1588,15 +1588,12 @@ impl Component for EditorView {
} }
fn cursor(&self, _area: Rect, editor: &Editor) -> (Option<Position>, CursorKind) { fn cursor(&self, _area: Rect, editor: &Editor) -> (Option<Position>, CursorKind) {
match editor.cursor() { let (pos, kind) = editor.cursor();
(pos, kind) => { if self.terminal_focused {
if self.terminal_focused { (pos, kind)
(pos, kind) } else {
} else { // use underline cursor when terminal loses focus for visibility
// use underline cursor when terminal loses focus for visibility (pos, CursorKind::Underline)
(pos, CursorKind::Underline)
}
}
} }
} }
} }