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

Commit

Permalink
Merge pull request #3759 from jeffslofish/issue-3723
Browse files Browse the repository at this point in the history
Fix for issue 3723
  • Loading branch information
redmunds committed May 9, 2013
2 parents dedcae2 + b388f29 commit aca415e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ define(function (require, exports, module) {
// the proper indentation then indent it to the proper place. Otherwise,
// add another tab. In either case, move the insertion point to the
// beginning of the text.
// 2. If the selection is after the first non-space character, and is not an
// insertion point, indent the entire line(s).
// 2. If the selection is multi-line, indent all the lines.
// 3. If the selection is after the first non-space character, and is an
// insertion point, insert a tab character or the appropriate number
// of spaces to pad to the nearest tab boundary.
Expand All @@ -144,7 +143,7 @@ define(function (require, exports, module) {
insertTab = true;
to.ch = 0;
}
} else if (instance.somethingSelected()) {
} else if (instance.somethingSelected() && from.line !== to.line) {
CodeMirror.commands.indentMore(instance);
} else {
insertTab = true;
Expand Down

0 comments on commit aca415e

Please sign in to comment.