From ed38a0531361a3faef6f79b35556cf5491736201 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 23 Sep 2010 06:34:54 -0400 Subject: [PATCH] Fix */#. --HG-- extra : rebase_source : 6add6d006c1b04e5489968461d09056b3984bb5a --- common/content/finder.js | 14 ++++++-------- pentadactyl/TODO | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/common/content/finder.js b/common/content/finder.js index 485bc0bd..359b08e9 100644 --- a/common/content/finder.js +++ b/common/content/finder.js @@ -64,11 +64,11 @@ const RangeFinder = Module("rangefinder", { this.rangeFind.highlighted = highlighted; this.rangeFind.selections = selections; } - return str; + return this.lastSearchPattern = str; }, find: function (pattern, backwards) { - let str = this.bootstrap(pattern); + let str = this.bootstrap(pattern, backwards); if (!this.rangeFind.search(str)) this.timeout(function () { dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0); @@ -111,8 +111,6 @@ const RangeFinder = Module("rangefinder", { this.find(command || this.lastSearchPattern, modes.extended & modes.FIND_BACKWARD); } - this.lastSearchPattern = command; - if (options["hlsearch"]) this.highlight(); this.rangeFind.focus(); @@ -194,15 +192,15 @@ const RangeFinder = Module("rangefinder", { mappings.add(myModes.concat([modes.CARET, modes.TEXTAREA]), ["*"], "Find word under cursor", function () { - rangefinder._found = false; - rangefinder.onSubmit(buffer.getCurrentWord(), false); + rangefinder.find(buffer.getCurrentWord(), false); + rangefinder.findAgain(); }); mappings.add(myModes.concat([modes.CARET, modes.TEXTAREA]), ["#"], "Find word under cursor backwards", function () { - rangefinder._found = false; - rangefinder.onSubmit(buffer.getCurrentWord(), true); + rangefinder.find(buffer.getCurrentWord(), true); + rangefinder.findAgain(); }); }, diff --git a/pentadactyl/TODO b/pentadactyl/TODO index 1b048257..bb40b9a1 100644 --- a/pentadactyl/TODO +++ b/pentadactyl/TODO @@ -27,8 +27,6 @@ BUGS: 9 One of the recent completion fixes seems to have broken the caret position update. BLOCKER. 9 about:pentadactyl is currently about:undefined -9 */# are broken for the upteenth time E.g. * followed by n matches a - previously searched (/) for word not the word matched with * - visual caret mode is broken, requires a manual page focus first anyway or else it chucks, I haven't investigated --djk