Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections

This commit is contained in:
Keith Simmons
2022-05-13 15:55:27 -07:00
parent c9dcfff607
commit db0a9114c2
19 changed files with 351 additions and 397 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ use std::ops::{Deref, Range};
use collections::BTreeMap;
use itertools::{Either, Itertools};
use editor::display_map::ToDisplayPoint;
use editor::{display_map::ToDisplayPoint, Autoscroll};
use gpui::{json::json, keymap::Keystroke, ViewHandle};
use indoc::indoc;
use language::Selection;
@@ -128,7 +128,7 @@ impl<'a> VimTestContext<'a> {
let (unmarked_text, markers) = marked_text(&text);
editor.set_text(unmarked_text, cx);
let cursor_offset = markers[0];
editor.change_selections(true, cx, |s| {
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
s.replace_cursors_with(|map| vec![cursor_offset.to_display_point(map)])
});
})