luckasRanarison / nvim-devdocs

Neovim DevDocs integration
MIT License
265 stars 19 forks source link

fix telescope issue when no matches #60

Closed emmanueltouzery closed 10 months ago

emmanueltouzery commented 10 months ago

when there were no matches in the telescope search and the user pressed enter, we had a crash.

honestly i'm not sure what keep_last_buf is supposed to do...

you can reproduce the crash by opening the telescope picker, then typing garbage in it, until there are no matches, then pressing enter. This fixes it. Not sure whether commenting keep_last_buf would cause some loss of feature..?

luckasRanarison commented 10 months ago

honestly i'm not sure what keep_last_buf is supposed to do...

It was for caching, but now it became useless because the buffer previewer will override it so removing it is fine.

But it's clearly an issue with telescope.

emmanueltouzery commented 10 months ago

otherwise the "if selection" thing is in nvim-devdocs for sure. Oh, I didn't notice it. It was the reason of the crash😅

luckasRanarison commented 10 months ago

oh my bad, I've edited your comment instead of quote reply...

emmanueltouzery commented 10 months ago

yes, but i think the keep_last_buf was also part of it. well possibly first the if selection, and then second crash (taking down the whole neovim) after closing the telescope window after the first crash, related to keep_last_buf. maybe fixing the if selection was enough though.