mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
fix: Fix auto-ref completions inserting into wrong locations
This commit is contained in:
parent
1f028403cd
commit
06ee4d6222
10 changed files with 98 additions and 94 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
use hir::{db::HirDatabase, Documentation, HasAttrs, StructKind};
|
||||
use ide_db::SymbolKind;
|
||||
use syntax::AstNode;
|
||||
|
||||
use crate::{
|
||||
context::{CompletionContext, PathCompletionCtx, PathKind},
|
||||
|
@ -117,7 +118,7 @@ fn render(
|
|||
..ctx.completion_relevance()
|
||||
});
|
||||
if let Some(ref_match) = compute_ref_match(completion, &ty) {
|
||||
item.ref_match(ref_match);
|
||||
item.ref_match(ref_match, path_ctx.path.syntax().text_range().start());
|
||||
}
|
||||
|
||||
if let Some(import_to_add) = ctx.import_to_add {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue