From f12d0cf1555b1ed10d4cc88473558af754745466 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 Feb 2014 16:28:14 +0530 Subject: [PATCH] Keep the editor responsive to user input by spinning the event loop after every line is re-highlighted. --- src/calibre/gui2/tweak_book/editor/syntax/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/tweak_book/editor/syntax/base.py b/src/calibre/gui2/tweak_book/editor/syntax/base.py index 0ba4881935..60c544083a 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/base.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/base.py @@ -65,4 +65,6 @@ class SyntaxHighlighter(QSyntaxHighlighter): except: import traceback traceback.print_exc() + finally: + QApplication.processEvents() # Try to keep the editor responsive to user input