diff --git a/lib/ace/range.js b/lib/ace/range.js index d0caf949..596f3f57 100644 --- a/lib/ace/range.js +++ b/lib/ace/range.js @@ -102,9 +102,12 @@ var Range = function(startRow, startColumn, endRow, endColumn) { } } + this.comparePoint = function(p) { + return this.compare(p.row, p.column); + } + this.containsRange = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; } this.isEnd = function(row, column) {