Disable nav history in vim scrolls (#32656)

Reland of #30345 to fix merge conflicts with the new skip-completions
option

Fixes #29431
Fixes #17592

Release Notes:

- vim: Scrolls are no longer added to the jumplist
This commit is contained in:
Conrad Irwin 2025-06-12 22:18:22 -06:00 committed by GitHub
parent 0fe35f440d
commit 9166e66519
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 208 additions and 119 deletions

View file

@ -1,12 +1,13 @@
use crate::{
DisplayRow, Editor, EditorMode, LineWithInvisibles, RowExt, display_map::ToDisplayPoint,
DisplayRow, Editor, EditorMode, LineWithInvisibles, RowExt, SelectionEffects,
display_map::ToDisplayPoint,
};
use gpui::{Bounds, Context, Pixels, Window, px};
use language::Point;
use multi_buffer::Anchor;
use std::{cmp, f32};
#[derive(PartialEq, Eq, Clone, Copy)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum Autoscroll {
Next,
Strategy(AutoscrollStrategy, Option<Anchor>),
@ -66,7 +67,16 @@ impl Autoscroll {
}
}
#[derive(PartialEq, Eq, Default, Clone, Copy)]
impl Into<SelectionEffects> for Option<Autoscroll> {
fn into(self) -> SelectionEffects {
match self {
Some(autoscroll) => SelectionEffects::scroll(autoscroll),
None => SelectionEffects::no_scroll(),
}
}
}
#[derive(Debug, PartialEq, Eq, Default, Clone, Copy)]
pub enum AutoscrollStrategy {
Fit,
Newest,