Template coloring breaks when the same file is open in multiple tabs and scrolled to different positions #5013
Labels
bug
Something isn't working
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
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.multi-tab-colors-broken.mp4
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.The text was updated successfully, but these errors were encountered: