Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Timer does not work on auxiliary editor windows #240

Closed
Katsute opened this issue Nov 9, 2023 · 4 comments · Fixed by #242
Closed

Timer does not work on auxiliary editor windows #240

Katsute opened this issue Nov 9, 2023 · 4 comments · Fixed by #242

Comments

@Katsute
Copy link
Member

Katsute commented Nov 9, 2023

There is an issue in

Background/src/extension.ts

Lines 455 to 461 in ce72a33

for(let i = 0; i < len; i++){
bk_editor_image.appendChild(document.createTextNode(\`
.part.editor :not(.split-view-container) .split-view-container > .split-view-view:nth-child(\${len}n+\${i+1}) > .editor-group-container::after {
background-image: url("\${editorBackgrounds[iEditorBackgrounds[i]]}");
}
\`));
};

where only the last xn+x is kept, the rest are missing for the auxiliary window only

@Katsute
Copy link
Member Author

Katsute commented Nov 9, 2023

Issue is caused by this line:

for(let i = 0; i < len; i++){

Auxiliary window starts the loop at len -1 despite the for loop mandating that the starting value is 0

Possibly caused by a race condition between main and aux window using the same memory? Not true, caused by VSCode

Shuffle likely shares this issue

@Katsute
Copy link
Member Author

Katsute commented Nov 9, 2023

Possible fix would require keeping separate loops for main and aux windows, differentiating based on the existence of #workbench\\.parts\\.sidebar (see changed lines on #237) Does not work

@Katsute
Copy link
Member Author

Katsute commented Nov 9, 2023

This could possibly be fixed by forcing the for loop to run async. Does not work

Issue is caused by an inherent flaw in how js operates, both the main and aux window are sharing the same function variables Not true, this issue is caused by VSCode!!!!

@Katsute
Copy link
Member Author

Katsute commented Nov 9, 2023

!!! Issue is caused by a race condition with appendChild overwriting existing content in conjunction with defective VSCode main/aux window code

@ghost ghost locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant