Fixes microsoft/monaco-editor#1614: tabSize must be at least 1

This commit is contained in:
Alexandru Dima
2019-12-11 09:49:12 +01:00
parent 93f58e063e
commit c4198fac1f
+1 -1
View File
@@ -386,7 +386,7 @@ export class TextModelResolvedOptions {
defaultEOL: DefaultEndOfLine;
trimAutoWhitespace: boolean;
}) {
this.tabSize = src.tabSize | 0;
this.tabSize = Math.max(1, src.tabSize | 0);
this.indentSize = src.tabSize | 0;
this.insertSpaces = Boolean(src.insertSpaces);
this.defaultEOL = src.defaultEOL | 0;