From 8f6b8b2e4351891573150e915c1895f1cd6152e0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 12 Apr 2021 19:05:56 +0200 Subject: [PATCH] :memo: --- zed/src/editor/buffer/mod.rs | 1 + zed/src/editor/buffer_view.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/zed/src/editor/buffer/mod.rs b/zed/src/editor/buffer/mod.rs index b143a4bf33..3ce9ba96ca 100644 --- a/zed/src/editor/buffer/mod.rs +++ b/zed/src/editor/buffer/mod.rs @@ -2290,6 +2290,7 @@ impl ToPoint for usize { #[cfg(test)] mod tests { use super::*; + use cmp::Ordering; use gpui::App; use std::collections::BTreeMap; use std::{cell::RefCell, rc::Rc}; diff --git a/zed/src/editor/buffer_view.rs b/zed/src/editor/buffer_view.rs index 22cd3f0c9f..5960015b45 100644 --- a/zed/src/editor/buffer_view.rs +++ b/zed/src/editor/buffer_view.rs @@ -722,6 +722,7 @@ impl BufferView { } fn update_selections(&self, mut selections: Vec, ctx: &mut ViewContext) { + // Merge overlapping selections. let buffer = self.buffer.as_ref(ctx); let mut i = 1; while i < selections.len() {