]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix (args-out-of-range 1) error in cursor-sensor--detect
authorLeo Liu <sdl.web@gmail.com>
Mon, 21 Mar 2016 10:26:10 +0000 (18:26 +0800)
committerLeo Liu <sdl.web@gmail.com>
Mon, 21 Mar 2016 10:26:40 +0000 (18:26 +0800)
* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Don't
  hard-code (point-min) as 1 which fails in narrowed buffers.

lisp/emacs-lisp/cursor-sensor.el

index ac063d4896ad13fe720707c4d7d37044b99a2133..f1ab82ecc4a2dde0934bdb16e590fc542f46b230 100644 (file)
            ;; non-sticky on both ends, but that means get-pos-property might
            ;; never see it.
            (new (or (get-char-property point 'cursor-sensor-functions)
-                    (unless (= point 1)
+                    (unless (bobp)
                       (get-char-property (1- point) 'cursor-sensor-functions))))
            (old (window-parameter window 'cursor-sensor--last-state))
            (oldposmark (car old))