1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-14 15:55:48 +01:00

More RangeFind work.

This commit is contained in:
Kris Maglione
2009-11-13 03:00:46 -05:00
parent f19a4edcee
commit 12012af693
7 changed files with 27 additions and 22 deletions

View File

@@ -869,7 +869,7 @@ const Tabs = Module("tabs", {
if (args.length)
args = args[0];
else
args = Math.max(args.count, 0);
args = args.count || 0;
let m;
if (m = /^(\d+)(:|$)/.exec(args || '1'))
@@ -929,7 +929,7 @@ const Tabs = Module("tabs", {
mappings.add([modes.NORMAL], ["gt"],
"Go to the next tab",
function (count) {
if (count > 0)
if (count != null)
tabs.select(count - 1, false);
else
tabs.select("+1", true);
@@ -938,19 +938,19 @@ const Tabs = Module("tabs", {
mappings.add([modes.NORMAL], ["<C-n>", "<C-Tab>", "<C-PageDown>"],
"Go to the next tab",
function (count) { tabs.select("+" + (count < 1 ? 1 : count), true); },
function (count) { tabs.select("+" + (count || 1), true); },
{ count: true });
mappings.add([modes.NORMAL], ["gT", "<C-p>", "<C-S-Tab>", "<C-PageUp>"],
"Go to previous tab",
function (count) { tabs.select("-" + (count < 1 ? 1 : count), true); },
function (count) { tabs.select("-" + (count || 1), true); },
{ count: true });
if (config.hasTabbrowser) {
mappings.add([modes.NORMAL], ["b"],
"Open a prompt to switch buffers",
function (count) {
if (count != -1)
if (count != null)
tabs.switchTo(String(count));
else
commandline.open(":", "buffer! ", modes.EX);