mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 04:20:46 +00:00
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
|
||||
&& cursor_position != layout.position_map.snapshot.max_point()
|
||||
{
|
||||
cursor_row -= 1;
|
||||
cursor_column =
|
||||
layout.position_map.snapshot.line_len(cursor_row) as usize;
|
||||
let new = layout.position_map.snapshot.clip_point(
|
||||
DisplayPoint::new(
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue