Skip to content

Commit

Permalink
Correctly use default error color in the presence of an empty st… (#735)
Browse files Browse the repository at this point in the history
Correctly use default error color in the presence of an empty string.
  • Loading branch information
DanielRosenwasser committed Nov 15, 2019
2 parents 8bfce29 + fe6c753 commit 1d5160e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions typescript/listeners/idle.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,16 @@ def show_errors(self, diagno_event_body, syntactic):
sublime.DRAW_OUTLINED)
else:
settings = sublime.load_settings("TypeScript.sublime-settings")
error_color = settings.get("error_color") or "invalid.illegal"
error_icon = settings.get("error_icon") or ""
error_draw_style = \
sublime.DRAW_OUTLINED if settings.get("error_outlined") \
else sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE | sublime.DRAW_SQUIGGLY_UNDERLINE
view.add_regions(region_key,
error_regions,
settings.get("error_color", "invalid.illegal"),
settings.get("error_icon", ""),
sublime.DRAW_OUTLINED
if settings.get("error_outlined") else
sublime.DRAW_NO_FILL +
sublime.DRAW_NO_OUTLINE +
sublime.DRAW_SQUIGGLY_UNDERLINE)
error_color,
error_icon,
error_draw_style)

def update_status(self, view, info):
"""Update the status line with error info and quick info if no error info"""
Expand Down

0 comments on commit 1d5160e

Please sign in to comment.