From fd5ea1552e8dba306fd17a5b3554709af966c9cb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Jan 2019 12:45:34 +0530 Subject: [PATCH] More robust use of goto_sourceline --- src/calibre/gui2/tweak_book/boss.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index 436da352ab..be5b4eea01 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -1422,9 +1422,10 @@ class Boss(QObject): tags_before.append(tag) if tag is node: break + else: + tags_before.append(node) lnum = int(lnum) - editor.goto_sourceline(lnum, tags_before, attribute='id' if node.get('id') else None) - return True + return editor.goto_sourceline(lnum, tags_before, attribute='id' if node.get('id') else None) return False def goto_style_declaration(self, data):