Skip to content

Commit

Permalink
Prevent infinite loop when server returns empty code lenses
Browse files Browse the repository at this point in the history
  • Loading branch information
rwols committed Jun 22, 2021
1 parent 05d6462 commit 929fec2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions plugin/session_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ def _on_code_lenses_async(self, response: Optional[List[CodeLens]]) -> None:

def resolve_visible_code_lenses_async(self) -> None:
if self._code_lenses.is_empty():
self.start_code_lenses_async()
return

promises = [] # type: List[Promise[None]]
for code_lens in self._code_lenses.unresolved_visible_code_lens(self.view.visible_region()):
callback = functools.partial(code_lens.resolve, self.view)
Expand Down

0 comments on commit 929fec2

Please sign in to comment.