Skip to content

Commit

Permalink
Show the next AI completion as soon as it is generated with C-down
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Sep 27, 2024
1 parent bb4b2e6 commit ba8c75c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mypython/mypython.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ async def async_suggestor(regenerate=False) -> None:
# Set suggestion and redraw interface.
if suggestion and suggestion not in self.ai_suggestions:
self.ai_suggestions.append(suggestion)
if regenerate:
self.ai_suggestion_index = len(self.ai_suggestions) - 1
self.on_suggestion_set.fire()
else:
# Otherwise, restart thread.
Expand Down

0 comments on commit ba8c75c

Please sign in to comment.