Highly visible viewport marker
@@ -518,6 +518,8 @@ if False:
def mark_visible_viewport(panel, view, errors):
# type: (sublime.View, sublime.View, List[Dict[str, Any]]) -> None
KEY = 'SL.Panel.ViewportMarker'
+ KEY2 = 'SL.Panel.ViewportMarker2'
+
viewport = view.visible_region()
visible_errors = [e for e in errors if viewport.contains(e['region'])]
@@ -534,10 +536,18 @@ def mark_visible_viewport(panel, view, errors):
scope = 'region.bluish'
flags = (sublime.DRAW_SOLID_UNDERLINE | sublime.DRAW_NO_FILL |
sublime.DRAW_NO_OUTLINE | sublime.DRAW_EMPTY_AS_OVERWRITE)
- print()
panel.add_regions(KEY, regions, scope=scope, flags=flags)
+
+ scope = 'comment'
+ scope = 'region.bluish'
+ flags = sublime.DRAW_NO_OUTLINE
+ head_line = panel.text_point(head['panel_line'], 0)
+ end_line = panel.text_point(end['panel_line'] + 1, 0)
+ regions = [sublime.Region(r.a, r.a + 1) for r in panel.lines(sublime.Region(head_line, end_line))]
+ panel.add_regions(KEY2, regions, scope=scope, flags=flags)
else:
panel.erase_regions(KEY)
+ panel.erase_regions(KEY2)
def update_selection(panel, region=None):
