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

Commit

Permalink
Fixes after first review
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMalbran committed Mar 22, 2013
1 parent eb8eb01 commit 312a8f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ define(function (require, exports, module) {
*/
function _setEditorOptionAndPref(value, cmOption, prefName) {
_setEditorOption(value, cmOption);
_prefs.setValue(prefName, (typeof value === "boolean") ? Boolean(value) : value);
_prefs.setValue(prefName, value);
}

/**
Expand All @@ -1351,7 +1351,7 @@ define(function (require, exports, module) {
Editor.getUseTabChar = function () {
return _useTabChar;
};

/**
* Sets tab character width. Affects all Editors.
* @param {number} value
Expand All @@ -1366,7 +1366,7 @@ define(function (require, exports, module) {
Editor.getTabSize = function () {
return _tabSize;
};

/**
* Sets indentation width. Affects all Editors.
* @param {number} value
Expand Down
5 changes: 3 additions & 2 deletions src/editor/EditorStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ define(function (require, exports, module) {
return;
}

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

// update indicator
Expand Down

0 comments on commit 312a8f4

Please sign in to comment.