mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 06:06:16 +01:00
Fix error when calling goto_sourceline with no tags
This commit is contained in:
parent
0ac2fa0188
commit
be713e1a80
1 changed files with 1 additions and 1 deletions
|
|
@ -531,7 +531,7 @@ def goto_sourceline(self, editor, sourceline, tags, attribute=None):
|
|||
ud = block.userData()
|
||||
all_tags = [] if ud is None else [t for t in ud.tags if (t.is_start and not t.closing)]
|
||||
tag_names = [t.name for t in all_tags]
|
||||
if tag_names[:len(tags)] == tags:
|
||||
if all_tags and tag_names[:len(tags)] == tags:
|
||||
c.setPosition(block.position() + all_tags[len(tags)-1].offset)
|
||||
found_tag = True
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue