]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cursor-sensor.el: Fix sensor behavior with overlays
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Mar 2019 22:20:58 +0000 (17:20 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Mar 2019 22:20:58 +0000 (17:20 -0500)
(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.

lisp/emacs-lisp/cursor-sensor.el

index a21d78998ac41a5430846b057d4367b04af97f31..66b940f7fb3052715d5e7d7a6e3a2680919e6c53 100644 (file)
@@ -160,7 +160,7 @@ By convention, this is a list of symbols where each symbol stands for the
         (setcdr old nil))
       (if (or (and (null new) (null (cdr old)))
               (and (eq new (cdr old))
-                   (eq (next-single-property-change
+                   (eq (next-single-char-property-change
                         start 'cursor-sensor-functions nil end)
                        end)))
           ;; 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)
                         (missing nil))
                     (while (< pos end)
-                      (setq pos (next-single-property-change
+                      (setq pos (next-single-char-property-change
                                  pos 'cursor-sensor-functions
                                  nil end))
                       (unless (memq f (get-char-property