Skip to content

Respond to vscode breaking change in 1.79.2 that triggers completion inside words#2542

Merged
JoeRobich merged 2 commits intoOmniSharp:masterfrom
dibarbet:completion_1_79_2
Jun 16, 2023
Merged

Respond to vscode breaking change in 1.79.2 that triggers completion inside words#2542
JoeRobich merged 2 commits intoOmniSharp:masterfrom
dibarbet:completion_1_79_2

Conversation

@dibarbet
Copy link
Copy Markdown
Contributor

@dibarbet dibarbet commented Jun 16, 2023

Fixes dotnet/vscode-csharp#5801

VSCode made a change in completion somewhere between 1.78.2 and 1.79.2 where they now trigger completion automatically inside words. This was confirmed as an intentional change here - microsoft/vscode#185286

However, this has caused lots of bug reports on us because O# will replace the entire word (including after the cursor) if a completion is accepted, instead of just inserting the selected completion item before the cursor.

This does the same change as we did to fix this in Roslyn LSP - we limit the range to the cursor position. See dotnet/roslyn#68624

Now looks like
completion_1_79_2

@dibarbet dibarbet requested review from 333fred and JoeRobich June 16, 2023 18:28
Comment thread tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs Outdated
Copy link
Copy Markdown
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I saw Gen's change and was hoping someone would port it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@id:editor.suggest.insertMode not honored

3 participants