force using tabs in makefile and snippets modes

This commit is contained in:
nightwing 2013-06-03 14:44:57 +04:00
commit 36c166b9ed
3 changed files with 6 additions and 5 deletions

View file

@ -461,7 +461,8 @@ var EditSession = function(text, mode) {
* @returns {Boolean}
**/
this.getUseSoftTabs = function() {
return this.$useSoftTabs;
// todo might need more general way for changing settings from mode, but this is ok for now
return this.$useSoftTabs && !this.$mode.$indentWithTabs;
};
/**
* Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event.

View file

@ -57,7 +57,9 @@ oop.inherits(Mode, TextMode);
(function() {
this.lineCommentStart = "#";
this.lineCommentStart = "#";
this.$indentWithTabs = true;
}).call(Mode.prototype);
exports.Mode = Mode;

View file

@ -105,9 +105,7 @@ var Mode = function() {
oop.inherits(Mode, TextMode);
(function() {
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
this.$indentWithTabs = true;
}).call(Mode.prototype);
exports.Mode = Mode;