drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
272 stars 23 forks source link

symex-delete sometimes deletes one character too many #143

Closed jezcope closed 1 month ago

jezcope commented 3 months ago

I've noticed that in the following situation, symex-delete deletes an extra character at the end of a line:

(list thing1
      <thing2>) ;; "<>" indicates symex selected expression

Steps to reproduce: with the buffer as above, enter symex mode and press x (symex-delete)

Expected result:

(list <thing1>)

Actual result:

(list <thing>)

Note the missing 1 at the end of thing1.

Stepping through with edebug, it seems like the problem is caused by evil-find-char in symex-lisp--delete at line 72 which causes the cursor to move one character to the left: maybe a save-excursion is needed here?

jezcope commented 3 months ago

Interestingly this still happens on the 2.0-integration branch.