-
Notifications
You must be signed in to change notification settings - Fork 40
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
Spans and positions get shifted out of sync when schema includes multibyte characters #1308
Comments
Have the same problem. Not only Chinese characters in comments cause the highlight misposition, but any non-latin symbols! |
Yep, can confirm! Seems to be something about how we handle utf-16 vs utf-8 characters and the conversion between how we represent Positions here vs in Engines Running on: Prisma Schema for ref generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}
model User {
id Int @id @default(autoincrement())
email String @unique
posts Post[]
}
/// абвгд
model Post {
id Int @id @default(autoincrement())
author User @relation(fields: [authorId], references: [id])
authorId Int
} |
Can anyone says when this would be done? Is there any plan to close this issue? |
No.
Yes, when there is capacity. PRs welcome as well, happy to review. |
This also breaks quick fix, for example: quick fix of automatically add @@index will insert into the wrong line. |
Cheers @Huliiiiii, am able to confirm that too, gonna take a look Screen.Recording.2024-06-13.at.02.12.24.mov |
Rename also breaks Screen.Recording.2024-06-13.at.02.19.54.mov |
Bug description
when there are any Chinese characters in the comment , the prompt message will be displaced.
pls check the picture:
and you delete the Chinese characters, everything works fine:
How to reproduce
Expected behavior
the prompt messages are displaced normally
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: