def display_error_in_status_if_cursor(self, view):
"""
Displays the error message in the sublime status
line if the cursor is above an error (in source code).
For the click on the error list, see T3SVIEWS.ERROR.on_click()
"""
try:
error = self._get_error_at(view.sel()[0].begin(), view.file_name())
except:
# no selection in view
return
if error is not None:
sublime.status_message(error)
self.previously_error_under_cursor = True
elif self.previously_error_under_cursor: # only clear once
sublime.status_message('')
self.previously_error_under_cursor = False
评论列表
文章目录