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

Added the count arugument at Mode#action.

http://vimperator.org/trac/ticket/62
This commit is contained in:
anekos
2008-12-07 23:53:27 +09:00
parent a9baebe873
commit 5d3c1826a7

View File

@@ -42,6 +42,7 @@ function Hints() //{{{
var hintNumber = 0; // only the numerical part of the hint var hintNumber = 0; // only the numerical part of the hint
var usedTabKey = false; // when we used <Tab> to select an element var usedTabKey = false; // when we used <Tab> to select an element
var prevInput = ""; // record previous user input type, "text" || "number" var prevInput = ""; // record previous user input type, "text" || "number"
var extendedhintCount; // for the count arugument of Mode#action (extended hint only)
// hints[] = [elem, text, span, imgspan, elem.style.backgroundColor, elem.style.color] // hints[] = [elem, text, span, imgspan, elem.style.backgroundColor, elem.style.color]
var pageHints = []; var pageHints = [];
@@ -335,7 +336,7 @@ function Hints() //{{{
setTimeout(function () { setTimeout(function () {
if (modes.extended & modes.HINTS) if (modes.extended & modes.HINTS)
modes.reset(); modes.reset();
hintMode.action(elem, elem.href || ""); hintMode.action(elem, elem.href || "", extendedhintCount);
}, timeout); }, timeout);
return true; return true;
} }
@@ -574,7 +575,8 @@ function Hints() //{{{
mappings.add(myModes, [";"], mappings.add(myModes, [";"],
"Start an extended hint mode", "Start an extended hint mode",
function (arg) { function (count) {
extendedhintCount = count;
commandline.input(";", function (arg) { setTimeout(function () hints.show(arg), 0) }, commandline.input(";", function (arg) { setTimeout(function () hints.show(arg), 0) },
{ {
promptHighlight: "Normal", promptHighlight: "Normal",
@@ -583,8 +585,7 @@ function Hints() //{{{
}, },
onChange: function () { modes.pop() } onChange: function () { modes.pop() }
}); });
}); }, { flags: Mappings.flags.COUNT });
//{ flags: Mappings.flags.ARGUMENT });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////