@@ -2995,15 +2995,19 @@ type as per `evil-type-p', and PROPERTIES is a property list. If
2995
2995
beg or end are inside a sequence of composed characters, adjust
2996
2996
the positions to be outside of this sequence."
2997
2997
(let ((beg (evil-normalize-position beg))
2998
- (end (evil-normalize-position end)))
2999
- (let ((comp (find-composition beg)))
3000
- (when (and (listp comp) (nth 2 comp)) ; valid composition
3001
- (setq beg (nth 0 comp))))
3002
- (let ((comp (find-composition end)))
3003
- (when (and (listp comp) (nth 2 comp))
3004
- (setq end (nth 1 comp))))
2998
+ (end (evil-normalize-position end))
2999
+ beg-out end-out)
3005
3000
(when (and (numberp beg) (numberp end))
3006
- (append (list (min beg end) (max beg end))
3001
+ (setq beg-out (min beg end))
3002
+ (setq end-out (max beg end))
3003
+ (let ((comp (find-composition beg-out)))
3004
+ ;; find-composition returns (FROM TO VALID-P)
3005
+ (when (and (listp comp) (nth 2 comp))
3006
+ (setq beg-out (nth 0 comp))))
3007
+ (let ((comp (find-composition end-out)))
3008
+ (when (and (listp comp) (nth 2 comp))
3009
+ (setq end-out (nth 1 comp))))
3010
+ (append (list beg-out end-out)
3007
3011
(when (evil-type-p type)
3008
3012
(list type))
3009
3013
properties))))
0 commit comments