fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Intellisense triggered for the wrong position with backticks

Open kerams opened this issue 2 years ago • 4 comments

Repro steps

let ``type`` (): unit = i

Press ctrl-space on i.

Expected behavior

Completions for i are shown.

Actual behavior

Completions for ``type`` (supposedly, if the panel's position is anything to go by) are shown.

image

Known workarounds

Avoid identifiers with backticks.

Related information

VS 17.7.0 Preview 2.0

kerams avatar Jun 24 '23 16:06 kerams

Perhaps a regression, not sure.

kerams avatar Jun 24 '23 16:06 kerams

Huh. Interesting.

vzarytovskii avatar Jun 24 '23 16:06 vzarytovskii

I am unsure if this is the same bug but I also have issues with completion on properties containing using double backtick.

CleanShot 2024-04-22 at 20 43 27

Code for reproduction:

type SubType() =
    member this.test = "dwdw"

type Test() =
    member this.``Sub.Type`` : SubType = SubType()

let t = Test()

My version is Visual Studio ARM Version 17.9.6

Original report: https://github.com/easybuild-org/EasyBuild.FileSystemProvider/issues/3

MangelMaxime avatar Apr 22 '24 18:04 MangelMaxime

It seems we don't compensate (or overcompensate) for the backticks when we calculating range for the autocompletion.

vzarytovskii avatar Apr 22 '24 19:04 vzarytovskii