1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 12:15:46 +01:00

Force the caret to the end of the line on setCommand()

This commit is contained in:
Kris Maglione
2008-12-07 09:27:55 -05:00
parent e436212ab8
commit 6068eb9e75

View File

@@ -526,6 +526,8 @@ function CommandLine() //{{{
function setCommand(cmd) function setCommand(cmd)
{ {
commandWidget.value = cmd; commandWidget.value = cmd;
commandWidget.selectionStart = cmd.length;
commandWidget.selectionEnd = cmd.length;
} }
function echoLine(str, highlightGroup, forceSingle) function echoLine(str, highlightGroup, forceSingle)
@@ -901,10 +903,7 @@ function CommandLine() //{{{
completions = Completions(commandWidget.inputField); completions = Completions(commandWidget.inputField);
// open the completion list automatically if wanted // open the completion list automatically if wanted
if (/\s/.test(cmd) && liberator.triggerCallback("change", currentExtendedMode, cmd);
options.get("wildoptions").has("auto") &&
extendedMode == modes.EX)
autocompleteTimer.tell(false);
}, },
// normally used when pressing esc, does not execute a command // normally used when pressing esc, does not execute a command
@@ -1380,7 +1379,6 @@ function CommandLine() //{{{
outputContainer.collapsed = false; outputContainer.collapsed = false;
}, },
// TODO: does that function need to be public?
resetCompletions: function resetCompletions() resetCompletions: function resetCompletions()
{ {
autocompleteTimer.reset(); autocompleteTimer.reset();