Skip to content

Correctly use default error color in the presence of an empty st… #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who knows why this ever even worked.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you've got me - this looks easier to reason about though 👍

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