mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-06 19:35:45 +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]"],
|
commands.add(["tabde[tach]"],
|
||||||
"Detach current tab to its own window",
|
"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" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
commands.add(["tabdu[plicate]"],
|
commands.add(["tabdu[plicate]"],
|
||||||
|
|||||||
@@ -155,7 +155,9 @@ ________________________________________________________________________________
|
|||||||
|:tabde| |:tabdetach| +
|
|:tabde| |:tabdetach| +
|
||||||
||:tabde[tach]||
|
||: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]
|
section::Reordering{nbsp}tabs[reordering-tabs]
|
||||||
|
|||||||
@@ -146,7 +146,9 @@ ________________________________________________________________________________
|
|||||||
|:tabde| |:tabdetach| +
|
|:tabde| |:tabdetach| +
|
||||||
||:tabde[tach]||
|
||: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]
|
section::Reordering{nbsp}tabs[reordering-tabs]
|
||||||
|
|||||||
Reference in New Issue
Block a user