From 7de8228efdf8778392e8b71fd35f45513d72595c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 15 Aug 2022 16:15:20 -0700 Subject: [PATCH] Clear stale go-to-def link when resizing buffer font --- crates/editor/src/editor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index e8d3ad4650304acaf85ae8ed1799cd3391b5f89d..2fd3c0653801074f6112569deb2f6cfb79ed6cbb 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -42,7 +42,7 @@ use language::{ DiagnosticSeverity, IndentKind, IndentSize, Language, OffsetRangeExt, OffsetUtf16, Point, Selection, SelectionGoal, TransactionId, }; -use link_go_to_definition::LinkGoToDefinitionState; +use link_go_to_definition::{hide_link_definition, LinkGoToDefinitionState}; pub use multi_buffer::{ Anchor, AnchorRangeExt, ExcerptId, ExcerptRange, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -6010,6 +6010,7 @@ impl View for Editor { if let Some(editor) = handle.upgrade(cx) { editor.update(cx, |editor, cx| { hide_hover(editor, cx); + hide_link_definition(editor, cx); }) } });