Edit book: Fix escaping of text for regex unnecessarily escaping spaces

This commit is contained in:
Kovid Goyal 2017-06-21 08:32:47 +05:30
parent a3a3474c10
commit 83aaf12bd6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -446,7 +446,7 @@ class SearchWidget(QWidget):
def pre_fill(self, text):
if self.mode in ('regex', 'function'):
text = regex.escape(text, special_only=True)
text = regex.escape(text, special_only=True, literal_spaces=True)
self.find = text
self.find_text.lineEdit().setSelection(0, len(text)+10)