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

Commit

Permalink
Fix for issue 3723 - Tabbing on single-line character range should re…
Browse files Browse the repository at this point in the history
…place characters with tab
  • Loading branch information
Jeffrey Fisher committed May 9, 2013
1 parent 649cd60 commit b388f29
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 b388f29

Please sign in to comment.