Forgot to report hidden search results

This commit is contained in:
Kovid Goyal 2020-02-28 18:27:56 +05:30
parent 9924018740
commit 2c794839db
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -401,8 +401,8 @@ class Results(QListWidget): # {{{
break
r.index -= 1
self.takeItem(remove)
if remove < self.count():
self.setCurrentRow(remove)
if self.count():
self.setCurrentRow(min(remove, self.count()-1))
self.item_activated()
# }}}

View File

@ -583,6 +583,8 @@ class IframeBoss:
if select_search_result(data.search_result):
if current_layout_mode() is not 'flow':
snap_to_selection()
else:
self.send_message('search_result_not_found', search_result=data.search_result)
def reference_item_changed(self, ref_num_or_none):
self.send_message('reference_item_changed', refnum=ref_num_or_none, index=current_spine_item().index)