mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 08:58:00 +01:00
Fix minor completion bug with quoting.
This commit is contained in:
@@ -566,14 +566,16 @@ const CompletionContext = Class("CompletionContext", {
|
|||||||
*/
|
*/
|
||||||
advance: function advance(count) {
|
advance: function advance(count) {
|
||||||
delete this._ignoreCase;
|
delete this._ignoreCase;
|
||||||
|
let advance = count;
|
||||||
if (this.quote && count) {
|
if (this.quote && count) {
|
||||||
count = this.quote[0].length + this.quote[1](this.filter.substr(0, count)).length;
|
advance = this.quote[1](this.filter.substr(0, count)).length;
|
||||||
|
count = this.quote[0].length + advance;
|
||||||
this.quote[0] = "";
|
this.quote[0] = "";
|
||||||
this.quote[2] = "";
|
this.quote[2] = "";
|
||||||
}
|
}
|
||||||
this.offset += count;
|
this.offset += count;
|
||||||
if (this._filter)
|
if (this._filter)
|
||||||
this._filter = this._filter.substr(count);
|
this._filter = this._filter.substr(advance);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -610,16 +610,7 @@ const RangeFind = Class("RangeFind", {
|
|||||||
this.save();
|
this.save();
|
||||||
},
|
},
|
||||||
|
|
||||||
intersects: function (range) {
|
intersects: function (range) RangeFind.intersects(this.range, range),
|
||||||
try {
|
|
||||||
return this.range.compareBoundaryPoints(range.START_TO_END, range) >= 0 &&
|
|
||||||
this.range.compareBoundaryPoints(range.END_TO_START, range) <= 0;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
dactyl.reportError(e, true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
save: function () {
|
save: function () {
|
||||||
this.scroll = Point(this.window.pageXOffset, this.window.pageYOffset);
|
this.scroll = Point(this.window.pageXOffset, this.window.pageYOffset);
|
||||||
|
|||||||
Reference in New Issue
Block a user