lispyville-delete will unbalance ending parens after a comment
sooheon opened this issue · comments
from
(foo
;; bar
|baz)
dd
gives me
(foo
;; bar)
I didn't notice this before, is this a recent change?
Edit: Actually this has always been a problem. There is also another problem with comments in a selection. I'll fix this when I get the chance.
dd
specifically is fixed now. I should maybe also prevent closing delimiters being pulled into comments if the user tries to delete the following:
(a
;; ~b
c)|
Here's a similar problem with comments that I just ran into. Case 1 is fine, but Case 2 gets you into a situation with unbalanced parens
;; CASE 1
(let ((a 1)
(b 1))
(+ a b))
;; dd on first line
(( (b 1))
(+ a b))
;; CASE 2
(let (;; (a 1)
(b 1))
(+ a b))
;; dd on first line
( (b 1))
(+ a b))
Thanks for reporting. I made a pull request to lispy to fix the issue.
With the latest commit of lispy, this should no longer be an issue for the previously mentioned case.