mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-10 20:44:11 +01:00
Display an error when calling :tabdetach on the only tab in a window.
This commit is contained in:
@@ -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]"],
|
||||
|
||||
@@ -155,7 +155,9 @@ ________________________________________________________________________________
|
||||
|:tabde| |:tabdetach| +
|
||||
||:tabde[tach]||
|
||||
________________________________________________________________________________
|
||||
Detach the current tab, and open it in its own window.
|
||||
Detach the current tab, and open it in its own window. As each window must
|
||||
contain at least one tab it is not possible to detach the only tab in a window.
|
||||
Use [c]:tabduplicate[c] to copy the tab then call [c]:tabdetach[c].
|
||||
________________________________________________________________________________
|
||||
|
||||
section::Reordering{nbsp}tabs[reordering-tabs]
|
||||
|
||||
@@ -146,7 +146,9 @@ ________________________________________________________________________________
|
||||
|:tabde| |:tabdetach| +
|
||||
||:tabde[tach]||
|
||||
________________________________________________________________________________
|
||||
Detach the current tab, and open it in its own window.
|
||||
Detach the current tab, and open it in its own window. As each window must
|
||||
contain at least one tab it is not possible to detach the only tab in a window.
|
||||
Use [c]:tabduplicate[c] to copy the tab then call [c]:tabdetach[c].
|
||||
________________________________________________________________________________
|
||||
|
||||
section::Reordering{nbsp}tabs[reordering-tabs]
|
||||
|
||||
Reference in New Issue
Block a user