ZIm/crates/vim/src
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
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal vim: Fix ctrl-u/ctrl-d with high vertical_scroll_margin (#16031) 2024-08-09 16:00:05 +02:00
test Use US English spelling of "behavior" and "customize" (#15117) 2024-07-24 16:36:01 -04:00
change_list.rs vim test redux (#11709) 2024-05-11 14:04:05 -04:00
command.rs vim: Support ranges in command (#15985) 2024-08-08 21:47:27 +01:00
digraph.rs Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
editor_events.rs vim: Support ranges in command (#15985) 2024-08-08 21:47:27 +01:00
insert.rs vim: Support for q and @ (#13761) 2024-07-03 09:03:39 -06:00
mode_indicator.rs vim: Support for q and @ (#13761) 2024-07-03 09:03:39 -06:00
motion.rs fix: Typos (#15313) 2024-07-26 17:52:37 -07:00
normal.rs vim: Fix count in visual indent (#15296) 2024-07-26 16:03:41 -06:00
object.rs vim: Adjust surrounding_markers method (#14752) 2024-07-18 11:53:51 -06:00
replace.rs vim: Allow count and repeat for "r" and "shift-r" action (#13287) 2024-06-24 09:41:33 -06:00
state.rs Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
surrounds.rs fix: Typos (#15313) 2024-07-26 17:52:37 -07:00
test.rs vim: Fix >... (#15404) 2024-07-29 09:22:25 -06:00
vim.rs vim: Fix >... (#15404) 2024-07-29 09:22:25 -06:00
visual.rs vim: Fix gv after actions (#14829) 2024-07-19 13:26:55 -06:00