Skip to content

Commit

Permalink
Merge pull request #1941 from SublimeLinter/iter-highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed May 2, 2024
2 parents bafd21d + a290e8d commit 9c804e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions highlight_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
# Sublime >= 4074 supports underline styles on white space
# https://github.com/sublimehq/sublime_text/issues/137
SUBLIME_SUPPORTS_WS_SQUIGGLES = int(sublime.version()) >= 4074
SUBLIME_SUPPORTS_REGION_ANNOTATIONS = int(sublime.version()) >= 4050

State = {
'active_view': None,
Expand Down Expand Up @@ -629,12 +628,12 @@ def _reload_everstore(store):
@util.assert_on_ui_thread
def draw_view_region(view, key, regions):
# type: (sublime.View, RegionKey, List[sublime.Region]) -> None
if SUBLIME_SUPPORTS_REGION_ANNOTATIONS and isinstance(key, Squiggle):
if isinstance(key, Squiggle):
if key.annotation and key.visible():
annotations = {
"annotations": [key.annotation],
"annotation_color":
view.style_for_scope(key.scope)["foreground"]
view.style_for_scope(key.scope).get("foreground", "#f00")
}
else:
annotations = {}
Expand Down

0 comments on commit 9c804e8

Please sign in to comment.