mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
@@ -633,7 +633,7 @@ export class SearchView extends ViewletPanel {
|
||||
};
|
||||
|
||||
this.treeLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility }));
|
||||
this.tree = this._register(<WorkbenchObjectTree<RenderableMatch, any>>this.instantiationService.createInstance(WorkbenchObjectTree,
|
||||
this.tree = this._register(this.instantiationService.createInstance(WorkbenchObjectTree,
|
||||
this.resultsElement,
|
||||
delegate,
|
||||
[
|
||||
@@ -896,13 +896,13 @@ export class SearchView extends ViewletPanel {
|
||||
0 :
|
||||
dom.getTotalHeight(this.messagesElement);
|
||||
|
||||
const searchResultContainerSize = this.size.height -
|
||||
const searchResultContainerHeight = this.size.height -
|
||||
messagesSize -
|
||||
dom.getTotalHeight(this.searchWidgetsContainerElement);
|
||||
|
||||
this.resultsElement.style.height = searchResultContainerSize + 'px';
|
||||
this.resultsElement.style.height = searchResultContainerHeight + 'px';
|
||||
|
||||
this.tree.layout(searchResultContainerSize, this.size.width);
|
||||
this.tree.layout(searchResultContainerHeight, this.size.width);
|
||||
}
|
||||
|
||||
protected layoutBody(height: number, width: number): void {
|
||||
@@ -1542,7 +1542,7 @@ export class SearchView extends ViewletPanel {
|
||||
|
||||
open(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<void> {
|
||||
const selection = this.getSelectionFrom(element);
|
||||
const resource = element instanceof Match ? element.parent().resource() : (<FileMatch>element).resource();
|
||||
const resource = element instanceof Match ? element.parent().resource : (<FileMatch>element).resource;
|
||||
return this.editorService.openEditor({
|
||||
resource: resource,
|
||||
options: {
|
||||
@@ -1600,7 +1600,7 @@ export class SearchView extends ViewletPanel {
|
||||
if (!this.untitledEditorService.isDirty(resource)) {
|
||||
const matches = this.viewModel.searchResult.matches();
|
||||
for (let i = 0, len = matches.length; i < len; i++) {
|
||||
if (resource.toString() === matches[i].resource().toString()) {
|
||||
if (resource.toString() === matches[i].resource.toString()) {
|
||||
this.viewModel.searchResult.remove(matches[i]);
|
||||
}
|
||||
}
|
||||
@@ -1614,11 +1614,8 @@ export class SearchView extends ViewletPanel {
|
||||
|
||||
const matches = this.viewModel.searchResult.matches();
|
||||
|
||||
for (let i = 0, len = matches.length; i < len; i++) {
|
||||
if (e.contains(matches[i].resource(), FileChangeType.DELETED)) {
|
||||
this.viewModel.searchResult.remove(matches[i]);
|
||||
}
|
||||
}
|
||||
const changedMatches = matches.filter(m => e.contains(m.resource, FileChangeType.DELETED));
|
||||
this.viewModel.searchResult.remove(changedMatches);
|
||||
}
|
||||
|
||||
getActions(): IAction[] {
|
||||
|
||||
Reference in New Issue
Block a user