luckasRanarison / nvim-devdocs

Neovim DevDocs integration
MIT License
270 stars 20 forks source link

fix telescope issue when no matches #60

Closed emmanueltouzery closed 1 year ago

emmanueltouzery commented 1 year 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 1 year 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 1 year 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 1 year ago

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

emmanueltouzery commented 1 year 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.