From b529a975e9b18c92fa9b5acf9d0487c95667896e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Mar 2023 15:44:54 +0530 Subject: [PATCH] Content server viewer: Fix searching only showing results from the current chapter onwards. Fixes #2009268 [search in book on content server only returns results beyond current location](https://bugs.launchpad.net/calibre/+bug/2009268) --- src/pyj/read_book/search_worker.pyj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pyj/read_book/search_worker.pyj b/src/pyj/read_book/search_worker.pyj index 9433ef0cee..2cf195b75c 100644 --- a/src/pyj/read_book/search_worker.pyj +++ b/src/pyj/read_book/search_worker.pyj @@ -184,6 +184,7 @@ def search_in_text_of(name): def queue_next_spine_item(spine_idx, allow_current_name): + spine_idx = spine_idx % wc.current_book.spine.length name = wc.current_book.spine[spine_idx] if wc.current_query.query.only_first_match and wc.result_num > 0: send_search_complete()