aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteramako2010-12-14 20:42:02 +0900
committerteramako2010-12-14 20:42:02 +0900
commit499c43768f27e2332c6c69c47925d281820c764e (patch)
treeb467c06cdf06038941ced03ed1f0b62924fb72b4
parent3f3c7584e9302871d467c3ef5744de459affcd24 (diff)
downloadvimperator-plugins-499c43768f27e2332c6c69c47925d281820c764e.tar.bz2
update removeTab
delegate selecting a tab to Firefox after the tab removed when 'd'
-rw-r--r--panorama.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/panorama.js b/panorama.js
index c2b4095..f9649da 100644
--- a/panorama.js
+++ b/panorama.js
@@ -391,6 +391,13 @@ function removeTab (tab, count, focusLeftTab, quitOnLastTab) {
return;
}
+
+ // delegate selecting a tab to Firefox after the tab removed
+ if (count === 1 && !focusLeftTab && tab.owner) {
+ remove(tab);
+ return;
+ }
+
let vTabs = gb.visibleTabs;
let index = vTabs.indexOf(tab);
liberator.assert(index >= 0, "No such tab(s) in the current tabs");