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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Oct 2022 14:05:39 +0300

> Date: Wed, 19 Oct 2022 14:19:20 +1300
> From: Phil Sainty <[email-masked]>
> 
> Looking at the docstring for `deactivate-mark' told me about
> `select-active-regions'.  I don't know whether this is the correct
> solution, but I can confirm that this change to `term-mouse-paste'
> appears (after only cursory testing) to fix the bug:
> 
> -  (term-send-raw-string (gui-get-primary-selection)))
> +  (let ((select-active-regions nil))
> +    (term-send-raw-string (gui-get-primary-selection))))

I think it could be important to understand why select-active-regions
causes this problem in your case.