1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 00:27:57 +01:00

Fix command history search bug.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-24 03:34:13 -05:00
parent b3d91db6b4
commit 37719fdf1f

View File

@@ -1256,6 +1256,7 @@ var CommandLine = Module("commandline", {
* @param {string} val The new value. * @param {string} val The new value.
*/ */
replace: function (val) { replace: function (val) {
delete this.input.dactylKeyPress;
this.input.value = val; this.input.value = val;
commandline.triggerCallback("change", commandline.currentExtendedMode, val, "history"); commandline.triggerCallback("change", commandline.currentExtendedMode, val, "history");
}, },
@@ -1321,6 +1322,7 @@ var CommandLine = Module("commandline", {
this.context = CompletionContext(input.QueryInterface(Ci.nsIDOMNSEditableElement).editor); this.context = CompletionContext(input.QueryInterface(Ci.nsIDOMNSEditableElement).editor);
this.context.onUpdate = this.closure._reset; this.context.onUpdate = this.closure._reset;
this.editor = input.editor; this.editor = input.editor;
this.input = input;
this.selected = null; this.selected = null;
this.wildmode = options.get("wildmode"); this.wildmode = options.get("wildmode");
this.wildtypes = this.wildmode.value; this.wildtypes = this.wildmode.value;
@@ -1351,6 +1353,8 @@ var CommandLine = Module("commandline", {
// Reset the caret to one position after the completion. // Reset the caret to one position after the completion.
this.caret = this.prefix.length + completion.length; this.caret = this.prefix.length + completion.length;
this._caret = this.caret; this._caret = this.caret;
delete this.input.dactylKeyPress;
}, },
get caret() this.editor.selection.getRangeAt(0).startOffset, get caret() this.editor.selection.getRangeAt(0).startOffset,