language-tools
language-tools copied to clipboard
VSCode extension bug with Chinese comment
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
- OS:
- Database:
- Node.js version:
Prisma Version
4.7.0
Have the same problem. Not only Chinese characters in comments cause the highlight misposition, but any non-latin symbols! To reproduce just try to paste into comments 'абвгд' There is a problem with errors highlighting too. And when have a lot of such comments debugging is very awful.
Prisma version 4.7.1

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 v4.7.1, VSCode: v1.74.0
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?
Can anyone says when this would be done?
No.
Is there any plan to close this issue?
Yes, when there is capacity. PRs welcome as well, happy to review.