mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 06:08:02 +01:00
Fix history search when autocomplete is off
This commit is contained in:
@@ -107,7 +107,7 @@ function CommandLine() //{{{
|
|||||||
select: function (backward, matchCurrent)
|
select: function (backward, matchCurrent)
|
||||||
{
|
{
|
||||||
// always reset the tab completion if we use up/down keys
|
// always reset the tab completion if we use up/down keys
|
||||||
completions.select(completions.RESET);
|
completions.reset();
|
||||||
|
|
||||||
let diff = backward ? -1 : 1;
|
let diff = backward ? -1 : 1;
|
||||||
|
|
||||||
@@ -445,8 +445,6 @@ function CommandLine() //{{{
|
|||||||
liberator.registerCallback("change", modes.EX, function (command) {
|
liberator.registerCallback("change", modes.EX, function (command) {
|
||||||
if (options.get("wildoptions").has("auto"))
|
if (options.get("wildoptions").has("auto"))
|
||||||
autocompleteTimer.tell(false);
|
autocompleteTimer.tell(false);
|
||||||
else
|
|
||||||
completions.reset();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.registerCallback("cancel", modes.PROMPT, closePrompt);
|
liberator.registerCallback("cancel", modes.PROMPT, closePrompt);
|
||||||
@@ -1089,6 +1087,9 @@ function CommandLine() //{{{
|
|||||||
{
|
{
|
||||||
if (completions)
|
if (completions)
|
||||||
completions.previewClear();
|
completions.previewClear();
|
||||||
|
this.resetCompletions();
|
||||||
|
liberator.dump("hist: " + history.index);
|
||||||
|
liberator.dump(" : " + history.input.value);
|
||||||
liberator.triggerCallback("change", currentExtendedMode, command);
|
liberator.triggerCallback("change", currentExtendedMode, command);
|
||||||
}
|
}
|
||||||
else if (event.type == "keypress")
|
else if (event.type == "keypress")
|
||||||
@@ -1142,7 +1143,7 @@ function CommandLine() //{{{
|
|||||||
if (command.length == 0)
|
if (command.length == 0)
|
||||||
{
|
{
|
||||||
liberator.triggerCallback("cancel", currentExtendedMode);
|
liberator.triggerCallback("cancel", currentExtendedMode);
|
||||||
modes.pop(); // FIXME: use mode stack
|
modes.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // any other key
|
else // any other key
|
||||||
|
|||||||
Reference in New Issue
Block a user