mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Dont show empty progress for empty workspaces
This commit is contained in:
parent
7d82152b21
commit
44b8737ced
1 changed files with 18 additions and 16 deletions
|
@ -168,6 +168,7 @@ impl GlobalState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vfs::loader::Message::Progress { n_total, n_done } => {
|
vfs::loader::Message::Progress { n_total, n_done } => {
|
||||||
|
if n_total > 0 {
|
||||||
let state = if n_done == 0 {
|
let state = if n_done == 0 {
|
||||||
Progress::Begin
|
Progress::Begin
|
||||||
} else if n_done < n_total {
|
} else if n_done < n_total {
|
||||||
|
@ -185,6 +186,7 @@ impl GlobalState {
|
||||||
Some(Progress::percentage(n_done, n_total)),
|
Some(Progress::percentage(n_done, n_total)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Event::Flycheck(task) => match task {
|
Event::Flycheck(task) => match task {
|
||||||
flycheck::Message::AddDiagnostic { workspace_root, diagnostic } => {
|
flycheck::Message::AddDiagnostic { workspace_root, diagnostic } => {
|
||||||
|
|
Loading…
Reference in a new issue