Skip to content

Commit

Permalink
Index error crash fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslavyaroslav committed Oct 10, 2024
1 parent 778b062 commit be04e41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/phantom_streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def __init__(self, view: View) -> None:
self.completion: str = ''
self.phantom: Phantom | None = None
self.phantom_id: int | None = None
logger.debug(f'view selection: {view.sel()[0]}')
self.selected_region = view.sel()[0] # saving only first selection to ease buffer logic
if len(view.sel()) > 0:
logger.debug(f'view selection: {view.sel()[0]}')
self.selected_region = view.sel()[0] # saving only first selection to ease buffer logic

def update_completion(self, completion: str):
line_beginning = self.view.line(self.view.sel()[0])
Expand Down

0 comments on commit be04e41

Please sign in to comment.