Skip to content
Browse files

Merge pull request #287 from defunkt/patch-1

On a Mac, Ctrl+K at line's end removes the \n
  • Loading branch information...
2 parents 9146d31 + e26d408 commit bb84693b0b4efa0c0a643da5b8bea5ee696af270 @fjakobs fjakobs committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/ace/editor.js
View
8 lib/ace/editor.js
@@ -696,7 +696,13 @@ var Editor =function(renderer, session) {
if (this.selection.isEmpty())
this.selection.selectLineEnd();
- this.session.remove(this.getSelectionRange());
+ var range = this.getSelectionRange();
+ if (range.start.column == range.end.column && range.start.row == range.end.row) {
+ range.end.column = 0;
+ range.end.row++;
+ }
+
+ this.session.remove(range);
this.clearSelection();
};

0 comments on commit bb84693

Please sign in to comment.
Something went wrong with that request. Please try again.