mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 18:07:58 +01:00
move the global function focusNextFrame to a slot on vimperator -
vimperator.shiftFrameFocus
This commit is contained in:
@@ -1186,7 +1186,7 @@ function isDirectory(url)
|
|||||||
/////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
// TODO: allow callback for filtering out unwanted frames? User defined?
|
// TODO: allow callback for filtering out unwanted frames? User defined?
|
||||||
function focusNextFrame(count, forward)
|
Vimperator.prototype.shiftFrameFocus = function(count, forward)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ function Mappings() //{{{
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
addDefaultMap(new Map(vimperator.modes.NORMAL, ["]f"],
|
addDefaultMap(new Map(vimperator.modes.NORMAL, ["]f"],
|
||||||
function(count) { focusNextFrame(count > 1 ? count : 1, true); },
|
function(count) { vimperator.shiftFrameFocus(count > 1 ? count : 1, true); },
|
||||||
{
|
{
|
||||||
short_help: "Focus next frame",
|
short_help: "Focus next frame",
|
||||||
help: "Transfers keyboard focus to the [count]th next frame in order. The newly focused frame is briefly colored red.",
|
help: "Transfers keyboard focus to the [count]th next frame in order. The newly focused frame is briefly colored red.",
|
||||||
@@ -218,7 +218,7 @@ function Mappings() //{{{
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
addDefaultMap(new Map(vimperator.modes.NORMAL, ["[f"],
|
addDefaultMap(new Map(vimperator.modes.NORMAL, ["[f"],
|
||||||
function(count) { focusNextFrame(count > 1 ? count : 1, false); },
|
function(count) { vimperator.shiftFrameFocus(count > 1 ? count : 1, false); },
|
||||||
{
|
{
|
||||||
short_help: "Focus previous frame",
|
short_help: "Focus previous frame",
|
||||||
help: "Transfers keyboard focus to the [count]th previous frame in order. The newly focused frame is briefly colored red.",
|
help: "Transfers keyboard focus to the [count]th previous frame in order. The newly focused frame is briefly colored red.",
|
||||||
|
|||||||
Reference in New Issue
Block a user