In smartparens-strict-mode, when deleting or changing the whole line, if the block is unbalanced, the operation is a no-op, but the mechanics of evil-delete sets the starting point of the motion (the whole line) as the beginning of the line, and thus the unbalanced sexps get deindented.
Another fix would be to modify evil-sp--new-beginning to use the start of thecurrent sexp as the beginning of the motion. This is probably a bit smarter, as the current feature feels a bit hairy, though it works.
Without this, the following behaviour occurs: (| represents point)
(defun foo (bar)
(|let ((baz (+ bar 1)))
baz))
Hitting dd here would do nothing, but the line with the let would be deindented, same with cc. Similarly, doing the same at |baz)) would delete or change baz and deindent.
In smartparens-strict-mode, when deleting or changing the whole line, if the block is unbalanced, the operation is a no-op, but the mechanics of evil-delete sets the starting point of the motion (the whole line) as the beginning of the line, and thus the unbalanced sexps get deindented.
Another fix would be to modify evil-sp--new-beginning to use the start of thecurrent sexp as the beginning of the motion. This is probably a bit smarter, as the current feature feels a bit hairy, though it works.
Without this, the following behaviour occurs: (| represents point)
Hitting dd here would do nothing, but the line with the let would be deindented, same with cc. Similarly, doing the same at
|baz))
would delete or change baz and deindent.