1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 14:24:17 +01:00

Register and selection magic.

This commit is contained in:
Kris Maglione
2011-10-09 23:52:00 -04:00
parent d444435600
commit 400ec6244b
4 changed files with 97 additions and 62 deletions

View File

@@ -54,16 +54,9 @@ var Tabs = Module("tabs", {
enter: function enter() {
if (window.TabsInTitlebar)
window.TabsInTitlebar.allowedBy("dactyl", true);
},
"mappings.executed": function mappings_executed() {
if (this._mappingCount && !--this._mappingCount)
dactyl.forceTarget = null;
},
}
},
_mappingCount: 0,
_alternates: Class.Memoize(function () [config.tabbrowser.mCurrentTab, null]),
cleanup: function cleanup() {
@@ -1116,8 +1109,10 @@ var Tabs = Module("tabs", {
mappings.add([modes.COMMAND], ["<C-t>", "<new-tab-next>"],
"Execute the next mapping in a new tab",
function ({ count }) {
tabs._mappingCount = (count || 1) + 1;
dactyl.forceTarget = dactyl.NEW_TAB;
mappings.afterCommands((count || 1) + 1, function () {
dactyl.forceTarget = null;
});
},
{ count: true });