Fix visual selection cursor in multibuffers
This commit is contained in:
parent
5f6535e92b
commit
22927fa1d7
1 changed files with 9 additions and 3 deletions
|
@ -860,9 +860,15 @@ impl EditorElement {
|
||||||
} else if cursor_row > 0
|
} else if cursor_row > 0
|
||||||
&& cursor_position != layout.position_map.snapshot.max_point()
|
&& cursor_position != layout.position_map.snapshot.max_point()
|
||||||
{
|
{
|
||||||
cursor_row -= 1;
|
let new = layout.position_map.snapshot.clip_point(
|
||||||
cursor_column =
|
DisplayPoint::new(
|
||||||
layout.position_map.snapshot.line_len(cursor_row) as usize;
|
cursor_row - 1,
|
||||||
|
layout.position_map.snapshot.line_len(cursor_row),
|
||||||
|
),
|
||||||
|
Bias::Left,
|
||||||
|
);
|
||||||
|
cursor_row = new.row();
|
||||||
|
cursor_column = new.column() as usize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbg!(selection.head, cursor_row, cursor_column);
|
dbg!(selection.head, cursor_row, cursor_column);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue