mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-07 00:06:24 +03:00
Make BlockMap::sync
private
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
dfbfa86548
commit
61d8848b31
@ -85,13 +85,13 @@ impl DisplayMap {
|
||||
let (snapshot, edits) = self
|
||||
.wrap_map
|
||||
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
|
||||
self.block_map.sync(&snapshot, edits, cx);
|
||||
self.block_map.read(snapshot, edits, cx);
|
||||
let (snapshot, edits) = fold_map.fold(ranges, cx);
|
||||
let (snapshot, edits) = self.tab_map.sync(snapshot, edits);
|
||||
let (snapshot, edits) = self
|
||||
.wrap_map
|
||||
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
|
||||
self.block_map.sync(&snapshot, edits, cx);
|
||||
self.block_map.read(snapshot, edits, cx);
|
||||
}
|
||||
|
||||
pub fn unfold<T: ToOffset>(
|
||||
@ -104,13 +104,13 @@ impl DisplayMap {
|
||||
let (snapshot, edits) = self
|
||||
.wrap_map
|
||||
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
|
||||
self.block_map.sync(&snapshot, edits, cx);
|
||||
self.block_map.read(snapshot, edits, cx);
|
||||
let (snapshot, edits) = fold_map.unfold(ranges, cx);
|
||||
let (snapshot, edits) = self.tab_map.sync(snapshot, edits);
|
||||
let (snapshot, edits) = self
|
||||
.wrap_map
|
||||
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
|
||||
self.block_map.sync(&snapshot, edits, cx);
|
||||
self.block_map.read(snapshot, edits, cx);
|
||||
}
|
||||
|
||||
pub fn insert_blocks<P, T>(
|
||||
|
@ -163,7 +163,7 @@ impl BlockMap {
|
||||
BlockMapWriter(self)
|
||||
}
|
||||
|
||||
pub fn sync(&self, wrap_snapshot: &WrapSnapshot, edits: Vec<WrapEdit>, cx: &AppContext) {
|
||||
fn sync(&self, wrap_snapshot: &WrapSnapshot, edits: Vec<WrapEdit>, cx: &AppContext) {
|
||||
if edits.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ use smol::Timer;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
cmp::{self, Ordering},
|
||||
collections::{HashMap, HashSet},
|
||||
collections::HashMap,
|
||||
iter, mem,
|
||||
ops::{Range, RangeInclusive},
|
||||
rc::Rc,
|
||||
|
Loading…
Reference in New Issue
Block a user