correctly deal with empty templates
@@ -96,6 +96,8 @@ def messages_under_cursor(errors, current_pos):
line, col = current_pos
msgs = []
message_template = persist.settings.get('statusbar.messages_template')
+
+ if message_template != "":
for error in errors[line]:
if error["start"] <= col <= error["end"]:
msgs.append(message_template.format(
@@ -105,6 +107,8 @@ def messages_under_cursor(errors, current_pos):
code=error["code"]
))
return "; ".join(msgs)
+ else:
+ return ""
def errors_per_line(errors):
