Calva: "Evaluate current form/selection inline..." outputs wrong line and column on error

Created on 28 Sep 2019  路  2Comments  路  Source: BetterThanTomorrow/calva

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.

bug evaluation good first issue

All 2 comments

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.

Fixed! Please reopen if I am wrong.

Was this page helpful?
0 / 5 - 0 ratings