mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix error when calling goto_sourceline with no tags
This commit is contained in:
parent
0ac2fa0188
commit
be713e1a80
@ -531,7 +531,7 @@ class Smarts(NullSmarts):
|
||||
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…
x
Reference in New Issue
Block a user