Rename strong_worktrees -> visible_worktrees
This commit is contained in:
parent
68cfce1fb8
commit
ca920e1552
2 changed files with 4 additions and 4 deletions
|
@ -479,7 +479,7 @@ impl Project {
|
|||
.filter_map(move |worktree| worktree.upgrade(cx))
|
||||
}
|
||||
|
||||
pub fn strong_worktrees<'a>(
|
||||
pub fn visible_worktrees<'a>(
|
||||
&'a self,
|
||||
cx: &'a AppContext,
|
||||
) -> impl 'a + Iterator<Item = ModelHandle<Worktree>> {
|
||||
|
@ -2065,7 +2065,7 @@ impl Project {
|
|||
) -> Task<Result<HashMap<ModelHandle<Buffer>, Vec<Range<Anchor>>>>> {
|
||||
if self.is_local() {
|
||||
let snapshots = self
|
||||
.strong_worktrees(cx)
|
||||
.visible_worktrees(cx)
|
||||
.filter_map(|tree| {
|
||||
let tree = tree.read(cx).as_local()?;
|
||||
Some(tree.snapshot())
|
||||
|
@ -2735,7 +2735,7 @@ impl Project {
|
|||
buffer.update(cx, |buffer, cx| buffer.apply_ops(ops, cx))?;
|
||||
}
|
||||
OpenBuffer::Loading(operations) => operations.extend_from_slice(&ops),
|
||||
_ => unreachable!(),
|
||||
OpenBuffer::Weak(_) => {}
|
||||
},
|
||||
hash_map::Entry::Vacant(e) => {
|
||||
e.insert(OpenBuffer::Loading(ops));
|
||||
|
|
|
@ -270,7 +270,7 @@ impl ProjectSymbolsView {
|
|||
range.end = cmp::min(range.end, view.matches.len());
|
||||
|
||||
let show_worktree_root_name =
|
||||
view.project.read(cx).strong_worktrees(cx).count() > 1;
|
||||
view.project.read(cx).visible_worktrees(cx).count() > 1;
|
||||
items.extend(view.matches[range].iter().enumerate().map(move |(ix, m)| {
|
||||
view.render_match(m, start + ix, show_worktree_root_name, cx)
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue