Skip to content

Commit

Permalink
make sure indenting a line causes the cursor to end up after leading …
Browse files Browse the repository at this point in the history
…whitespace, even if the indentation is not adjusted (thanks to Danny Yoo)
  • Loading branch information
marijnh committed Jul 29, 2010
1 parent a8e378e commit 2744957
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/editor.js
Expand Up @@ -929,6 +929,10 @@ var Editor = (function(){
whiteSpace.firstChild, newIndent, false, true);
}
}
// Make sure cursor ends up after the whitespace
else if (whiteSpace) {
select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, newIndent, false);
}
if (indentDiff != 0) this.addDirtyNode(start);
},

Expand Down

0 comments on commit 2744957

Please sign in to comment.