1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 05:34:12 +01:00

Normalise the count arg of map actions with Math.max.

Passing an arg object to these actions as is done for commands might be
better.
This commit is contained in:
Doug Kearns
2009-05-06 21:33:21 +10:00
parent 8021953f0f
commit 4912348398
7 changed files with 32 additions and 32 deletions

View File

@@ -226,12 +226,12 @@ const config = { //{{{
mappings.add([modes.NORMAL],
["<C-a>"], "Increment last number in URL",
function (count) { incrementURL(count > 1 ? count : 1); },
function (count) { incrementURL(Math.max(count, 1)); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.NORMAL],
["<C-x>"], "Decrement last number in URL",
function (count) { incrementURL(-(count > 1 ? count : 1)); },
function (count) { incrementURL(-Math.max(count, 1)); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.NORMAL], ["~"],