Skip to content

Commit

Permalink
Fix barfing with < on closing paren with preceding form (#114)
Browse files Browse the repository at this point in the history
Fixes #105
  • Loading branch information
tomdl89 authored Mar 8, 2024
1 parent e8ccec3 commit aa19ed6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion evil-cleverparens-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,12 @@ golf foxtrot deltahotel india"))
(evil-cp-test-buffer
"alpha bravo (cha[r]lie) delta echo"
("<")
"alpha bravo (cha[r]lie) delta echo")))
"alpha bravo (cha[r]lie) delta echo"))
(ert-info ("Stay on closing paren when barfing from it")
(evil-cp-test-buffer
"(alpha)\n(bravo charlie delta[)]"
("<")
"(alpha)\n(bravo charlie[)] delta")))

(ert-deftest evil-cp->-test ()
(ert-info ("Can do regular forward slurp")
Expand Down
3 changes: 2 additions & 1 deletion evil-cleverparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,8 @@ regular forward-barf."
((evil-cp--looking-at-any-closing-p)
(when (not (sp-point-in-empty-sexp))
(when (not (evil-cp--singleton-list-p))
(sp-forward-barf-sexp)
(let (sp-barf-move-point-with-delimiter) ; It's not helpful here
(sp-forward-barf-sexp))
(sp-backward-sexp)
(evil-cp-previous-closing))))
((evil-cp--singleton-list-p)
Expand Down

0 comments on commit aa19ed6

Please sign in to comment.