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

Commit 3b60d0d

Browse files
committed
pass fullPath as context to get
1 parent 9e80121 commit 3b60d0d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • src/extensions/default/JSLint

src/extensions/default/JSLint/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ define(function (require, exports, module) {
6161
var ENVIRONMENTS = ["browser", "node", "couch", "rhino"];
6262

6363
// gets indentation size depending whether the tabs or spaces are used
64-
function _getIndentSize() {
65-
return PreferencesManager.get("useTabChar") ? PreferencesManager.get("tabSize") : PreferencesManager.get("spaceUnits");
64+
function _getIndentSize(fullPath) {
65+
return PreferencesManager.get(
66+
PreferencesManager.get("useTabChar", fullPath) ? "tabSize" : "spaceUnits",
67+
fullPath
68+
);
6669
}
6770

6871
/**
@@ -93,7 +96,7 @@ define(function (require, exports, module) {
9396

9497
if (!options.indent) {
9598
// default to using the same indentation value that the editor is using
96-
options.indent = _getIndentSize();
99+
options.indent = _getIndentSize(fullPath);
97100
}
98101

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

0 commit comments

Comments
 (0)