mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-07 21:25:11 +00:00
fix(scroll): compat with Neovim 0.9.4
This commit is contained in:
parent
842605f072
commit
4c52b7f25d
1 changed files with 3 additions and 0 deletions
|
@ -227,6 +227,9 @@ local function scroll_lines(win, from, to)
|
|||
if to.topfill > 0 then
|
||||
offset = offset - to.topfill
|
||||
end
|
||||
if not vim.api.nvim_win_text_height then
|
||||
return end_row - start_row + offset
|
||||
end
|
||||
return vim.api.nvim_win_text_height(win, { start_row = start_row, end_row = end_row }).all + offset - 1
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue