vim: o should scroll (#20054)

Closes: #19684

Release Notes:

- vim: Fixed `o` not scrolling new head into view
This commit is contained in:
Conrad Irwin 2024-10-31 23:26:04 -06:00 committed by GitHub
parent f757e5a6c3
commit daa9939c03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -416,7 +416,7 @@ impl Vim {
pub fn other_end(&mut self, _: &OtherEnd, cx: &mut ViewContext<Self>) {
self.update_editor(cx, |_, editor, cx| {
editor.change_selections(None, cx, |s| {
editor.change_selections(Some(Autoscroll::fit()), cx, |s| {
s.move_with(|_, selection| {
selection.reversed = !selection.reversed;
})