bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38740: 28.0.50; cursor-sensor-mode error in post-command-hook


From: Federico Tedin
Subject: bug#38740: 28.0.50; cursor-sensor-mode error in post-command-hook
Date: Wed, 05 Feb 2020 21:24:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

> Evaluating next form in scratch buffer:
>
>     (with-help-window "TEST"
>       (set-buffer standard-output)
>       (cursor-sensor-mode 1)
>       (insert "here"))
>
> Results in error:
>
>     Error in post-command-hook (cursor-sensor--detect): (args-out-of-range 
> 354582)
>
> Looks like cursor-sensor uses scratch's window instead of "TEST" buffer 
> window.
>
> I do not remember getting such error in Emacs 26, 27

I found that `cursor-sensor--detect' reads the point position from the
buffer displayed in the selected window, and then tries to read text
properties in that position in the current buffer. In your example,
those two buffers are not the same, the buffer at `standard-output'
isn't being displayed yet. I'm attaching a short patch that checks for
this case.

- Fede

Attachment: cursor.patch
Description: patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]