You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable rendering on next listened to event after horizontal scroll
# Details
This plugin does not and will not gracefully handle horizontal
scrolling.
As such add logic to validation to check the left column of the
current window attempting to be rendered.
If this value is larger than zero rendering will not proceed.
We could add an additional event to listen to scroll events, like so:
```lua
vim.api.nvim_create_autocmd({ 'WinScrolled' }, {
group = group,
callback = function()
for win, changes in pairs(vim.v.event) do
if win ~= 'all' and changes.leftcol ~= 0 then
local buf = util.win_to_buf(win)
vim.schedule(function()
ui.refresh(buf)
end)
end
end
end,
})
```
Which would disable and re-enable rendering on horizontal scroll
events as appropriate.
However listening to every single scroll event seems heavy for this
plugin to do, so I would rather avoid it. Maybe make it opt-in, at
some point in the future if users want.
0 commit comments