gillyb / stable-windows

Keeps vim windows stable on layout changes
40 stars 1 forks source link

Scrolling when cursor is on the first line #5

Open jtxx000 opened 4 years ago

jtxx000 commented 4 years ago

When the cursor is on the first line in the main buffer and scrolloff=0, opening fzf causes the main buffer to scroll down by a single line.

I believe the problem is the line

execute 'normal! '.(topWinLine + &scrolloff - 1).'jzt'

which evaluates to 0j, which (counter-intuitively) seems to be equivalent to 1j.

Thanks for the awesome plugin!