Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Typing a keyword followed by space at start of another word deletes the preceding word when suggestions are triggered #5826

Closed
valters-tomsons opened this issue Jun 18, 2023 · 5 comments

Comments

@valters-tomsons
Copy link
Contributor

Issue Description

When typing a keyword at the start of another word and then pressing the space bar, the preceding word gets deleted. This behavior seems to be triggered when the autocomplete suggestions pop up.

I've uninstalled all other extensions and reset the entire VScode configuration.

🎥 Video Recording Here! 🎥
Kooha-2023-06-19-02-45-00.webm

Steps to Reproduce

  1. Open Visual Studio Code.
  2. Enable the C# extension.
  3. Create a new C# file or open an existing one.
  4. Type a word, for example, exampleWord.
  5. Place the cursor at the start of the word you just typed.
  6. Begin typing a C# keyword such as bool.
  7. Make sure the autocomplete suggestion popup appears.
  8. Finish typing the word and press space bar

Expected Behavior

The keyword should be inserted at the cursor location followed by a space, without affecting the preceding word. For example, typing bool at the start of exampleWord should result in bool exampleWord.

Actual Behavior

The preceding word is deleted when the space bar is pressed after typing a keyword at the start of the word. Using the previous example, exampleWord is deleted and only bool remains.

Logs

OmniSharp log

Nothing appears in OmniSharp log when the word is replaced.

C# log

Nothing appears in C# output when the word is replaced.

Environment information

VSCode version: 1.79.2
C# Extension: 1.25.9

Mono Information OmniSharp using mono: 6.12.0
Dotnet Information .NET SDK: Version: 7.0.105 Commit: e1bc5e001c

Runtime Environment:
OS Name: endeavouros
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/7.0.105/

Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61b17

.NET SDKs installed:
6.0.118 [/usr/share/dotnet/sdk]
7.0.105 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.18 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_ROOT [/usr/share/dotnet]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version
csharp ms-dotnettools 1.25.9
vscode-neovim asvetliakov 0.0.97
@lukasfri
Copy link

Exactly same issue for me, tried the same things.

@bwiklund
Copy link

this also started recently for our team. i couldn't find any mention of this bug in the main vscode issues page, so i think this extension might be the source of it? my global "insert/replace" for suggestions is set to insert, so i don't think it's coming from that.

@dschmitt-org
Copy link

dschmitt-org commented Jun 21, 2023

Same behavior for me, it's annoying...

Bug only appears on the Version 1.79.X of vscode.
Before that version Intellisense popup will not be shown on that particular case.

@parksj10
Copy link

parksj10 commented Jun 21, 2023

Yes, just tested myself, same thing. Note: tested with Typescript in my project and it seems to be specific to C# extension/language

edit:

here's a screen cap

2023-06-21 11-13-33 2023-06-21 11_14_54 - Csharp autocompletion issue

@arunchndr
Copy link
Member

This is a dup of #5801. v1.26 has the fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants