For me using copy-pipe works for tmux 2.9a which is the oldest I have.

On Thursday, September 3, 2020 at 10:18:43 AM UTC-7 [email protected] 
wrote:

> I just tried with your configuration, replacing both occurrences of 
> copy-pipe-and-cancel by copy-pipe and it works with the exact use case that 
> you described (mouse selection). I'm using 3.2 though.
>
> Things you can check:
>
>    - Make sure that you replaced the MouseDragEnd1Pane binding to 
>    copy-pipe.
>    - Make sure that you reload the tmux configuration. If in doubt, exit 
>    tmux and run `tmux kill-server`,  then start a new session.
>    
>
> If that still does work, maybe try upgrading tmux to 3.2 but I doubt that 
> this is the root cause.
>
> *Stéphane Gleizes*
> [image: LinkedIn] <https://www.linkedin.com/in/stephane-gleizes-4924b899/>
> On Sep 3 2020, at 5:49 pm, Peng Yu <[email protected]> wrote:
>
> I used these lines. But they don't help.
>
> When I type ctrl-a [ then ctrl-b, then use my mouse to highlight a
> text region, the cursor will still be reset to the very bottom.
>
> I use tmux 3.1b.
>
> Could you try my configure file to see what is wrong? Thanks.
>
> Strange, that's not expected behavior.
>
> I have the following binding and it works like a charm (tmux 3.2):
> # Copy the current selection to a new buffer or start one if none is
> active.
> bind -T copy-mode 'Space' {
> if -F '#{||:#{selection_active},#{search_present}}' {
> send -X copy-pipe
> } {
> send -X begin-selection
> }
> }
> If you are referring to mouse support, this is what I'm using:
> # Avoid cancelling copy-mode if the pane history has been scrolled.
> bind -T copy-mode 'MouseDragEnd1Pane' {
> if -F "#{scroll_position}" {
> send -X copy-pipe
> } {
> send -X copy-pipe-and-cancel
> }
> }
>
>
> --
> Regards,
> Peng
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/5b0906cb-3cb8-4fd5-9d52-8d8e6275128an%40googlegroups.com.

Reply via email to