mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
vim: Fix hollow cursor being offset when selecting text (#11000)
Fixed the cursor selection being offset, the hollow cursor was being
displayed fine when not having text selected that's why it might not
have been noticed at first.
Release Notes:
- N/A
Improved:
0d6fb08b67
This commit is contained in:
parent
f8beda0704
commit
d9eb3c4b35
@ -89,7 +89,10 @@ impl SelectionLayout {
|
||||
}
|
||||
|
||||
// any vim visual mode (including line mode)
|
||||
if cursor_shape == CursorShape::Block && !range.is_empty() && !selection.reversed {
|
||||
if (cursor_shape == CursorShape::Block || cursor_shape == CursorShape::Hollow)
|
||||
&& !range.is_empty()
|
||||
&& !selection.reversed
|
||||
{
|
||||
if head.column() > 0 {
|
||||
head = map.clip_point(DisplayPoint::new(head.row(), head.column() - 1), Bias::Left)
|
||||
} else if head.row() > 0 && head != map.max_point() {
|
||||
|
Loading…
Reference in New Issue
Block a user