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
So it seems that calculating the distance of the cursor to the end of the file, this plugin just uses the lne number count. However, when you have a closed fold near the end of the file, this distorts the calculation; even though the viewport is close to the EoF, the line the cursor is on can still be quite far away.
The text was updated successfully, but these errors were encountered:
Not sure how exactly this plugin does its calculations, but the folding information is straightforward to get via vim.fn.foldclosed and vim.fn.foldclosedend:
foldclosedend({lnum})
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the last line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
So basically, you could check for each line between the cursor line and the last line, whether one of them is closed, and if so, use the result from foldclosedend to determine the size of the fold.
Thanks for the plugin!
So it seems that calculating the distance of the cursor to the end of the file, this plugin just uses the lne number count. However, when you have a closed fold near the end of the file, this distorts the calculation; even though the viewport is close to the EoF, the line the cursor is on can still be quite far away.
The text was updated successfully, but these errors were encountered: