diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index debce9b44..70f600708 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -1127,9 +1127,14 @@ impl EditorView { } let (view, doc) = current!(cxt.editor); - let range = doc.selection(view.id).primary(); - if range.to() - range.from() <= 1 { + if doc + .selection(view.id) + .primary() + .fragment(doc.text().slice(..)) + .width() + <= 1 + { return EventResult::Ignored(None); }