From 7c77b9bef6720283b04f6253b5e3cec0c7612b15 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 6 Oct 2018 11:07:38 +0100 Subject: Do not try to findNext unless we actually have query text. Fixes #3154 (I think). --- content_scripts/mode_find.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content_scripts/mode_find.coffee b/content_scripts/mode_find.coffee index 1e4196d7..c98f256f 100644 --- a/content_scripts/mode_find.coffee +++ b/content_scripts/mode_find.coffee @@ -218,6 +218,11 @@ class FindMode extends Mode FindMode.saveQuery() @findNext: (backwards) -> + # Bail out if we don't have any query text. + unless FindMode.query.rawQuery and 0 < FindMode.query.rawQuery.length + HUD.showForDuration "No query to find.", 1000 + return + Marks.setPreviousPosition() FindMode.query.hasResults = FindMode.execute null, {backwards} -- cgit v1.2.3