Subject: bug#50256: thing-at-mouse

From: Juri Linkov <[email-masked]>
Date: Fri, 03 Sep 2021 11:10:15 +0300

>> Actually, whereas it fixes the reported issue,
>> it breaks everything else: moving point up and down
>> always jumps to the fixed column like goal-column,
>> selecting a completion from the Completions buffer
>> always says "No completion here", 'C-c C-c' in diff-mode
>> jumps to the wrong hunk, etc.
>
> Is the below better?
>
> @@ -2199,7 +2199,8 @@ DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p,
> -  else if (w == XWINDOW (selected_window))
> +  else if (w == XWINDOW (selected_window)
> +	   && XBUFFER (w->contents) == current_buffer)

Thanks, now it fixes the reported issue while not breaking other things.