shortcuts / no-neck-pain.nvim

☕ Dead simple yet super extensible plugin to center the currently focused buffer to the middle of the screen.
MIT License
583 stars 13 forks source link

fix: flickering because of debounce #311

Closed shortcuts closed 8 months ago

shortcuts commented 8 months ago

📃 Summary

closes https://github.com/shortcuts/no-neck-pain.nvim/issues/258

we had to introduce debounce because TSPlaygroundToggle outcome being inconsistent due to nvim-treesitter/playground closing/creating many buffers at start up, but if instead we debounce just by a few (2) milliseconds each step of the NoNeckPain lifecycle, we can prevent flickering and state inconsistencies

this also fixes NvimTree race conditions with NoNeckPain!!