mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
indentation: remove setIndentationOptions
This commit is contained in:
@@ -213,10 +213,6 @@ export abstract class CommonCodeEditor extends EventEmitter implements IActionPr
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public setIndentationOptions(indentationOptions: editorCommon.IInternalIndentationOptions): void {
|
|
||||||
this._configuration.setIndentationOptions(indentationOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
public normalizeIndentation(str:string): string {
|
public normalizeIndentation(str:string): string {
|
||||||
return this._configuration.normalizeIndentation(str);
|
return this._configuration.normalizeIndentation(str);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -727,10 +727,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
|
|||||||
return this.editor.indentInfo;
|
return this.editor.indentInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setIndentationOptions(indentationOptions: editorCommon.IInternalIndentationOptions): void {
|
|
||||||
this.editor.indentInfo = indentationOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
private _normalizeIndentationFromWhitespace(str:string): string {
|
private _normalizeIndentationFromWhitespace(str:string): string {
|
||||||
let indentation = this.getIndentationOptions(),
|
let indentation = this.getIndentationOptions(),
|
||||||
spacesCnt = 0,
|
spacesCnt = 0,
|
||||||
|
|||||||
@@ -3078,11 +3078,6 @@ export interface ICommonCodeEditor extends IEditor {
|
|||||||
*/
|
*/
|
||||||
getIndentationOptions(): IInternalIndentationOptions;
|
getIndentationOptions(): IInternalIndentationOptions;
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the indentation options of the editor.
|
|
||||||
*/
|
|
||||||
setIndentationOptions(IInternalIndentationOptions): void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize whitespace using the editor's whitespace specific settings
|
* Normalize whitespace using the editor's whitespace specific settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export abstract class Indent extends EditorAction {
|
|||||||
public run(): TPromise<boolean> {
|
public run(): TPromise<boolean> {
|
||||||
return TPromise.timeout(50 /* quick open is sensitive to being opened so soon after another */).then(() =>
|
return TPromise.timeout(50 /* quick open is sensitive to being opened so soon after another */).then(() =>
|
||||||
this.quickOpenService.pick(['1', '2', '3', '4', '5', '6', '7', '8'], { placeHolder: nls.localize('selectTabWidth', "Select Tab Width")}).then(pick => {
|
this.quickOpenService.pick(['1', '2', '3', '4', '5', '6', '7', '8'], { placeHolder: nls.localize('selectTabWidth', "Select Tab Width")}).then(pick => {
|
||||||
this.editor.setIndentationOptions({
|
this.editor.updateOptions({
|
||||||
insertSpaces: this.insertSpaces,
|
insertSpaces: this.insertSpaces,
|
||||||
tabSize: parseInt(pick)
|
tabSize: parseInt(pick)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user