Select the last root when right-clicking below all project panel entries
This commit is contained in:
parent
ea1f6d6e00
commit
4aa19c1a7f
2 changed files with 64 additions and 62 deletions
|
@ -1042,7 +1042,7 @@ impl Project {
|
|||
pub fn worktrees<'a>(
|
||||
&'a self,
|
||||
cx: &'a AppContext,
|
||||
) -> impl 'a + Iterator<Item = ModelHandle<Worktree>> {
|
||||
) -> impl 'a + DoubleEndedIterator<Item = ModelHandle<Worktree>> {
|
||||
self.worktrees
|
||||
.iter()
|
||||
.filter_map(move |worktree| worktree.upgrade(cx))
|
||||
|
@ -1051,7 +1051,7 @@ impl Project {
|
|||
pub fn visible_worktrees<'a>(
|
||||
&'a self,
|
||||
cx: &'a AppContext,
|
||||
) -> impl 'a + Iterator<Item = ModelHandle<Worktree>> {
|
||||
) -> impl 'a + DoubleEndedIterator<Item = ModelHandle<Worktree>> {
|
||||
self.worktrees.iter().filter_map(|worktree| {
|
||||
worktree.upgrade(cx).and_then(|worktree| {
|
||||
if worktree.read(cx).is_visible() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue