mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
Update check_dir_and_ask: async for vim.ui.select
vim.ui.select is meant to be used as an asynchronous operation, in order to do this, it receives a callback as a third argument. This commit adjusts check_dir_and_ask to leverage the asynchronous usage of vim.ui.select, as a side effect to make this work, I also refactored the code that depends on the function in order to leverage the asynchronous operations. References: - https://github.com/stevearc/dressing.nvim/issues/80#issuecomment-1380734202 - https://github.com/stevearc/dressing.nvim - https://github.com/neovim/neovim/pull/15771 Fixes: - https://github.com/renerocksai/telekasten.nvim/issues/266 One reason this bug can sneak into the codebase is because the default unmodified behavior of vim.ui.select is to use the :Messages section of neovim to ask for input and this UI is a synchronous blocking operation. However, this is not the intended usage of vim.ui.select as presented above.
This commit is contained in:
2324
lua/telekasten.lua
2324
lua/telekasten.lua
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user