Closed dreamlayers closed 1 year ago
This patch should fix it:
diff --git a/epy.py b/epy.py
index b9b1c1e400d5..b063775f841d 100755
--- a/epy.py
+++ b/epy.py
@@ -2724,7 +2724,8 @@ class Reader:
if isinstance(candidate_text, str) and candidate_text:
self.search_data = SearchData(value=candidate_text)
else:
- assert isinstance(candidate_text, NoUpdate) or isinstance(candidate_text, Key)
+ if candidate_text != "":
+ assert isinstance(candidate_text, NoUpdate) or isinstance(candidate_text, Key)
return candidate_text
found = []
You can apply it thusly:
patch -p1
@wustho does this seem alright? You can patch it into master, then.
Hey guys, fixed with: https://github.com/wustho/epy/commit/fed6dc9e14566408bf527ea123092ce5511e05e9 Thanks!
Yes, this fixes the issue. Thank you!
I start reading an epub book, then hit the
/
key to start a search, and press enter without entering a search string. This is the result (with epy path removed to simplify it):This is in Ubuntu 22.10 with Python 3.10.7. Both cloning from here and installing via pip gives the same result. I think the proper thing to do would be to assume the user doesn't want to perform a search and get rid of the search prompt. I do see that this can be accomplished by pressing escape.