1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 08:42:27 +01:00

Display an error when calling :tabdetach on the only tab in a window.

This commit is contained in:
Doug Kearns
2009-09-16 03:09:21 +10:00
parent e1abaf5d9a
commit 6b7108ba9c
3 changed files with 13 additions and 3 deletions

View File

@@ -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]"],