David-Kunz / gen.nvim

Neovim plugin to generate text using LLMs with customizable prompts
The Unlicense
992 stars 64 forks source link

fix: cancel job when floating window was closed prematurely #21

Closed smjonas closed 8 months ago

smjonas commented 8 months ago

When the preview window was closed with q, on_stdout would call nvim_win_call with an invalid window ID leading to errors. This change cancels the job if an invalid window ID was detected in on_stdout.

David-Kunz commented 8 months ago

Perfect, thank you again, @smjonas , you really like to cancel operations 😄