1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00

* lisp/emacs-lisp/cursor-sensor.el: Fix sensor behavior with overlays

(cursor-sensor--detect): Also consult overlay properties when checking
to see if we just moved inside the same "element" as opposed to
changing from one to another of the same type.
This commit is contained in:
Stefan Monnier 2019-03-08 17:20:58 -05:00
parent bec7fb2988
commit 76fdae8549

View file

@ -160,7 +160,7 @@ By convention, this is a list of symbols where each symbol stands for the
(setcdr old nil)) (setcdr old nil))
(if (or (and (null new) (null (cdr old))) (if (or (and (null new) (null (cdr old)))
(and (eq new (cdr old)) (and (eq new (cdr old))
(eq (next-single-property-change (eq (next-single-char-property-change
start 'cursor-sensor-functions nil end) start 'cursor-sensor-functions nil end)
end))) end)))
;; Clearly nothing to do. ;; Clearly nothing to do.
@ -172,7 +172,7 @@ By convention, this is a list of symbols where each symbol stands for the
(let ((pos start) (let ((pos start)
(missing nil)) (missing nil))
(while (< pos end) (while (< pos end)
(setq pos (next-single-property-change (setq pos (next-single-char-property-change
pos 'cursor-sensor-functions pos 'cursor-sensor-functions
nil end)) nil end))
(unless (memq f (get-char-property (unless (memq f (get-char-property