mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 17:44:30 +00:00
Use the correct snapshot when calculating mouse positions (#6453)
Release Notes: - Fixed a panic in calculating remote cursor positions
This commit is contained in:
commit
a181dc8d58
1 changed files with 3 additions and 2 deletions
|
@ -567,7 +567,7 @@ impl EditorElement {
|
|||
cx,
|
||||
);
|
||||
hover_at(editor, Some(point), cx);
|
||||
Self::update_visible_cursor(editor, point, cx);
|
||||
Self::update_visible_cursor(editor, point, position_map, cx);
|
||||
}
|
||||
None => {
|
||||
update_inlay_link_and_hover_points(
|
||||
|
@ -592,9 +592,10 @@ impl EditorElement {
|
|||
fn update_visible_cursor(
|
||||
editor: &mut Editor,
|
||||
point: DisplayPoint,
|
||||
position_map: &PositionMap,
|
||||
cx: &mut ViewContext<Editor>,
|
||||
) {
|
||||
let snapshot = editor.snapshot(cx);
|
||||
let snapshot = &position_map.snapshot;
|
||||
let Some(hub) = editor.collaboration_hub() else {
|
||||
return;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue