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

Commit

Permalink
Merge pull request #3487 from TomMalbran/tom/fix-issue-3466
Browse files Browse the repository at this point in the history
Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field.
  • Loading branch information
RaymondLim committed Apr 24, 2013
2 parents a111e01 + dd2f75f commit 26e9c90
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 26e9c90

Please sign in to comment.