mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #1952498 [[Enhancement - E-book viewer] Don't search for selection if it is a blanc space](https://bugs.launchpad.net/calibre/+bug/1952498)
This commit is contained in:
parent
cb9d4c5416
commit
1dbbf5b73d
@ -1010,6 +1010,9 @@ class SelectionBar:
|
|||||||
self.view.overlay.show_word_actions(self.view.currently_showing.selection.text)
|
self.view.overlay.show_word_actions(self.view.currently_showing.selection.text)
|
||||||
|
|
||||||
def book_search(self):
|
def book_search(self):
|
||||||
|
cs = self.view.currently_showing?.selection?.text
|
||||||
|
if not cs or len(str.strip(cs)) < 2:
|
||||||
|
return error_dialog(_('Too little text'), _('Cannot search as too little text is selected. You must select at least two characters.'))
|
||||||
self.view.show_search(True)
|
self.view.show_search(True)
|
||||||
self.clear_selection()
|
self.clear_selection()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user