mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-03 01:45:45 +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:
@@ -374,12 +374,12 @@ function Mail() //{{{
|
||||
// SCROLLING
|
||||
mappings.add(myModes, ["<Down>"],
|
||||
"Scroll message down",
|
||||
function (count) { buffer.scrollLines(count > 1 ? count : 1); },
|
||||
function (count) { buffer.scrollLines(Math.max(count, 1)); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add(myModes, ["<Up>"],
|
||||
"Scroll message up",
|
||||
function (count) { buffer.scrollLines(-(count > 1 ? count : 1)); },
|
||||
function (count) { buffer.scrollLines(-Math.max(count, 1)); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add([modes.MESSAGE], ["<Left>"],
|
||||
|
||||
Reference in New Issue
Block a user