1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-11 05:25:45 +01:00

Restore some :tabmove argument errors and update :help for recent changes.

--HG--
extra : rebase_source : 496b6d553c64e88cef45620dc1f8210301ad5fe2
This commit is contained in:
Doug Kearns
2011-06-27 14:14:56 +10:00
parent 5046200097
commit ad64e49472
3 changed files with 27 additions and 12 deletions

View File

@@ -763,7 +763,7 @@ var Tabs = Module("tabs", {
function () { tabs.stopAll(); },
{ argCount: "0" });
// TODO: add count support
// TODO: add count and bang multimatch support - unify with :buffer nonsense
commands.add(["tabm[ove]"],
"Move the current tab to the position of tab N",
function (args) {
@@ -771,7 +771,8 @@ var Tabs = Module("tabs", {
if (tabs.indexFromSpec(arg) == -1) {
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];
}
tabs.move(tabs.getTab(), arg, args.bang);

View File

@@ -205,6 +205,7 @@
<item>
<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> <a>match</a></spec>
<spec><oa>count</oa>b</spec>
<description>
<p>
@@ -216,8 +217,9 @@
<p>
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
selected, even if it cannot be identified uniquely. Use <k>b</k> as a
buffer, by a partial match with the URL or title, it is selected.
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.
</p>
@@ -285,15 +287,20 @@
<item>
<tags>:tabm :tabmove</tags>
<spec>:tabm<oa>ove</oa> <oa>N</oa></spec>
<spec>:tabm<oa>ove</oa><oa>!</oa> <oa>+N</oa> | <oa>-N</oa></spec>
<spec>:tabm<oa>ove</oa> <a>N</a></spec>
<spec>:tabm<oa>ove</oa> <a>match</a></spec>
<spec>:tabm<oa>ove</oa><oa>!</oa> <a>+N|-N</a></spec>
<description>
<p>
Move the current tab to the position of tab <oa>N</oa>. When
<oa>N</oa> is 0, the current tab is made the first one. <oa>N</oa>
can also be prefixed with + or - to indicate a relative
movement. If <oa>!</oa> is specified the movement wraps around the
start or end of the tab list.
Move the current tab to the position of tab <a>N</a>. When <a>N</a>
is <em>$</em>, the current tab is made the last one. <a>N</a> can
also be prefixed with <em>+</em> or <em>-</em> to indicate a
relative movement. If <oa>!</oa> is specified the movement wraps
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>
</description>
</item>

View File

@@ -677,7 +677,14 @@ var tests = {
tabdo: {},
tabduplicate: {},
tablast: {},
tabmove: {},
tabmove: {
error: [""],
noOutput: ["1", "$", "999", "-1", "+1", "! +1", "! -1", "-999", "+999", "! +999", "! -999"],
completions: [
["", hasItems],
["1", hasItems]
]
},
tabnext: {},
tabonly: {},
tabopen: {},