Skip to content

Semantic highlighting fails when scrolling below a certain position #4407

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

Closed
jules-contact opened this issue May 21, 2024 · 10 comments · Fixed by volarjs/volar.js#271
Closed

Comments

@jules-contact
Copy link

jules-contact commented May 21, 2024

I have a weird comportement when i have a tag in the same file

Enregistrement.de.l.ecran.mp4

Repro :

<script setup lang="ts">
const bordered = defineProps({
  tag: {
    type: String,
    default: 'div',
  },
  background: {
    type: String,
  },
})
</script>

<template>
  <component
    :is="bordered.tag"
  >
    <slot />
  </component>
</template>
@kermanx
Copy link
Collaborator

kermanx commented Aug 14, 2024

Sorry, I can't reproduce this on my machine. Does this problem still happen in the latest version?

@MetRonnie
Copy link

MetRonnie commented Aug 14, 2024

Yes I still get this on v2.0.10 of the VSCode extension

Version: 1.92.1 (system setup)
Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Date: 2024-08-07T20:16:39.455Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

@kermanx
Copy link
Collaborator

kermanx commented Aug 15, 2024

Yes I still get this on v2.0.10 of the VSCode extension

The latest version is about v2.0.28.

@MetRonnie
Copy link

When I checked yesterday v2.0.10 was the latest available. This morning it suddenly updated to v2.0.28. The bug doesn't seem to be present anymore 👍

@kermanx kermanx closed this as completed Aug 15, 2024
@MetRonnie
Copy link

MetRonnie commented Aug 15, 2024

Sorry I spoke too soon! Still present on v2.0.28 after I opened VSCode the next time.

It seems to lose the intellisense highlighting and fall back on the standard syntax highlighting randomly while scrolling.

Additional info:

image

@kermanx kermanx reopened this Aug 15, 2024
@kermanx
Copy link
Collaborator

kermanx commented Aug 15, 2024

I've just managed to reproduce this for only one time. Does the sematic highlighting come back after waiting for a while?

@MetRonnie
Copy link

MetRonnie commented Aug 15, 2024

Semantic highlighting goes away when I scroll down and comes back when I scroll back up. It doesn't come back if I scroll down and wait for 10s. It might need a SFC file that is at least 150 lines long to reproduce?

@kermanx
Copy link
Collaborator

kermanx commented Aug 15, 2024

Possibly related to #4464 🤔 However, in that issue, there is no <component>

@MetRonnie
Copy link

Looks like a duplicate to me (although I am not author of either issue)

@KazariEX KazariEX changed the title Color is broken when <component> is in the same file Semantic highlighting fails when scrolling below a certain position Jan 18, 2025
@KazariEX KazariEX marked this as a duplicate of #4464 Jan 18, 2025
@KazariEX KazariEX marked this as a duplicate of #5249 Mar 4, 2025
@youdemomo
Copy link

The cause of the code color loss is that the class name of the box that wraps the code changes as the page scrolls. Hope the official can pay attention to this problem, many vscode color themes will be affected.

I found this problem in the developer tools of vscode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants