Fix error when calling goto_sourceline with no tags

This commit is contained in:
Kovid Goyal 2019-01-19 18:06:31 +05:30
parent 0ac2fa0188
commit be713e1a80
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: