Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02731ef

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
fix inline rename for generic types (#2955)
1 parent4b4d90b commit02731ef

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open Microsoft.CodeAnalysis
1111
openMicrosoft.CodeAnalysis.Text
1212

1313
openMicrosoft.FSharp.Compiler.SourceCodeServices
14-
openSymbols
14+
openMicrosoft.VisualStudio.FSharp.Editor.Symbols
1515

1616

1717
moduleinternalSymbolHelpers=
@@ -43,8 +43,16 @@ module internal SymbolHelpers =
4343
|> Async.Parallel
4444
|> Async.map Array.concat
4545

46+
letdeclarationLength=
47+
symbol.DeclarationLocation
48+
|> Option.map(fun m-> m.EndColumn- m.StartColumn)
49+
4650
return
47-
(symbolUses
51+
(symbolUses
52+
|> Seq.filter(fun su->
53+
match declarationLengthwith
54+
| Some declLength-> su.RangeAlternate.EndColumn- su.RangeAlternate.StartColumn= declLength
55+
| None->true)
4856
|> Seq.collect(fun symbolUse->
4957
solution.GetDocumentIdsWithFilePath(symbolUse.FileName)|> Seq.map(fun id-> id, symbolUse))
5058
|> Seq.groupBy fst

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp