mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 12:34:12 +01:00
Initial work towards making <C-o> and <C-i> more Vim-like.
This commit is contained in:
@@ -127,12 +127,7 @@ var Tabs = Module("tabs", {
|
||||
/**
|
||||
* @property {Object} The local options store for the current tab.
|
||||
*/
|
||||
get options() {
|
||||
let store = this.localStore;
|
||||
if (!("options" in store))
|
||||
store.options = {};
|
||||
return store.options;
|
||||
},
|
||||
get options() this.localStore.options,
|
||||
|
||||
get visibleTabs() config.tabbrowser.visibleTabs || this.allTabs.filter(function (tab) !tab.hidden),
|
||||
|
||||
@@ -151,8 +146,8 @@ var Tabs = Module("tabs", {
|
||||
getLocalStore: function getLocalStore(tabIndex) {
|
||||
let tab = this.getTab(tabIndex);
|
||||
if (!tab.dactylStore)
|
||||
tab.dactylStore = {};
|
||||
return tab.dactylStore;
|
||||
tab.dactylStore = Object.create(this.localStorePrototype);
|
||||
return tab.dactylStore.instance = tab.dactylStore;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -161,6 +156,11 @@ var Tabs = Module("tabs", {
|
||||
*/
|
||||
get localStore() this.getLocalStore(),
|
||||
|
||||
localStorePrototype: memoize({
|
||||
instance: {},
|
||||
get options() ({})
|
||||
}),
|
||||
|
||||
/**
|
||||
* @property {[Object]} The array of closed tabs for the current
|
||||
* session.
|
||||
|
||||
Reference in New Issue
Block a user