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

This commit is contained in:
Doug Kearns committed 2009-09-16 12:47:54 +10:00
1 parent e1abaf5d9a
commit 6b7108ba9c
3 files changed
+13 -3

No files matched your search

+7 -1
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]"],