提交 d47f1f00 编写于 作者: A Alex Dima

Fixes #1125: change defaults to insertSpaces: true, tabSize: 4

上级 960258c8
......@@ -63,8 +63,8 @@ class ConfigClass implements IConfiguration {
referenceInfos: true,
renderWhitespace: false,
tabSize: 'auto',
insertSpaces: 'auto',
tabSize: 4,
insertSpaces: true,
fontFamily: '',
fontSize: 0,
lineHeight: 0
......
......@@ -490,12 +490,14 @@ export interface ICommonEditorOptions {
export interface IEditorOptions extends ICommonEditorOptions {
/**
* Tab size in spaces. This is used for rendering and for editing.
* Defaults to 'auto', meaning the model attached to the editor will be scanned and this property will be guessed.
* 'auto' means the model attached to the editor will be scanned and this property will be guessed.
* Defaults to 4.
*/
tabSize?:any;
/**
* Insert spaces instead of tabs when indenting or when auto-indenting.
* Defaults to 'auto', meaning the model attached to the editor will be scanned and this property will be guessed.
* 'auto' means the model attached to the editor will be scanned and this property will be guessed.
* Defaults to true.
*/
insertSpaces?:any;
/**
......
......@@ -756,7 +756,10 @@ suite('Editor Controller - Cursor', () => {
test('Bug 9121: Auto indent + undo + redo is funky', () => {
var model = new Model.Model('', thisHighlighter);
var cursor = new Cursor.Cursor(1, new MockConfiguration(null), model, null, false);
var cursor = new Cursor.Cursor(1, new MockConfiguration({
tabSize: 4,
insertSpaces: false
}), model, null, false);
cursorCommand(cursor, H.Type, { text: '\n' }, null, 'keyboard');
assert.equal(model.getValue(EditorCommon.EndOfLinePreference.LF), '\n', 'assert1');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册