1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-29 18:33:36 +02:00

Default arguments ftw.

This commit is contained in:
Kris Maglione
2013-09-21 16:57:09 -07:00
parent 25aae2cc99
commit 35784406a0
8 changed files with 14 additions and 30 deletions

View File

@@ -75,9 +75,7 @@ var RangeFinder = Module("rangefinder", {
this.find("", mode == this.modes.FIND_BACKWARD);
},
bootstrap: function bootstrap(str, backward) {
if (arguments.length < 2 && this.rangeFind)
backward = this.rangeFind.reverse;
bootstrap: function bootstrap(str, backward=this.rangeFind && this.rangeFind.reverse) {
let highlighted = this.rangeFind && this.rangeFind.highlighted;
let selections = this.rangeFind && this.rangeFind.selections;