Merge from vscode 8aa90d444f5d051984e8055f547c4252d53479b3 (#5587)

* Merge from vscode 8aa90d444f5d051984e8055f547c4252d53479b3

* pipeline errors

* fix build
This commit is contained in:
Anthony Dresser
2019-05-23 11:16:03 -07:00
committed by GitHub
parent ca36f20c6b
commit cf8f8907ee
141 changed files with 6450 additions and 1228 deletions

View File

@@ -342,6 +342,9 @@ export class SearchView extends ViewletPanel {
return this.inputPatternExcludes;
}
/**
* Warning: a bit expensive due to updating the view title
*/
protected updateActions(): void {
for (const action of this.actions) {
action.update();
@@ -1386,6 +1389,8 @@ export class SearchView extends ViewletPanel {
let visibleMatches = 0;
let updatedActionsForFileCount = false;
// Handle UI updates in an interval to show frequent progress and results
const uiRefreshHandle: any = setInterval(() => {
if (!this.searching) {
@@ -1399,7 +1404,9 @@ export class SearchView extends ViewletPanel {
visibleMatches = fileCount;
this.refreshAndUpdateCount();
}
if (fileCount > 0) {
if (fileCount > 0 && !updatedActionsForFileCount) {
updatedActionsForFileCount = true;
this.updateActions();
}
}, 100);