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

fixed slow <tab> regression

This commit is contained in:
Martin Stubenschrott
2008-03-03 01:08:14 +00:00
parent 787157a22d
commit 80a8611377
2 changed files with 8 additions and 9 deletions

View File

@@ -1290,7 +1290,7 @@ vimperator.Events = function () //{{{
if (vimperator.mode == vimperator.modes.COMMAND_LINE)
{
if (!(vimperator.modes.extended & vimperator.modes.INPUT_MULTILINE))
vimperator.commandline.onEvent(event); // reroute event in command line mode
stop = !vimperator.commandline.onEvent(event); // reroute event in command line mode
}
else if (vimperator.mode != vimperator.modes.INSERT)
vimperator.beep();

View File

@@ -514,7 +514,7 @@ vimperator.CommandLine = function () //{{{
else if (event.type == "keypress")
{
if (!currentExtendedMode)
return;
return true;
var key = vimperator.events.toString(event);
//vimperator.log("command line handling key: " + key + "\n");
@@ -561,7 +561,7 @@ vimperator.CommandLine = function () //{{{
{
setCommand(historyStart);
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
return;
break;
}
// cannot go past history start/end
@@ -571,7 +571,7 @@ vimperator.CommandLine = function () //{{{
vimperator.beep();
break;
}
if (historyIndex >= lines.length + 1)
else if (historyIndex >= lines.length + 1)
{
historyIndex = lines.length;
vimperator.beep();
@@ -582,7 +582,7 @@ vimperator.CommandLine = function () //{{{
{
setCommand(lines[historyIndex]);
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
return;
break;
}
}
}
@@ -624,10 +624,8 @@ vimperator.CommandLine = function () //{{{
if (completions.length == 0)
{
vimperator.beep();
// prevent tab from moving to the next field
event.preventDefault();
event.stopPropagation();
return;
// prevent tab from moving to the next field:
return false;
}
var wim = vimperator.options["wildmode"].split(/,/);
@@ -722,6 +720,7 @@ vimperator.CommandLine = function () //{{{
// reset the tab completion
completionIndex = historyIndex = UNINITIALIZED;
}
return true; // allow this event to be handled by Firefox
}
},