file cleaning.

This commit is contained in:
rebornix
2021-02-21 23:13:03 -08:00
parent cbcec2e1b4
commit c38aa5a341
7 changed files with 8 additions and 14 deletions
+4 -4
View File
@@ -4088,12 +4088,12 @@ declare namespace monaco.editor {
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, EditorAutoClosingStrategy>;
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, EditorAutoClosingOvertypeStrategy>;
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, EditorAutoClosingStrategy>;
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
autoSurround: IEditorOption<EditorOption.autoSurround, EditorAutoSurroundStrategy>;
autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>;
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
codeLens: IEditorOption<EditorOption.codeLens, boolean>;
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
@@ -1743,7 +1743,6 @@ export interface ExtHostCommentsShape {
export interface INotebookSelectionChangeEvent {
primary: number | null;
// handles
selections: ICellRange[];
}
@@ -593,7 +593,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
this._onDidChangeNotebookEditorSelection.fire({
notebookEditor: editor.editor.editor,
selection: editor.editor.selection
selection: editor.editor.editor.selection
});
}
}
@@ -85,9 +85,7 @@ class NotebookEditorCellEditBuilder implements vscode.NotebookEditorEdit {
}
export class ExtHostNotebookEditor {
//TODO@rebornix noop setter?
selection?: vscode.NotebookCell;
private _selection?: vscode.NotebookCell;
private _selections: vscode.NotebookCellRange[] = [];
private _visibleRanges: extHostTypes.NotebookCellRange[] = [];
@@ -124,7 +122,7 @@ export class ExtHostNotebookEditor {
return that.notebookData.notebookDocument;
},
get selection() {
return that.selection;
return that._selection;
},
get selections() {
return that._selections;
@@ -178,7 +176,7 @@ export class ExtHostNotebookEditor {
}
_acceptSelections(primary: number | null, selections: ICellRange[]): void {
this.selection = primary !== null ? this.notebookData.getCellFromIndex(primary)?.cell : undefined;
this._selection = primary !== null ? this.notebookData.getCellFromIndex(primary)?.cell : undefined;
this._selections = selections.map(val => new extHostTypes.NotebookCellRange(val.start, val.end));
}
@@ -1285,7 +1285,6 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
focusElement(cell: ICellViewModel) {
this._list.focusElement(cell);
this._list.selectElement(cell);
}
revealCellRangeInView(range: ICellRange) {
@@ -924,7 +924,6 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
{ quotableLabel: 'Join Notebook Cells' }
);
// TODO@rebornix
this.selectionHandles = endSelections;
return { cell: above, deletedCells: [cell] };
@@ -299,7 +299,6 @@ export type NotebookCellsChangedEventDto = {
export type NotebookRawContentEvent = (NotebookCellsInitializeEvent<ICell> | NotebookDocumentChangeMetadataEvent | NotebookCellContentChangeEvent | NotebookCellsModelChangedEvent<ICell> | NotebookCellsModelMoveEvent<ICell> | NotebookOutputChangedEvent | NotebookOutputItemChangedEvent | NotebookCellsChangeLanguageEvent | NotebookCellsChangeMetadataEvent | NotebookDocumentUnknownChangeEvent) & { transient: boolean; };
export enum SelectionStateType {
Handle = 0,
Index = 1