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

Commit

Permalink
pass fullPath as context to get
Browse files Browse the repository at this point in the history
  • Loading branch information
zaggino committed Mar 20, 2014
1 parent 9e80121 commit 3b60d0d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/extensions/default/JSLint/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ define(function (require, exports, module) {
var ENVIRONMENTS = ["browser", "node", "couch", "rhino"];

// gets indentation size depending whether the tabs or spaces are used
function _getIndentSize() {
return PreferencesManager.get("useTabChar") ? PreferencesManager.get("tabSize") : PreferencesManager.get("spaceUnits");
function _getIndentSize(fullPath) {
return PreferencesManager.get(
PreferencesManager.get("useTabChar", fullPath) ? "tabSize" : "spaceUnits",
fullPath
);
}

/**
Expand Down Expand Up @@ -93,7 +96,7 @@ define(function (require, exports, module) {

if (!options.indent) {
// default to using the same indentation value that the editor is using
options.indent = _getIndentSize();
options.indent = _getIndentSize(fullPath);
}

// If the user has not defined the environment, we use browser by default.
Expand Down

0 comments on commit 3b60d0d

Please sign in to comment.