Ignore diagnostics received for invisible worktrees
This commit is contained in:
parent
d0d6916167
commit
c613b22619
1 changed files with 4 additions and 0 deletions
|
@ -1218,6 +1218,10 @@ impl Project {
|
||||||
let (worktree, relative_path) = self
|
let (worktree, relative_path) = self
|
||||||
.find_local_worktree(&abs_path, cx)
|
.find_local_worktree(&abs_path, cx)
|
||||||
.ok_or_else(|| anyhow!("no worktree found for diagnostics"))?;
|
.ok_or_else(|| anyhow!("no worktree found for diagnostics"))?;
|
||||||
|
if !worktree.read(cx).is_visible() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let project_path = ProjectPath {
|
let project_path = ProjectPath {
|
||||||
worktree_id: worktree.read(cx).id(),
|
worktree_id: worktree.read(cx).id(),
|
||||||
path: relative_path.into(),
|
path: relative_path.into(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue