actarian / vscode-glsl-canvas

Live WebGL preview of GLSL shaders
MIT License
335 stars 25 forks source link

Don't lose editor focus when the user switches to a non-glsl editor tab #56

Closed jaredly closed 3 years ago

jaredly commented 3 years ago

This is a little bugfix, lmk if you want the behavior to be different or behind a flag or something.

Previous behavior: when the user switches from a .glsl file to a non-.glsl file and starts editing, the glslCanvas reverts to the "no glsl selected" blank screen.

New behavior: when editing non .glsl files, the last-focused .glsl document is retained as the source for glslCanvas

actarian commented 3 years ago

@jaredly thank you very much!