Skip to content

Completion for string property doesn't include replacementSpan if string is unclosed  #54092

Closed
@stefan-lacatus

Description

@stefan-lacatus

monaco-editor version: 0.10.1
Browser: All
OS: All
Steps or JS usage snippet reproducing the issue:
Completions of fields with dot in their name is somewhat broken.
How to reproduce:

  1. You have the following object: let x = { "foo.bar": "test" };
  2. Typing in x["fo] and pressing ctrl+space, and then selecting foo.bar generates the expected result
  3. Typing in x["foo.b and pressing ctrl+space, and selecting foo.bar generates x["foo.foo.bar.

Basically if there is a dot in the field name the issue appears. It only happens in monaco editor. VScode does not have the same bug.

I would gladly fix this if you can point me in the right direction (monaco-typescript most likely, in the completions provider, but i don't really see what the issue is in the code).

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions