diff options
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/ui/editor.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index debce9b4..70f60070 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); } |