-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
Inconsistent cursor behaviour after evaluation of clojure code resulting in error #3331
Comments
The root of this issue is in https://github.com/nrepl/nrepl. CIDER side, this is what we see in
The The problem can be reproduced like so in nrepl by adding the following test to (deftest foo
(testing "Ensure server starts with minimal configuration"
(let [server (server/start-server)
^nrepl.transport.FnTransport
transport (connect :port (:port server))
client (client transport Long/MAX_VALUE)]
(is (= ["3"]
(-> (message client {:op "eval" :code "foo"})
combine-responses
(doto clojure.pprint/pprint)
:value)))))) ...which will print this:
The In a vanilla Clojure repl, line/column info is cleaner: So, getting this fixed would involve at least one of these:
All in all, this seems quite tricky to work on, for what appears to be a relatively minor bug? From OP, |
Expected behavior
Consistent behaviour of the cursor after evaluating an expression in the buffer that causes an error.
The behaviour should happen irrespective of if
cider-show-error-buffer
is set tot
ornil
(except whent
thenq
should be pressed to quit the error buffer)Actual behavior
Cursor inconsistent movement after evaluating an expression in the buffer that causes an error (incorrect clojure code)
Steps to reproduce the problem
Open a Clojure .clj file from a project which has a namespace definition:
|(foo)
blahblah
and the cursor jumps to the top of the namespaceIt is assumed that 1. and 2. would behave the same, the cursor jumping to the start of the calling expression (or not moving)
Behaviour 3 feels quite strange, I dont know what value is provided by the cursor jumping away (I appreciate this situation would not happen very often though)
Is there a way to customise the cursor movement on error? Or is it simply the way its been implemented?
Environment & Version information
CIDER version information
Lein / Clojure CLI version
Clojure CLI version 1.11.1.1252
Emacs version
Emacs 28
Operating system
Ubuntu 22.04
JDK distribution
The text was updated successfully, but these errors were encountered: