Aasim-A/scrollEOF.nvim

Doesn't work properly with wrap setting

MasouShizuka opened this issue · 3 comments

If there are lines wrapped, the scrolloff of end of the file will not be equal to the scrolloff in the settings, in some cases there is even no scrolloff.

For example (scrolloff = 5):
1
2
3

I've looked into this for a while and haven't found a good solution.
Vim doesn't provide a good way to get the cursor position relative to the window instead of the line number.
I'll see if I can come up with a solution that fixes this as well as when you have code folded because that causes a similar issue.

I'm having the same issue with Markdown files. I don't hard wrap lines.

I wonder if neovim/neovim#15754 could be of help?

vim.fn.screenrow() and vim.fn.screencol() appear to return the cursor position relative to the screen, instead of the line number.

Hi @stevenxxiu , thanks for the suggestion. I'll see if I can make that work.