ZIm/crates/vim/src/normal
Thorsten Ball c1872e9cb0
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:


5aa1a9532c/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>
2024-08-09 16:00:05 +02:00
..
case.rs vim: Fix gv after actions (#14829) 2024-07-19 13:26:55 -06:00
change.rs Multicursor vim registers (#13025) 2024-06-13 20:32:58 -06:00
delete.rs Multicursor vim registers (#13025) 2024-06-13 20:32:58 -06:00
increment.rs vim: Fix gv after actions (#14829) 2024-07-19 13:26:55 -06:00
indent.rs Implement Indent & Outdent as operators (#12430) 2024-06-04 15:17:01 -06:00
mark.rs vim gigv (#13028) 2024-06-14 10:16:59 -06:00
paste.rs vim: Fix gv after actions (#14829) 2024-07-19 13:26:55 -06:00
repeat.rs chore: Fix clippy violations from Cargo.toml (#15216) 2024-07-25 20:22:01 +02:00
scroll.rs vim: Fix ctrl-u/ctrl-d with high vertical_scroll_margin (#16031) 2024-08-09 16:00:05 +02:00
search.rs vim: Support ranges in command (#15985) 2024-08-08 21:47:27 +01:00
substitute.rs vim: Fix gv after actions (#14829) 2024-07-19 13:26:55 -06:00
toggle_comments.rs vim: Add motion support for toggle comments (#14919) 2024-07-22 21:22:10 -06:00
yank.rs Multicursor vim registers (#13025) 2024-06-13 20:32:58 -06:00