Merge from vscode 27ada910e121e23a6d95ecca9cae595fb98ab568

This commit is contained in:
ADS Merger
2020-04-30 00:53:43 +00:00
parent 87e5239713
commit 93f35ca321
413 changed files with 7190 additions and 8756 deletions

View File

@@ -184,7 +184,7 @@ export class SCMStatusController implements IWorkbenchContribution {
if (count > 0) {
const badge = new NumberBadge(count, num => localize('scmPendingChangesBadge', '{0} pending changes', num));
this.badgeDisposable.value = this.activityService.showActivity(VIEWLET_ID, badge, 'scm-viewlet-label');
this.badgeDisposable.value = this.activityService.showViewContainerActivity(VIEWLET_ID, { badge, clazz: 'scm-viewlet-label' });
} else {
this.badgeDisposable.clear();
}

View File

@@ -300,7 +300,7 @@ class DirtyDiffWidget extends PeekViewWidget {
fixedOverflowWidgets: true,
minimap: { enabled: false },
renderSideBySide: false,
readOnly: true,
readOnly: false,
ignoreTrimWhitespace: false
};
@@ -357,6 +357,10 @@ class DirtyDiffWidget extends PeekViewWidget {
protected revealLine(lineNumber: number) {
this.editor.revealLineInCenterIfOutsideViewport(lineNumber, ScrollType.Smooth);
}
hasFocus(): boolean {
return this.diffEditor.hasTextFocus();
}
}
export class ShowPreviousChangeAction extends EditorAction {
@@ -690,9 +694,10 @@ export class DirtyDiffController extends Disposable implements IEditorContributi
}
private onDidModelChange(splices: ISplice<IChange>[]): void {
if (!this.model) {
if (!this.model || !this.widget || this.widget.hasFocus()) {
return;
}
for (const splice of splices) {
if (splice.start <= this.currentIndex) {
if (this.currentIndex < splice.start + splice.deleteCount) {

View File

@@ -249,6 +249,10 @@ export class MainPane extends ViewPane {
this.updateBodySize();
}
focus(): void {
this.list.domFocus();
}
protected layoutBody(height: number, width: number): void {
super.layoutBody(height, width);
this.list.layout(height, width);

View File

@@ -865,13 +865,7 @@ export class RepositoryPane extends ViewPane {
const actionRunner = new RepositoryPaneActionRunner(() => this.getSelectedResources());
this._register(actionRunner);
this._register(actionRunner.onDidRun(() => {
if (this.repository.input.visible && this.inputEditor.hasWidgetFocus()) {
return;
}
this.tree.domFocus();
}));
this._register(actionRunner.onDidBeforeRun(() => this.tree.domFocus()));
const renderers = [
new ResourceGroupRenderer(actionViewItemProvider, this.themeService, this.menus),
@@ -1083,7 +1077,7 @@ export class RepositoryPane extends ViewPane {
}
const actionRunner = new RepositoryPaneActionRunner(() => this.getSelectedResources());
actionRunner.onDidRun(() => this.tree.domFocus());
actionRunner.onDidBeforeRun(() => this.tree.domFocus());
this.contextMenuService.showContextMenu({
getAnchor: () => e.anchor,