kiwi.nvim
kiwi.nvim copied to clipboard
utils.choose_wiki doesn't handle async input incorrectly
Current implementation of utils.choose_wiki and its callers has an issue related to asynchronous execution. vim.ui.select is asynchronous; it displays a prompt and returns immediately, while the code that processes the user's choice runs later in a callback. Current code attempts to return a path from utils.choose_wiki, but this will always return an empty string because the function finishes before the user has selected anything.
I'll open a PR once https://github.com/serenevoid/kiwi.nvim/pull/41 is merged as M.open_wiki_index needs to be fixed as well