Open a single file, a large SFC, in two tabs side-by-side. I often do this so I can have one tab working on the template and another to work on the script in a large component.
What is expected?
Coloring of the template works in both tabs
What is actually happening?
When scrolling the tab that I'm using for the <script>, the coloring on the template tab breaks. Only once I start scrolling the tab with the <template> in view does the coloring get restored. Sometimes even just clicking on the other tab will break the coloring as well, even without scrolling.
This seems to be because the language server responses are getting applied to all open copies of a file, but there's some kind of optimization to prevent coloring the <template> when it isn't scrolled into view.
The coloring of the <script> is unaffected and always works.
The same thing can even happen to different parts of the template when both tabs have different parts of the template in view. E.g. one tab viewing the top of the template, the other tab viewing the bottom.
Vue - Official extension or vue-tsc version
2.1.10
VSCode version
1.95.3
Vue version
3.5.13
TypeScript version
5.6.3
System Info
package.json dependencies
Steps to reproduce
Open a single file, a large SFC, in two tabs side-by-side. I often do this so I can have one tab working on the template and another to work on the script in a large component.
What is expected?
Coloring of the template works in both tabs
What is actually happening?
When scrolling the tab that I'm using for the
<script>
, the coloring on the template tab breaks. Only once I start scrolling the tab with the<template>
in view does the coloring get restored. Sometimes even just clicking on the other tab will break the coloring as well, even without scrolling.This seems to be because the language server responses are getting applied to all open copies of a file, but there's some kind of optimization to prevent coloring the
<template>
when it isn't scrolled into view.The coloring of the
<script>
is unaffected and always works.https://github.com/user-attachments/assets/b3a4241b-88d9-415e-a21e-bdc50f3a6d69
Link to minimal reproduction
No response
Any additional comments?
The same thing can even happen to different parts of the
template
when both tabs have different parts of the template in view. E.g. one tab viewing the top of the template, the other tab viewing the bottom.