mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 15:55:47 +01:00
Add a "tabUndo" config feature.
Songbird doesn't support tab undo.
This commit is contained in:
@@ -286,10 +286,14 @@ function Tabs() //{{{
|
|||||||
function (count) { tabs.switchTo(null, null, count, true); },
|
function (count) { tabs.switchTo(null, null, count, true); },
|
||||||
{ flags: Mappings.flags.COUNT });
|
{ flags: Mappings.flags.COUNT });
|
||||||
|
|
||||||
mappings.add([modes.NORMAL], ["u"],
|
// TODO: feature dependencies - implies "session"?
|
||||||
"Undo closing of a tab",
|
if (liberator.has("tabUndo"))
|
||||||
function (count) { commands.get("undo").execute("", false, count); },
|
{
|
||||||
{ flags: Mappings.flags.COUNT });
|
mappings.add([modes.NORMAL], ["u"],
|
||||||
|
"Undo closing of a tab",
|
||||||
|
function (count) { commands.get("undo").execute("", false, count); },
|
||||||
|
{ flags: Mappings.flags.COUNT });
|
||||||
|
}
|
||||||
|
|
||||||
mappings.add([modes.NORMAL], ["<C-^>", "<C-6>"],
|
mappings.add([modes.NORMAL], ["<C-^>", "<C-6>"],
|
||||||
"Select the alternate tab or the [count]th tab",
|
"Select the alternate tab or the [count]th tab",
|
||||||
@@ -607,8 +611,7 @@ function Tabs() //{{{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Why not xulmus? */
|
if (liberator.has("tabUndo"))
|
||||||
if (liberator.has("session") && config.name != "Xulmus")
|
|
||||||
{
|
{
|
||||||
commands.add(["u[ndo]"],
|
commands.add(["u[ndo]"],
|
||||||
"Undo closing of a tab",
|
"Undo closing of a tab",
|
||||||
@@ -654,6 +657,10 @@ function Tabs() //{{{
|
|||||||
},
|
},
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (liberator.has("session"))
|
||||||
|
{
|
||||||
commands.add(["wqa[ll]", "wq", "xa[ll]"],
|
commands.add(["wqa[ll]", "wq", "xa[ll]"],
|
||||||
"Save the session and quit",
|
"Save the session and quit",
|
||||||
function () { liberator.quit(true); },
|
function () { liberator.quit(true); },
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const config = { //{{{
|
|||||||
hostApplication: "Firefox",
|
hostApplication: "Firefox",
|
||||||
|
|
||||||
/*** optional options, there are checked for existence and a fallback provided ***/
|
/*** optional options, there are checked for existence and a fallback provided ***/
|
||||||
features: ["bookmarks", "hints", "history", "marks", "quickmarks", "session", "tabs", "windows"],
|
features: ["bookmarks", "hints", "history", "marks", "quickmarks", "session", "tabs", "tabUndo", "windows"],
|
||||||
defaults: {
|
defaults: {
|
||||||
guioptions: "rb",
|
guioptions: "rb",
|
||||||
showtabline: 2,
|
showtabline: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user