mirror of
https://github.com/Microsoft/vscode
synced 2024-09-20 02:58:15 +00:00
parent
3d63750fda
commit
587a1047bc
|
@ -244,6 +244,10 @@ class MainPanel extends ViewletPanel {
|
|||
this.list.setSelection([...selection.slice(0, index), ...selection.slice(index + 1)]);
|
||||
}
|
||||
|
||||
getSelection(): ISCMRepository[] {
|
||||
return this.list.getSelectedElements();
|
||||
}
|
||||
|
||||
private splice(index: number, deleteCount: number, repositories: ISCMRepository[] = []): void {
|
||||
const wasEmpty = this.list.length === 0;
|
||||
|
||||
|
@ -854,6 +858,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
|
|||
this.addPanel(this.mainPanel, this.mainPanel.minimumSize, 0);
|
||||
|
||||
const selectionChangeDisposable = this.mainPanel.onSelectionChange(this.onSelectionChange, this);
|
||||
this.onSelectionChange(this.mainPanel.getSelection());
|
||||
|
||||
this.mainPanelDisposable = toDisposable(() => {
|
||||
this.removePanel(this.mainPanel);
|
||||
|
|
Loading…
Reference in a new issue