expez / evil-smartparens

Evil integration for Smartparens
GNU General Public License v3.0
134 stars 17 forks source link

evil-sp-delete-line not playing well with one-line comments #16

Closed juliapath closed 9 years ago

juliapath commented 9 years ago

How to reproduce

  1. In any programming language mode make a pair of parenthesis with the body spanning multiple lines.
  2. Make a one-line comment inside of the body
  3. Place the cursor before the comment and press "D"
(|+ ;;This is a comment
  1
  1)

Expected result

The region from the point to the end of the line is deleted

(|
  1
  1)

Actual result

The region from the point to the end of the s-expression is deleted.

(|)

Further thoughts

The results seem to be consistent across programming languages (I have tried Scheme, Emacs-Lisp, Python and Java). Multiline-comments like /* */ are handled just fine, even if they only span one line.

expez commented 9 years ago

Thanks!

I really appreciate the effort you put into your bugreports :+1:

juliapath commented 9 years ago

Thank you.

Maybe I'm missing something but in your last commit you have just pushed a test. Could you have forgotten to add the actual fix?

expez commented 9 years ago

Bah, so it seems. It's been a long day of coding. I've force-pushed the missing file :)