summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-09-16 03:09:21 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-09-16 12:47:54 +1000
commit6b7108ba9ce9b871af77c9de30c23d0580ac35ea (patch)
treea5fdd92cf4f7e0be12dbe3abd053524ea70837dc /common/content
parente1abaf5d9a7a2297f0e8ad5bc3db4acd9445da83 (diff)
downloadpentadactyl-6b7108ba9ce9b871af77c9de30c23d0580ac35ea.tar.gz
Display an error when calling :tabdetach on the only tab in a window.
Diffstat (limited to 'common/content')
-rw-r--r--common/content/tabs.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/content/tabs.js b/common/content/tabs.js
index b2d42b2f..1ad1b9eb 100644
--- a/common/content/tabs.js
+++ b/common/content/tabs.js
@@ -588,7 +588,13 @@ function Tabs() //{{{
commands.add(["tabde[tach]"],
"Detach current tab to its own window",
- function () { tabs.detachTab(null); },
+ function ()
+ {
+ if (tabs.count == 1)
+ return void liberator.echoerr("Can't detach the last tab");
+
+ tabs.detachTab(null);
+ },
{ argCount: "0" });
commands.add(["tabdu[plicate]"],