summaryrefslogtreecommitdiff
path: root/muttator/content/mail.js
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-05-06 21:33:21 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-05-06 21:45:03 +1000
commit4912348398a373394f20e8f8350532555e23cf3e (patch)
treea02dee1687e494aa8149194f17c7d3e6574b11c1 /muttator/content/mail.js
parent8021953f0f4cba7b65ffe55d0a1a217a91f3b01e (diff)
downloadpentadactyl-4912348398a373394f20e8f8350532555e23cf3e.tar.gz
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.
Diffstat (limited to 'muttator/content/mail.js')
-rw-r--r--muttator/content/mail.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/muttator/content/mail.js b/muttator/content/mail.js
index 576498b5..7f93316b 100644
--- a/muttator/content/mail.js
+++ b/muttator/content/mail.js
@@ -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>"],