Subject: Re: bug#65382: 27.1; Sometimes two cursors are unexpectedly shown

From: Eli Zaretskii <[email-masked]>
Date: Sat, 19 Aug 2023 15:46:45 +0300

> From: Markus Triska <[email-masked]>
> Date: Sat, 19 Aug 2023 14:11:57 +0200
> 
> 
> To reproduce this issue, please save the forms below in the file
> duplicate_cursor.el, and then open the file in Emacs with:
> 
>     $ emacs -Q duplicate_cursor.el
> 
> Next, evaluate the forms in the file with:
> 
>     M-x eval-buffer RET
> 
> The function `duplicate-cursor' is now defined. Invoke this function
> with:
> 
>     M-x duplicate-cursor RET
> 
> A new buffer called duplicated-cursor is now selected. So far,
> everything works as intended, and a single cursor is shown in the
> penultimate line of the window, as expected, at the position of point.
> 
> Now the issue: Invoke `duplicate-cursor' again, i.e., please do again:
> 
>     M-x duplicate-cursor RET
> 
> Unexpectedly, two cursors now appear in the buffer duplicated-cursor:
> One, as before, in the penultimate line of the window, and a second
> cursor in the last line of the window. This second cursor is unexpected
> and does not appear at the position of point, but one line below it.

I cannot reproduce this.  I see just one cursor.

It could be that some or all of the magic constants you use need to be
adjusted for other systems due to slightly different sizes of the
default fonts and/or the initial frames.