mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Merge remote-tracking branch 'origin/master' into alex/tokenization
This commit is contained in:
@@ -583,7 +583,7 @@ export class TextEditorOptions extends EditorOptions {
|
||||
public static from(input: IBaseResourceInput): TextEditorOptions {
|
||||
let options: TextEditorOptions = null;
|
||||
if (input && input.options) {
|
||||
if (input.options.selection || input.options.forceOpen || input.options.revealIfVisible || input.options.preserveFocus || input.options.pinned || input.options.inactive || typeof input.options.index === 'number') {
|
||||
if (input.options.selection || input.options.viewState || input.options.forceOpen || input.options.revealIfVisible || input.options.preserveFocus || input.options.pinned || input.options.inactive || typeof input.options.index === 'number') {
|
||||
options = new TextEditorOptions();
|
||||
}
|
||||
|
||||
@@ -616,6 +616,10 @@ export class TextEditorOptions extends EditorOptions {
|
||||
options.revealInCenterIfOutsideViewport = true;
|
||||
}
|
||||
|
||||
if (input.options.viewState) {
|
||||
options.editorViewState = input.options.viewState;
|
||||
}
|
||||
|
||||
if (typeof input.options.index === 'number') {
|
||||
options.index = input.options.index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user