clear selection after text input
This commit is contained in:
parent
0cdafa9daa
commit
0695b22125
2 changed files with 3 additions and 2 deletions
|
|
@ -306,6 +306,8 @@ ace.Editor = function(renderer, doc) {
|
|||
this.doc.remove(range);
|
||||
}
|
||||
|
||||
this.clearSelection();
|
||||
|
||||
var lineState = this.bgTokenizer.getState(cursor.row-1);
|
||||
var shouldOutdent = this.mode.checkOutdent(lineState, this.doc.getLine(cursor.row), text);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ ace.Selection = function(doc) {
|
|||
ace.implement(this, ace.MEventEmitter);
|
||||
|
||||
this.isEmpty = function() {
|
||||
return (this.selectionAnchor == null ||
|
||||
return (!this.selectionAnchor ||
|
||||
(this.selectionAnchor.row == this.selectionLead.row &&
|
||||
this.selectionAnchor.column == this.selectionLead.column));
|
||||
};
|
||||
|
|
@ -37,7 +37,6 @@ ace.Selection = function(doc) {
|
|||
|
||||
this.setSelectionAnchor = function(row, column) {
|
||||
this.clearSelection();
|
||||
|
||||
this.selectionAnchor = this.$clipPositionToDocument(row, column);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue