From 76ef52267cf887e3e1aa6d25b3b16dd0601dd459 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 21 Mar 2016 18:26:10 +0800 Subject: [PATCH] Fix (args-out-of-range 1) error in cursor-sensor--detect * 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index ac063d4896a..f1ab82ecc4a 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el @@ -113,7 +113,7 @@ ;; 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)) -- 2.39.2