mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-29 17:41:32 +01:00
Maintain editor category and step when no walkthrough found (#189873)
* Maintain editor category and step when no walkthrough found * Remove unused import
This commit is contained in:
+2
-2
@@ -10,7 +10,7 @@ import { EditorExtensions, IEditorFactoryRegistry } from 'vs/workbench/common/ed
|
||||
import { MenuId, registerAction2, Action2 } from 'vs/platform/actions/common/actions';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ContextKeyExpr, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IEditorService, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { EditorPaneDescriptor, IEditorPaneRegistry } from 'vs/workbench/browser/editor';
|
||||
@@ -106,7 +106,7 @@ registerAction2(class extends Action2 {
|
||||
editorService.openEditor({
|
||||
resource: GettingStartedInput.RESOURCE,
|
||||
options: <GettingStartedEditorOptions>{ selectedCategory: selectedCategory, selectedStep: selectedStep, preserveFocus: toSide ?? false }
|
||||
}, toSide ? SIDE_GROUP : undefined);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
editorService.openEditor({ resource: GettingStartedInput.RESOURCE });
|
||||
|
||||
@@ -851,16 +851,11 @@ export class GettingStartedPage extends EditorPane {
|
||||
if (!this.currentWalkthrough) {
|
||||
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
||||
this.currentWalkthrough = this.gettingStartedCategories.find(category => category.id === this.editorInput.selectedCategory);
|
||||
}
|
||||
|
||||
if (!this.currentWalkthrough) {
|
||||
console.error('Could not restore to category ' + this.editorInput.selectedCategory + ' as it was not found');
|
||||
this.editorInput.selectedCategory = undefined;
|
||||
this.editorInput.selectedStep = undefined;
|
||||
} else {
|
||||
this.buildCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
||||
this.setSlide('details');
|
||||
return;
|
||||
if (this.currentWalkthrough) {
|
||||
this.buildCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
||||
this.setSlide('details');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user