Closed Hippo0o closed 2 years ago
I can confirm this issue too Here is example:
This could be related to the fact that at the same time my virtual machine started using 90% of the CPU Especially when I open two VSCode instances with my projects (the add-on is active all the time). When I disable the add-on everything works fine
I remember a similar case with CPU with infinity loop here -> https://github.com/pucelle/vscode-css-navigation/issues/46#issuecomment-743178853.
Will fix it soon.
v1.13.3 released, fixed the "deleting one more char" issue.
I'm still debugging the "90% CPU" issue, but it's very hard, kanlukasz, can you provide more details about the issue, like:
Sorry for late reply.
I'm still debugging the "90% CPU" issue, but it's very hard
Yes, it will be very difficult or completely impossible as there are many dependencies along the way that could be the cause, incl. a virtual machine in the form of WSL2
1. When it appears, when starting the workspace? or when doing a html or css completion?
This happened when I was working in one workspace and opened an extra separate vscode window with another workspace (with a different project)
2. Does downgrade plugin version solve the issue? if so, which latest version is OK?
It is not possible to catch this issue at the moment so it is difficult to answer this question
Conclusion: I think that due to the lack of sufficient information on my part (which I am not able to provide at the moment) it will probably be better to close this issue. If this situation repeats, I will refer to this information in a new ticket
@kanlukasz, Sure, thanks for your commands, Never mind to reopen this issue again.
in https://github.com/pucelle/vscode-css-navigation/blob/6f7d3a8a9daf116e4b91ff60f597a23ac9e4f3b8/server/src/server.ts#L301 and potentially https://github.com/pucelle/vscode-css-navigation/blob/6f7d3a8a9daf116e4b91ff60f597a23ac9e4f3b8/server/src/server.ts#L316 because the length of
selector.raw.length
includes the . or # but the inserted string doesn't have these chars, there is 1 extra char removed/replaced at the end.selector.raw.length
-->selector.label.length
that worked for me.