Hi,
maybe you can make use of some notes of how mouse mode could work, I
never got to the code part though.

      * use a timer to time-out/ close the copy-mode after release of
        mouse button
      * remember the last active selection in copy mode per pane, even
        after closing it down; that would allow to extend the selection
        with the third mouse button

the time-out could be very small, in a suitable range to make
double-click or triple-click feasible for tmux to detect.

it might have been possible to implement double-click with-out a
time-out to keep copy-mode open *except* if you want to select some text
which is scrolled up in the copy history ;-)

the way it would work is like this:

(scenario A)
first mouse down -> enter copy mode, start timer. wait for the double/
triple click
dragging -> open mouse selection, extend selection either by character
or word/line boundary
timer expires ->  copy the selection and close down copy mode

(scenario B)
mouse wheel scroll -> enter copy mode
first mouse down -> start timer, wait for drag/double/tripe click
(... as above)

(scenario C)
right click -> restore previous selection, extend old selection either
at start or end to mouse position, start timer, wait for
drag/double/triple RMB
timer expires -> copy the new selection (or replace the top most
selection on the stack with the new one if the top of stack is equal to
the old selection)

(scenario D)
mouse wheel scroll -> enter copy mode
(could be considered if the old selection should be unconditionally
restored/ high-lighted on screen, might be distracting but would be a
bit closer to real terminal emulator maybe?)
right click -> extend old selection either at start or end to mouse
position, start timer, wait for drag/double/triple RMB
(... as C)

Thanks!


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to