From 69e75ec17f74d10b9236d1534c403a46c2497bf3 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 11 Jan 2019 11:47:26 +0100 Subject: [PATCH] explorer: do not always recursvily refresh --- .../parts/files/electron-browser/views/explorerView.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts index e32a1a11cd2..c538216e9fd 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts @@ -350,15 +350,17 @@ export class ExplorerView extends ViewletPanel { /** * Refresh the contents of the explorer to get up to date data from the disk about the file structure. + * If the item is passed we refresh only that level of the tree, otherwise we do a full refresh. */ refresh(item?: ExplorerItem): Promise { if (!this.tree || !this.isBodyVisible()) { this.shouldRefresh = true; return Promise.resolve(undefined); } + const recursive = !item; const toRefresh = item || this.tree.getInput(); - return this.tree.refresh(toRefresh, true); + return this.tree.refresh(toRefresh, recursive); } getOptimalWidth(): number { -- GitLab