From 4d7b2a379af9fb47a126be0c0457e96ec57fc8a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 11 Dec 2014 08:32:20 +0530 Subject: [PATCH] Fix #1401357 [Harmless error when merging files in the editor](https://bugs.launchpad.net/calibre/+bug/1401357) --- src/calibre/gui2/tweak_book/editor/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index fcd36083be..2fd5087beb 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -281,7 +281,7 @@ class TextEdit(PlainTextEdit): sel.append(self.current_cursor_line) if self.current_search_mark is not None: sel.append(self.current_search_mark) - if instant and not self.highlighter.has_requests: + if instant and not self.highlighter.has_requests and self.smarts is not None: sel.extend(self.smarts.get_extra_selections(self)) self.smart_highlighting_updated.emit() else: