Extract multi_buffer module out of editor (#3170)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2023-10-25 19:31:47 +02:00
committed by GitHub
parent 1936ba5e30
commit 7f6bb3d1eb
15 changed files with 347 additions and 213 deletions
+1 -1
View File
@@ -993,8 +993,8 @@ mod tests {
use super::*;
use crate::display_map::inlay_map::InlayMap;
use crate::display_map::{fold_map::FoldMap, tab_map::TabMap, wrap_map::WrapMap};
use crate::multi_buffer::MultiBuffer;
use gpui::{elements::Empty, Element};
use multi_buffer::MultiBuffer;
use rand::prelude::*;
use settings::SettingsStore;
use std::env;
+1 -1
View File
@@ -91,7 +91,7 @@ impl<'a> FoldMapWriter<'a> {
// For now, ignore any ranges that span an excerpt boundary.
let fold = Fold(buffer.anchor_after(range.start)..buffer.anchor_before(range.end));
if fold.0.start.excerpt_id() != fold.0.end.excerpt_id() {
if fold.0.start.excerpt_id != fold.0.end.excerpt_id {
continue;
}
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::{
multi_buffer::{MultiBufferChunks, MultiBufferRows},
Anchor, InlayId, MultiBufferSnapshot, ToOffset,
};
use crate::{Anchor, InlayId, MultiBufferSnapshot, ToOffset};
use collections::{BTreeMap, BTreeSet};
use gpui::fonts::HighlightStyle;
use language::{Chunk, Edit, Point, TextSummary};
use multi_buffer::{MultiBufferChunks, MultiBufferRows};
use std::{
any::TypeId,
cmp,