From 11ac2173bf474473eb5ca15318c361e8c07a6bbe Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 29 Apr 2010 14:48:22 +0200 Subject: [PATCH] fix selection.isEmpty() method --- src/ace/Selection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ace/Selection.js b/src/ace/Selection.js index c6dec599..b7232955 100644 --- a/src/ace/Selection.js +++ b/src/ace/Selection.js @@ -17,7 +17,9 @@ ace.Selection = function(doc) { ace.implement(this, ace.MEventEmitter); this.isEmpty = function() { - return (this.selectionAnchor == null); + return (this.selectionAnchor == null || + (this.selectionAnchor.row == this.selectionLead.row && + this.selectionAnchor.column == this.selectionLead.column)); }; this.isMultiLine = function() {