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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Evaluate current form/selection inline..." outputs wrong line and column on error #354

Closed
sauvala opened this issue Sep 27, 2019 · 2 comments
Labels
bug Something isn't working evaluation good first issue Good for newcomers

Comments

@sauvala
Copy link
Contributor

sauvala commented Sep 27, 2019

Hey,

I noticed a difference on the line and column numbers when evaluating erroneous code with different ways. When I ran code

(ns testing)

(foo 1 2)

with Calva: Load (evaluate) current file and it's dependencies, I receive the following error message to the output: Evaluating file: testing.clj Syntax error compiling at (src/main/clojure/testing.clj:3:1). Unable to resolve symbol: foo in this context. Here the line and column numbers looks correct.

But when I ran only the (foo 1 2) form with Calva: Evaluate current form/selection inline and print to output I receive: Error: Syntax error compiling at (src/main/clojure/testing.clj:2:0). Unable to resolve symbol: foo in this context where the line and column number differs.

@PEZ PEZ added bug Something isn't working evaluation good first issue Good for newcomers labels Sep 28, 2019
@PEZ
Copy link
Collaborator

PEZ commented Sep 28, 2019

Seems to be an off by one, issue. The VS Code API reports line and column numbers zero based, so that's probably what's going on. We need to inc them once.

PEZ added a commit that referenced this issue Sep 29, 2019
@PEZ
Copy link
Collaborator

PEZ commented Sep 29, 2019

Fixed! Please reopen if I am wrong.

@PEZ PEZ closed this as completed Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working evaluation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants