aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2016-03-21 18:26:10 +0800
committerLeo Liu2016-03-21 18:26:40 +0800
commit76ef52267cf887e3e1aa6d25b3b16dd0601dd459 (patch)
tree58a41a48cc98b072571c5c8feb61507ba8e16875
parent8a35f83c6c2ce602ee4d1e54c64067c851a2a43f (diff)
downloademacs-76ef52267cf887e3e1aa6d25b3b16dd0601dd459.tar.gz
emacs-76ef52267cf887e3e1aa6d25b3b16dd0601dd459.zip
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.
-rw-r--r--lisp/emacs-lisp/cursor-sensor.el2
1 files changed, 1 insertions, 1 deletions
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 @@
113 ;; non-sticky on both ends, but that means get-pos-property might 113 ;; non-sticky on both ends, but that means get-pos-property might
114 ;; never see it. 114 ;; never see it.
115 (new (or (get-char-property point 'cursor-sensor-functions) 115 (new (or (get-char-property point 'cursor-sensor-functions)
116 (unless (= point 1) 116 (unless (bobp)
117 (get-char-property (1- point) 'cursor-sensor-functions)))) 117 (get-char-property (1- point) 'cursor-sensor-functions))))
118 (old (window-parameter window 'cursor-sensor--last-state)) 118 (old (window-parameter window 'cursor-sensor--last-state))
119 (oldposmark (car old)) 119 (oldposmark (car old))