mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer search: Fix jumping to next match sometimes selecting previous match if the searched for expression occurs with identical context in multiple places. Fixes #1868633 [Private bug](https://bugs.launchpad.net/calibre/+bug/1868633)
This commit is contained in:
parent
b887ca602a
commit
ac12d5933a
@ -79,7 +79,7 @@ def find_specific_occurrence(q, num, before_len, after_len, text_map):
|
|||||||
break
|
break
|
||||||
match_num += 1
|
match_num += 1
|
||||||
from_idx = idx + 1
|
from_idx = idx + 1
|
||||||
if num < match_num:
|
if match_num < num:
|
||||||
continue
|
continue
|
||||||
start_node, start_offset, node_pos = find_node_for_index_binary(text_map.node_list, idx + before_len, pos)
|
start_node, start_offset, node_pos = find_node_for_index_binary(text_map.node_list, idx + before_len, pos)
|
||||||
if start_node is not None:
|
if start_node is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user