Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Selecting Intellisense suggestion results in doubled content being typed #153

Closed
jasonwilliams opened this issue Nov 9, 2021 · 1 comment · Fixed by #156
Closed

Selecting Intellisense suggestion results in doubled content being typed #153

jasonwilliams opened this issue Nov 9, 2021 · 1 comment · Fixed by #156

Comments

@jasonwilliams
Copy link
Contributor

Raised from: styled-components/vscode-styled-components#325

@mjbvz do you have any idea where to look for debugging the below? I've been trawling through the typescript-styled-plugin code and don't see anything obvious. Do you have any tips on how to fix this?

It looks like it doesn't replace what's already there and only inserts instead. The issue though is we haven't changed anything in this plugin apart from maybe updated CSS lang server dependency.

Describe the bug (including copyable syntax)
I see this as a one solid issue, symptoms of which are being solved in other issues. This is a continuation of this styled-components/vscode-styled-components#219.
Namely, the Intellisense in styled-components code won't account for previously typed text when making suggestions and completions. I will describe it in several examples below.

  1. Start creating some pseudo styling like after, selection, etc.
    image
    After hitting ENTER you will get this
    image

  2. If you start typing some css, Intellisense box would pop-up, close it and continue typing again. Say, it was flex- before. After applying the suggested option, say, flow, you will get flex-flex-flow (so the previously typed text is not accounted).

This is happening to me since early versions (below 1.0) of the extension.

Expected behavior
The behavior should be identical with regular css files.

Build environment (please complete the following information):

@jasonwilliams
Copy link
Contributor Author

I've tested this behaviour in an old version of typescript-styled-plugin 9769232 and it still happens. So i don't think its a regression

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant