mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Tweaks for #62079
This commit is contained in:
@@ -176,7 +176,7 @@ export interface MainThreadDocumentsShape extends IDisposable {
|
||||
|
||||
export interface ITextEditorConfigurationUpdate {
|
||||
tabSize?: number | 'auto';
|
||||
indentSize?: number | 'tab';
|
||||
indentSize?: number | 'tabSize';
|
||||
insertSpaces?: boolean | 'auto';
|
||||
cursorStyle?: TextEditorCursorStyle;
|
||||
lineNumbers?: TextEditorLineNumbersStyle;
|
||||
|
||||
@@ -206,9 +206,9 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
|
||||
return this._indentSize;
|
||||
}
|
||||
|
||||
private _validateIndentSize(value: number | string): number | 'tab' | null {
|
||||
if (value === 'tab') {
|
||||
return 'tab';
|
||||
private _validateIndentSize(value: number | string): number | 'tabSize' | null {
|
||||
if (value === 'tabSize') {
|
||||
return 'tabSize';
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
let r = Math.floor(value);
|
||||
@@ -318,7 +318,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
|
||||
|
||||
if (typeof newOptions.indentSize !== 'undefined') {
|
||||
let indentSize = this._validateIndentSize(newOptions.indentSize);
|
||||
if (indentSize === 'tab') {
|
||||
if (indentSize === 'tabSize') {
|
||||
hasUpdate = true;
|
||||
bulkConfigurationUpdate.indentSize = indentSize;
|
||||
} else if (typeof indentSize === 'number' && this._indentSize !== indentSize) {
|
||||
|
||||
Reference in New Issue
Block a user