diff options
author | Leo Liu <sdl.web@gmail.com> | 2016-03-21 18:26:10 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2016-03-21 18:26:40 +0800 |
commit | 76ef52267cf887e3e1aa6d25b3b16dd0601dd459 (patch) | |
tree | 58a41a48cc98b072571c5c8feb61507ba8e16875 /lisp/emacs-lisp/cursor-sensor.el | |
parent | 8a35f83c6c2ce602ee4d1e54c64067c851a2a43f (diff) | |
download | emacs-76ef52267cf887e3e1aa6d25b3b16dd0601dd459.tar.gz emacs-76ef52267cf887e3e1aa6d25b3b16dd0601dd459.tar.bz2 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.
Diffstat (limited to 'lisp/emacs-lisp/cursor-sensor.el')
-rw-r--r-- | lisp/emacs-lisp/cursor-sensor.el | 2 |
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 @@ ;; 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)) |