Use distinct carets for line number hovers (#22836)
Release Notes: - N/A
This commit is contained in:
parent
a9d2628c05
commit
6f2b88239b
1 changed files with 7 additions and 1 deletions
|
@ -3958,7 +3958,13 @@ impl EditorElement {
|
||||||
let Some(()) = line.paint(hitbox.origin, line_height, cx).log_err() else {
|
let Some(()) = line.paint(hitbox.origin, line_height, cx).log_err() else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
cx.set_cursor_style(CursorStyle::PointingHand, hitbox);
|
// In singleton buffers, we select corresponding lines on the line number click, so use | -like cursor.
|
||||||
|
// In multi buffers, we open file at the line number clicked, so use a pointing hand cursor.
|
||||||
|
if is_singleton {
|
||||||
|
cx.set_cursor_style(CursorStyle::IBeam, hitbox);
|
||||||
|
} else {
|
||||||
|
cx.set_cursor_style(CursorStyle::PointingHand, hitbox);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue