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

paredit/slurp-forward-fully throws when slurping into an empty seq that is last item with a seq #335

Open
lread opened this issue Feb 5, 2025 · 0 comments

Comments

@lread
Copy link
Collaborator

lread commented Feb 5, 2025

Version
1.1.49

Platform
All

Symptom
paredit/slurp-forward-fully throws when slurping into an empty seq that is the last item within a seq

Reproduction

(def zloc (-> "[[1 []] 3 4]"
              z/of-string
              z/down
              z/down
              z/rightmost))

;; double-check we are where we think we are
(z/string zloc)
;; => "[]"

(-> zloc
    pe/slurp-forward-fully
    z/root-string)

Actual behavior

;; => Execution error (NullPointerException) at rewrite-clj.paredit/slurp-forward-fully (paredit.cljc:265).
;;    Cannot invoke "Object.getClass()" because "x" is null

Expected behavior

[[1 [3 4]]]

(and we should be located at node 3)

Diagnosis
Working on it.

Action
Working on it.

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