mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 02:04:11 +01:00
Fix async completion input update bugginess.
This commit is contained in:
@@ -1111,6 +1111,7 @@ var CommandLine = Module("commandline", {
|
|||||||
this._caret = this.caret;
|
this._caret = this.caret;
|
||||||
|
|
||||||
this.input.dactylKeyPress = undefined;
|
this.input.dactylKeyPress = undefined;
|
||||||
|
this._completion = completion;
|
||||||
},
|
},
|
||||||
|
|
||||||
get caret() this.editor.selection.getRangeAt(0).startOffset,
|
get caret() this.editor.selection.getRangeAt(0).startOffset,
|
||||||
@@ -1205,14 +1206,12 @@ var CommandLine = Module("commandline", {
|
|||||||
if (this.waiting && this.waiting[0] == context)
|
if (this.waiting && this.waiting[0] == context)
|
||||||
this.select(this.waiting);
|
this.select(this.waiting);
|
||||||
else if (!this.waiting) {
|
else if (!this.waiting) {
|
||||||
let group = this.itemList.selectedGroup;
|
let cursor = this.selected;
|
||||||
if (group && group.context == context && this.completion) {
|
if (cursor && cursor[0] == context) {
|
||||||
this.selected = null;
|
if (cursor[1] >= context.items.length) {
|
||||||
if (group.selectedIdx != null)
|
this.selected = null;
|
||||||
this.selected = [group.context, group.selectedIdx];
|
this.itemList.select(null);
|
||||||
|
}
|
||||||
this.completion = this.selected ? this.getItem().result
|
|
||||||
: this.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.preview();
|
this.preview();
|
||||||
|
|||||||
Reference in New Issue
Block a user