From 2960c068676c65e8d1d8587d816ed88089f7b403 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 23 Jun 2014 15:26:35 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/syntax/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/syntax/base.py b/src/calibre/gui2/tweak_book/editor/syntax/base.py index b3fb9c47b1..065ec0d6c9 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/base.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/base.py @@ -136,7 +136,7 @@ class SyntaxHighlighter(object): doc.contentsChange.connect(self.reformat_blocks) def parse_single_block(self, block): - ud, new_ud = self.get_user_data(block) + ud, is_new_ud = self.get_user_data(block) orig_state = ud.state pblock = block.previous() if pblock.isValid(): @@ -152,7 +152,7 @@ class SyntaxHighlighter(object): for i, num, fmt in run_loop(ud, self.state_map, self.formats, unicode(block.text())): if fmt is not None: formats.append((i, num, fmt)) - force_next_highlight = new_ud or ud.state != orig_state + force_next_highlight = is_new_ud or ud.state != orig_state return formats, force_next_highlight def reformat_block(self, block):