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

UI tweak when maxitems 7 (Jarkko Oranen)

This commit is contained in:
Daniel Bainton
2009-03-30 17:21:42 +03:00
parent dfe061db6f
commit eab32403cd

View File

@@ -780,7 +780,7 @@ function CommandLine() //{{{
options.add(["maxitems"],
"Maximum number of items to display at once",
"number", 20,
{ validator: function (value) value >= 0 });
{ validator: function (value) value >= 1 });
options.add(["messages", "msgs"],
"Number of messages to store in the message history",
@@ -1950,7 +1950,7 @@ function ItemList(id) //{{{
let len = items.allItems.items.length;
let newOffset = startIndex;
let maxItems = options["maxitems"];
let contextLines = (maxItems > 3)? 3 : Math.max(0, maxItems - 1);
let contextLines = Math.min(3, parseInt((maxItems - 1) / 2));
if (index == -1 || index == null || index == len) // wrapped around
{