mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-12 05:23:33 +02:00
Restore some :tabmove argument errors and update :help for recent changes.
--HG-- extra : rebase_source : 496b6d553c64e88cef45620dc1f8210301ad5fe2
This commit is contained in:
@@ -763,7 +763,7 @@ var Tabs = Module("tabs", {
|
|||||||
function () { tabs.stopAll(); },
|
function () { tabs.stopAll(); },
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
// TODO: add count support
|
// TODO: add count and bang multimatch support - unify with :buffer nonsense
|
||||||
commands.add(["tabm[ove]"],
|
commands.add(["tabm[ove]"],
|
||||||
"Move the current tab to the position of tab N",
|
"Move the current tab to the position of tab N",
|
||||||
function (args) {
|
function (args) {
|
||||||
@@ -771,7 +771,8 @@ var Tabs = Module("tabs", {
|
|||||||
|
|
||||||
if (tabs.indexFromSpec(arg) == -1) {
|
if (tabs.indexFromSpec(arg) == -1) {
|
||||||
let tabs = [tab for (tab in matchTabs(args, true))];
|
let tabs = [tab for (tab in matchTabs(args, true))];
|
||||||
dactyl.assert(tabs.length == 1);
|
dactyl.assert(tabs.length, _("error.invalidArgument", arg));
|
||||||
|
dactyl.assert(tabs.length == 1, _("buffer.multipleMatching", arg));
|
||||||
arg = tabs[0];
|
arg = tabs[0];
|
||||||
}
|
}
|
||||||
tabs.move(tabs.getTab(), arg, args.bang);
|
tabs.move(tabs.getTab(), arg, args.bang);
|
||||||
|
|||||||
@@ -205,6 +205,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<tags>b :b :buffer</tags>
|
<tags>b :b :buffer</tags>
|
||||||
<spec>:<oa>count</oa>b<oa>uffer</oa><oa>!</oa> <oa>url|index</oa></spec>
|
<spec>:<oa>count</oa>b<oa>uffer</oa><oa>!</oa> <oa>url|index</oa></spec>
|
||||||
|
<spec>:<oa>count</oa>b<oa>uffer</oa><oa>!</oa> <a>match</a></spec>
|
||||||
<spec><oa>count</oa>b</spec>
|
<spec><oa>count</oa>b</spec>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
@@ -216,8 +217,9 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
If argument is neither a full URL nor an index but uniquely identifies a
|
If argument is neither a full URL nor an index but uniquely identifies a
|
||||||
buffer, it is selected. With <oa>!</oa> the next buffer matching the argument is
|
buffer, by a partial match with the URL or title, it is selected.
|
||||||
selected, even if it cannot be identified uniquely. Use <k>b</k> as a
|
With <oa>!</oa> the next buffer matching the argument is selected,
|
||||||
|
even if it cannot be identified uniquely. Use <k>b</k> as a
|
||||||
shortcut to open this prompt.
|
shortcut to open this prompt.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -285,15 +287,20 @@
|
|||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>:tabm :tabmove</tags>
|
<tags>:tabm :tabmove</tags>
|
||||||
<spec>:tabm<oa>ove</oa> <oa>N</oa></spec>
|
<spec>:tabm<oa>ove</oa> <a>N</a></spec>
|
||||||
<spec>:tabm<oa>ove</oa><oa>!</oa> <oa>+N</oa> | <oa>-N</oa></spec>
|
<spec>:tabm<oa>ove</oa> <a>match</a></spec>
|
||||||
|
<spec>:tabm<oa>ove</oa><oa>!</oa> <a>+N|-N</a></spec>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
Move the current tab to the position of tab <oa>N</oa>. When
|
Move the current tab to the position of tab <a>N</a>. When <a>N</a>
|
||||||
<oa>N</oa> is 0, the current tab is made the first one. <oa>N</oa>
|
is <em>$</em>, the current tab is made the last one. <a>N</a> can
|
||||||
can also be prefixed with ‘+’ or ‘-’ to indicate a relative
|
also be prefixed with <em>+</em> or <em>-</em> to indicate a
|
||||||
movement. If <oa>!</oa> is specified the movement wraps around the
|
relative movement. If <oa>!</oa> is specified the movement wraps
|
||||||
start or end of the tab list.
|
around the start or end of the tab list.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The tab index may also be selected by a general <a>match</a> string
|
||||||
|
like <ex>:buffer</ex>.
|
||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -677,7 +677,14 @@ var tests = {
|
|||||||
tabdo: {},
|
tabdo: {},
|
||||||
tabduplicate: {},
|
tabduplicate: {},
|
||||||
tablast: {},
|
tablast: {},
|
||||||
tabmove: {},
|
tabmove: {
|
||||||
|
error: [""],
|
||||||
|
noOutput: ["1", "$", "999", "-1", "+1", "! +1", "! -1", "-999", "+999", "! +999", "! -999"],
|
||||||
|
completions: [
|
||||||
|
["", hasItems],
|
||||||
|
["1", hasItems]
|
||||||
|
]
|
||||||
|
},
|
||||||
tabnext: {},
|
tabnext: {},
|
||||||
tabonly: {},
|
tabonly: {},
|
||||||
tabopen: {},
|
tabopen: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user