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

Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field. #3487

Merged
merged 1 commit into from
Apr 24, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/editor/EditorStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ define(function (require, exports, module) {

// restore focus to the editor
EditorManager.focusEditor();

if (!value || isNaN(value)) {
return;
}

value = Math.max(Math.min(value, 10), 1);
value = Math.max(Math.min(Math.floor(value), 10), 1);
if (Editor.getUseTabChar()) {
Editor.setTabSize(value);
} else {
Expand Down