Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections
This commit is contained in:
parent
c9dcfff607
commit
db0a9114c2
19 changed files with 351 additions and 397 deletions
|
@ -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)])
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue