vim: Fix ctrl-u/ctrl-d with high `vertical_scroll_margin` (#16031)
This makes sure that the `vertical_scroll_margin` doesn't leave the cursor out of screen or somewhere it shouldn't go when it's higher than the visible lines on screen. So we cap it to `visible_line_count / 2`, similar to nvim: https://github.com/neovim/neovim/blob/5aa1a9532cbac835ad027ebdf04311c7e8fb7007/src/nvim/window.c#L6560 Fixes #15101 Release Notes: - Fixed `ctrl-u`/`ctrl-d` in Vim mode not working correctly when `vertical_scroll_margin` is set to a really high value. Co-authored-by: Bennet <bennet@zed.dev>
T
Thorsten Ball committed
c1872e9cb09c72c9378908a0f8b33fe2c4fc3e07
Parent: 09c9ed4
Committed by GitHub <noreply@github.com>
on 8/9/2024, 2:00:05 PM