Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language server cannot correctly report diagnostics for sources containing multibyte characters #1721

Open
kyoh86 opened this issue May 9, 2024 · 0 comments

Comments

@kyoh86
Copy link

kyoh86 commented May 9, 2024

Bug description

If a source contains multi-byte characters, Prisma Language Server cannot report diagnostics with correct position.

e.g.

// 馃搮馃搮馃搮馃搮馃搮
enum Day {
  Monday
  Tuesday
  Wednesday
  Thursday,
  Friday
  Saturday
  Sunday
}

It must be reported that a problem is in the line Thursday, that is not an enum value definition.
But the problem is reported in a position of Friday.

While you put a charater 馃搮 more, the reported position also shift.

How to reproduce

  • Write prisma schema
  • Make it invalid
  • Put multi-byte character before the invalid line.

Expected behavior

The problem is reported in correct position.

Prisma information

// 馃搮馃搮馃搮馃搮馃搮
enum Day {
  Monday
  Tuesday
  Wednesday
  Thursday,
  Friday
  Saturday
  Sunday
}

Environment & setup

  • OS: Arch Linux
  • Editor: Neovim
  • Editor version: v0.10.0-dev-344906a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant