Remove unused `we_count`
@@ -23,7 +23,6 @@ OUTPUT_PANEL_SETTINGS = {
State = {
- 'we_count': {},
'active_view': None,
'current_pos': (-1, -1)
}
@@ -41,27 +40,15 @@ def plugin_unloaded():
@events.on(events.FINISHED_LINTING)
def on_finished_linting(buffer_id):
- active_view = State['active_view']
- if active_view.buffer_id() == buffer_id:
- State.update({
- 'we_count': get_we_count(active_view.id())
- })
-
for window in sublime.windows():
fill_panel(window, update=True)
class UpdateState(sublime_plugin.EventListener):
def on_activated_async(self, active_view):
- vid = active_view.id()
-
- current_pos = get_current_pos(active_view)
- we_count = get_we_count(vid)
-
State.update({
'active_view': active_view,
- 'we_count': we_count,
- 'current_pos': current_pos
+ 'current_pos': get_current_pos(active_view)
})
update_panel_selection(**State)
@@ -126,11 +113,6 @@ class SublimeLinterUpdatePanelCommand(sublime_plugin.TextCommand):
sel.add(0)
-def get_we_count(vid):
- view_errors = persist.errors.get_view_dict(vid) if vid else {}
- return view_errors.get('we_count_view', {})
-
-
def get_current_pos(view):
try:
return view.rowcol(view.sel()[0].begin())
@@ -346,7 +328,7 @@ def get_panel_region(row, panel, is_full_line=False):
return region
-def update_panel_selection(active_view, we_count, current_pos, **kwargs):
+def update_panel_selection(active_view, current_pos, **kwargs):
"""Alter panel selection according to errors belonging to current position.
If current position is between two errors, place empty panel selection on start of next error's panel line.
