Skip to content

Errors are highlighted in wrong parts of lines indented with tab. #3459

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
torgeirsh opened this issue Jan 22, 2023 · 3 comments
Closed

Errors are highlighted in wrong parts of lines indented with tab. #3459

torgeirsh opened this issue Jan 22, 2023 · 3 comments
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@torgeirsh
Copy link

Your environment

Which OS do you use: Windows

Steps to reproduce

Cause an error in a line indented with tab:

vscode-error-highlighting

Expected behaviour

The problematic part of the line is highlighted.

Actual behaviour

The highlight starts 7 characters too far to the right, so I guess the tab character is counted as one character when the highlight position is calculated, whereas HLS seems to expand it to 8 characters. This also affects type info popups, etc.

Include debug information

Range: 259:21-259:32
Source: typecheck
Severity: DsError
Message: Variable not in scope: nonExisting

@fendor
Copy link
Collaborator

fendor commented Jan 22, 2023

Hi, thank you for your bug report!

I can locally reproduce, and will move the issue to the main HLS repo.
GHC behaves correctly, btw.

@fendor fendor transferred this issue from haskell/vscode-haskell Jan 22, 2023
@fendor fendor added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. and removed status: needs triage labels Jan 31, 2023
@LiraOnGithub
Copy link

Seems to be the same problem as in #1987

@michaelpj
Copy link
Collaborator

Closing as dupe

@michaelpj michaelpj closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants