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

Commit 26e9c90

Browse files
committed
Merge pull request #3487 from TomMalbran/tom/fix-issue-3466
Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field.
2 parents a111e01 + dd2f75f commit 26e9c90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/editor/EditorStatusBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ define(function (require, exports, module) {
9898

9999
// restore focus to the editor
100100
EditorManager.focusEditor();
101-
101+
102102
if (!value || isNaN(value)) {
103103
return;
104104
}
105105

106-
value = Math.max(Math.min(value, 10), 1);
106+
value = Math.max(Math.min(Math.floor(value), 10), 1);
107107
if (Editor.getUseTabChar()) {
108108
Editor.setTabSize(value);
109109
} else {

0 commit comments

Comments
 (0)