evil-cleverparens icon indicating copy to clipboard operation
evil-cleverparens copied to clipboard

evil-cp-delete-line corner case

Open sooheon opened this issue 10 years ago • 1 comments

Given:

(spacemacs|define-transient-state sooheon-paste
  "\n[%
[_M-n_/_M-p_] cycles through yanked text, [_p_/_P_] pastes the same text above or
below. Anything."
  :bindings
  ("M-n" evil-paste-pop))

With cursor anywhere on line 4, D will return something like this:

(spacemacs|define-transient-state sooheon-paste
  "\n[%
[_M-n_/_M-p_] cycles through yanked text, [_p_/_P_] pastes the same text above or
M-n" evil-paste-pop))

with unbalanced parens. The snippet above is not valid elisp (I was looking for minimum reproducible fragment), but syntactically it's correct. The problem is that instead of deleting only to the end of the current string, it joins all the way to the start of the next string, deleting everything inbetween. I think the problem has something to with the weird characters in the string, as deleting the middle line of the multiline string makes this unreproducible.

sooheon avatar Mar 12 '16 07:03 sooheon

Yeah I can reproduce the issue, but unfortunately I'm really busy right now, so trying to find a fix may take some time.

luxbock avatar Mar 12 '16 14:03 luxbock