mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-19 14:23:32 +02:00
fixed slow <tab> regression
This commit is contained in:
@@ -1290,7 +1290,7 @@ vimperator.Events = function () //{{{
|
|||||||
if (vimperator.mode == vimperator.modes.COMMAND_LINE)
|
if (vimperator.mode == vimperator.modes.COMMAND_LINE)
|
||||||
{
|
{
|
||||||
if (!(vimperator.modes.extended & vimperator.modes.INPUT_MULTILINE))
|
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)
|
else if (vimperator.mode != vimperator.modes.INSERT)
|
||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
else if (event.type == "keypress")
|
else if (event.type == "keypress")
|
||||||
{
|
{
|
||||||
if (!currentExtendedMode)
|
if (!currentExtendedMode)
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
var key = vimperator.events.toString(event);
|
var key = vimperator.events.toString(event);
|
||||||
//vimperator.log("command line handling key: " + key + "\n");
|
//vimperator.log("command line handling key: " + key + "\n");
|
||||||
@@ -561,7 +561,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
{
|
{
|
||||||
setCommand(historyStart);
|
setCommand(historyStart);
|
||||||
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
|
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cannot go past history start/end
|
// cannot go past history start/end
|
||||||
@@ -571,7 +571,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (historyIndex >= lines.length + 1)
|
else if (historyIndex >= lines.length + 1)
|
||||||
{
|
{
|
||||||
historyIndex = lines.length;
|
historyIndex = lines.length;
|
||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
@@ -582,7 +582,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
{
|
{
|
||||||
setCommand(lines[historyIndex]);
|
setCommand(lines[historyIndex]);
|
||||||
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
|
vimperator.triggerCallback("change", currentExtendedMode, this.getCommand());
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -624,10 +624,8 @@ vimperator.CommandLine = function () //{{{
|
|||||||
if (completions.length == 0)
|
if (completions.length == 0)
|
||||||
{
|
{
|
||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
// prevent tab from moving to the next field
|
// prevent tab from moving to the next field:
|
||||||
event.preventDefault();
|
return false;
|
||||||
event.stopPropagation();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var wim = vimperator.options["wildmode"].split(/,/);
|
var wim = vimperator.options["wildmode"].split(/,/);
|
||||||
@@ -722,6 +720,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
// reset the tab completion
|
// reset the tab completion
|
||||||
completionIndex = historyIndex = UNINITIALIZED;
|
completionIndex = historyIndex = UNINITIALIZED;
|
||||||
}
|
}
|
||||||
|
return true; // allow this event to be handled by Firefox
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user