Merge from vscode 7653d836944892f83ce9e1f95c1204bafa1aec31

This commit is contained in:
ADS Merger
2020-05-08 03:58:34 +00:00
parent dac1970c43
commit fa62ec1f34
209 changed files with 5131 additions and 2480 deletions

View File

@@ -35,6 +35,7 @@ export const ActiveEditorIsReadonlyContext = new RawContextKey<boolean>('activeE
export const ActiveEditorAvailableEditorIdsContext = new RawContextKey<string>('activeEditorAvailableEditorIds', '');
export const EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
export const EditorPinnedContext = new RawContextKey<boolean>('editorPinned', false);
export const EditorStickyContext = new RawContextKey<boolean>('editorSticky', false);
export const EditorGroupActiveEditorDirtyContext = new RawContextKey<boolean>('groupActiveEditorDirty', false);
export const EditorGroupEditorsCountContext = new RawContextKey<number>('groupEditorsCount', 0);
export const NoEditorsVisibleContext = EditorsVisibleContext.toNegated();
@@ -1046,6 +1047,12 @@ export class EditorOptions implements IEditorOptions {
*/
pinned: boolean | undefined;
/**
* An editor that is sticky moves to the beginning of the editors list within the group and will remain
* there unless explicitly closed. Operations such as "Close All" will not close sticky editors.
*/
sticky: boolean | undefined;
/**
* The index in the document stack where to insert the editor into when opening.
*/
@@ -1111,6 +1118,10 @@ export class EditorOptions implements IEditorOptions {
this.pinned = options.pinned;
}
if (typeof options.sticky === 'boolean') {
this.sticky = options.sticky;
}
if (typeof options.inactive === 'boolean') {
this.inactive = options.inactive;
}
@@ -1291,6 +1302,7 @@ export class EditorCommandsContextActionRunner extends ActionRunner {
export interface IEditorCloseEvent extends IEditorIdentifier {
replaced: boolean;
index: number;
sticky: boolean;
}
export type GroupIdentifier = number;