anuvyklack / pretty-fold.nvim

Foldtext customization in Neovim
Apache License 2.0
441 stars 21 forks source link

Safeguard closing of preview windows to avoid "Invalid window id" errors. #24

Closed jaekyeom closed 2 years ago

jaekyeom commented 2 years ago

Currently, close() for the same preview window can be called multiple times (e.g., due to both autocmds and key mappings?), which leads to "Invalid window id" errors. This PR prevents it by safeguarding the close() function.

Please consider merging this.

anuvyklack commented 2 years ago

Thank you for contribution!