1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 12:34:11 +01:00

move the global function updateBufferList() to vimperator.tabs until we have

real buffers
This commit is contained in:
Doug Kearns
2007-07-05 06:14:32 +00:00
parent 31f06ea516
commit 54502e9929
3 changed files with 29 additions and 34 deletions

View File

@@ -363,22 +363,22 @@ function Events() //{{{
var tabcontainer = getBrowser().tabContainer;
tabcontainer.addEventListener("TabMove", function(event) {
vimperator.statusline.updateTabCount()
updateBufferList();
vimperator.tabs.updateBufferList();
}, false);
tabcontainer.addEventListener("TabOpen", function(event) {
vimperator.statusline.updateTabCount();
updateBufferList();
vimperator.tabs.updateBufferList();
vimperator.setMode(); // trick to reshow the mode in the command line
vimperator.tabs.updateSelectionHistory();
}, false);
tabcontainer.addEventListener("TabClose", function(event) {
vimperator.statusline.updateTabCount()
updateBufferList();
vimperator.tabs.updateBufferList();
vimperator.setMode(); // trick to reshow the mode in the command line
}, false);
tabcontainer.addEventListener("TabSelect", function(event) {
vimperator.statusline.updateTabCount();
updateBufferList();
vimperator.tabs.updateBufferList();
vimperator.setMode(); // trick to reshow the mode in the command line
vimperator.tabs.updateSelectionHistory();
}, false);
@@ -419,7 +419,7 @@ function Events() //{{{
}
// code which should happen for all (also background) newly loaded tabs goes here:
updateBufferList();
vimperator.tabs.updateBufferList();
//update history
var url = getCurrentLocation();
@@ -1022,6 +1022,17 @@ function Tabs() //{{{
this.alternate = this.getTab();
// updates the buffer preview in place only if list is visible
this.updateBufferList = function()
{
if (!vimperator.bufferwindow.visible())
return false;
var items = get_buffer_completions("");
vimperator.bufferwindow.show(items);
vimperator.bufferwindow.selectItem(getBrowser().mTabContainer.selectedIndex);
}
this.reload = function(tab, bypass_cache)
{
if (bypass_cache)