aboutsummaryrefslogtreecommitdiff
path: root/src/selection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection.rs')
-rw-r--r--src/selection.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/selection.rs b/src/selection.rs
index a3ab0ac5..ebc84bee 100644
--- a/src/selection.rs
+++ b/src/selection.rs
@@ -106,12 +106,16 @@ impl Selection {
debug_assert!(!(tail < front));
// Single-cell selections are a special case
- if start == end && start_side != end_side {
- return Some(Span {
- ty: SpanType::Inclusive,
- front: *front,
- tail: *tail
- });
+ if start == end {
+ if start_side != end_side {
+ return Some(Span {
+ ty: SpanType::Inclusive,
+ front: *front,
+ tail: *tail
+ });
+ } else {
+ return None;
+ }
}
// The other special case is two adjacent cells with no