Subject: bug#58608: 29.0.50; Nasty bug with pasting primary selection in term buffers

From: Phil Sainty <[email-masked]>
Date: Wed, 19 Oct 2022 12:10:10 +1300

On 2022-10-18 23:10, Phil Sainty wrote:
> 4. Using the mouse, select any small piece of text several
>    lines above the bottom of the term buffer (e.g. double-
>    click a word).
> 5. Move the mouse to the shell prompt at the end of the buffer
>    and middle click to paste that selected text as input.
> 6. Without moving the mouse, middle click again at the same
>    position.

In fact "Without moving the mouse" is irrelevant in step 6.
All that matters is where the mouse was when you middle-clicked
in step 5.  All middle clicks subsequent to step 5 have the same
(bad) effect regardless of the mouse position, pasting the same
unintended selection each time.

I presume that having an *active* selection at step 5 makes the
difference.

More testing confirms that the initial middle click in step 5
updates the selection with the text between the start of the
active selection and the position of the middle click.