mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 01:47:59 +01:00
Add util.Math.constrain.
This commit is contained in:
@@ -831,7 +831,7 @@ function History() //{{{
|
||||
liberator.beep();
|
||||
else
|
||||
{
|
||||
let index = Math.max(start, Math.min(end, current + steps));
|
||||
let index = util.Math.constrain(current + steps, start, end);
|
||||
window.getWebNavigation().gotoIndex(index);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user