Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word or line mouse selection reverts to character selection when dragging #682

Closed
lqueryvg opened this issue Dec 3, 2016 · 8 comments
Closed

Comments

@lqueryvg
Copy link

lqueryvg commented Dec 3, 2016

TMUX VERSION: git master (>2.3, 6749a30 = latest github version, as of 3rd December 2016)

PLATFORM: CentOS Linux release 7.2.1511 (Core)

MINIMAL TMUX CONFIG: set -g mouse on

TERM OUTSIDE TMUX: xterm-256color
TERM INSIDE TMUX: screen-256color

Steps to reproduce problem:

  1. Start tmux in terminal session
  2. echo "The Quick Brown Fox Jumps"
  3. Enter copy mode with Prefix '['
  4. Double click mouse button 1 over the o in Brown.
    Note: The word Brown should now be highlighted by tmux (good)
  5. While still holding down mouse button 1, drag the selection to the right over o in Fox.
    Note: Instead of Brown Fox being highlighted (good), you will see only own Fo highlighted (bad)

The same applies to line selection mode after triple-clicking when selecting lines.

E.g. if you have the text:

The Quick Brown Fox Jumps
Over The Lazy Dog

and you triple-click over the o in Brown, the whole first line is selected (good).
But if you drag the selection down to the y in Lazy you will see only
own Fox Jumps...y Dog selected, i.e. the right half of the first line and the left half of the second line (bad).

@mlgh
Copy link

mlgh commented Dec 4, 2016

@nicm, since this feature seems to be needed to others, would it be ok if I change #672 to include lineflag and wordflag functionality (by analogy to rectflag) that would be triggered by select-word and select-line?

@nicm
Copy link
Member

nicm commented Dec 7, 2016

I haven't had time to look but I don't think we need wordflag, it sounds like the problem is just that the selection start should be moved to the B?

@nicm
Copy link
Member

nicm commented Dec 7, 2016

Something like this: x.diff.txt

@mlgh
Copy link

mlgh commented Dec 7, 2016

@nicm, I can't see how this problem can be solved without introducing wordflag.
The behavior wanted here can be seen in any text editor/web browser: double click a word and now you select only on word boundaries. triple click - and you select on line boundaries.

@nicm
Copy link
Member

nicm commented Dec 7, 2016 via email

@dannydulai
Copy link

it's be really cool if these flags also worked for mouse dragging selection

@nicm
Copy link
Member

nicm commented Feb 17, 2017

I've put this in the TODO file.

@lock
Copy link

lock bot commented Feb 16, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants