Skip to content

Commit

Permalink
fix bug where tabs confused the indenter
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Mar 15, 2011
1 parent 5baf7b5 commit 06540e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ var CodeMirror = (function() {
if (n) indentation = lines[n-1].indentation();
else indentation = 0;
}
else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpace));
else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length));
else if (how == "add") indentation = curSpace + options.indentUnit;
else if (how == "subtract") indentation = Math.max(0, curSpace - options.indentUnit);
var diff = indentation - curSpace;
Expand Down

0 comments on commit 06540e3

Please sign in to comment.