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
|
@ -1,5 +1,5 @@
|
|||
use crate::{state::Mode, Vim};
|
||||
use editor::Bias;
|
||||
use editor::{Autoscroll, Bias};
|
||||
use gpui::{actions, MutableAppContext, ViewContext};
|
||||
use language::SelectionGoal;
|
||||
use workspace::Workspace;
|
||||
|
@ -13,7 +13,7 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
fn normal_before(_: &mut Workspace, _: &NormalBefore, cx: &mut ViewContext<Workspace>) {
|
||||
Vim::update(cx, |state, cx| {
|
||||
state.update_active_editor(cx, |editor, cx| {
|
||||
editor.change_selections(true, cx, |s| {
|
||||
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||
s.move_cursors_with(|map, mut cursor, _| {
|
||||
*cursor.column_mut() = cursor.column().saturating_sub(1);
|
||||
(map.clip_point(cursor, Bias::Left), SelectionGoal::None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue