Closed ColinKennedy closed 8 months ago
I wonder why this fixes the issue, I always understood vim.schedule
as "the thing you use with vim.loop
." And would've thought in this case vim.schedule
would be a no-op.
I wonder why this fixes the issue, I always understood vim.schedule as "the thing you use with vim.loop." And would've thought in this case vim.schedule would be a no-op.
vim.schedule places its function to the end of Vim's event queue and that functionality happens whether or not you're in vim.loop. Since we place the call at the end, it gets the most up to date view of the text object
thanks again, I doubt I would've be able to solve this with my previous understanding :p probably would've added some racy delay if I even fixed it at all.
It's my pleasure! Thank you for the quick and easy PR review :)
Fixes https://github.com/0xAdk/full_visual_line.nvim/issues/2
By deferring the evaluation of
full_visual_line.nvim
, it gives time for other text object operators to execute firstBad (current master branch)
https://github.com/0xAdk/full_visual_line.nvim/assets/10103049/3eb1a562-0d26-4190-aa16-0f0400640864
Fixed (this branch)
https://github.com/0xAdk/full_visual_line.nvim/assets/10103049/be7ebd87-dbce-49ba-8d75-0612646f32a8