Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 17612b7

Browse files
committed
protect against modulo zero, and negative tab size
1 parent 3803e25 commit 17612b7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/editor/Editor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,9 @@ define(function (require, exports, module) {
887887
if (tabSize === null) {
888888
tabSize = Editor.getTabSize();
889889
}
890-
column += (tabSize - (column % tabSize));
890+
if (tabSize > 0) {
891+
column += (tabSize - (column % tabSize));
892+
}
891893
} else {
892894
column++;
893895
}

0 commit comments

Comments
 (0)