mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
fix: Only refresh syntax tree view when the active document changes
This commit is contained in:
parent
9aa0ee1bba
commit
c272bcdb69
1 changed files with 8 additions and 1 deletions
|
|
@ -361,7 +361,14 @@ export class Ctx implements RustAnalyzerExtensionApi {
|
|||
}
|
||||
});
|
||||
|
||||
vscode.workspace.onDidChangeTextDocument(async () => {
|
||||
vscode.workspace.onDidChangeTextDocument(async (e) => {
|
||||
if (
|
||||
vscode.window.activeTextEditor?.document !== e.document ||
|
||||
e.contentChanges.length === 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.syntaxTreeView?.visible) {
|
||||
await this.syntaxTreeProvider?.refresh();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue