smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

set :end correctly when no next sexp in sp-get-hybrid-sexp

Open edam opened this issue 6 years ago • 2 comments

This seems to work for me.

The logic is that when sp-forward-sexp (in sp--get-hybrid-sexp-end) returns a next sexp whose :beg is before point, it must be because there are no more and it returned the parent sexp. And so, when :beg < point, either the end of the line or the end of the parent sexp, whichever is sooner.

edam avatar Apr 29 '19 13:04 edam

Fixes #974.

edam avatar Apr 29 '19 13:04 edam

Tests now pass as well as they do without this patch! (i.e., diff of ert-runner is identical, with and without these changes).

edam avatar Jul 15 '22 15:07 edam