So you want to only enter copy mode when the program has already claimed the mouse? Or am I reading this wrong?
On Sun, Sep 30, 2012 at 10:05:00PM +0400, Sergey Naumov wrote: > 2012/9/25 Nicholas Marriott <nicholas.marri...@gmail.com>: > > You can tell by checking whether the program has itself enabled the > > mouse (wp->base.mode & ALL_MOUSE_MODES). > > Yes, this works like a charm (at least in mc and mcedit on xterm): > > sknaumov@sknaumov-VirtualBox:~/tmux.compile$ git diff HEAD > diff --git a/input-keys.c b/input-keys.c > index 2b30d4b..3b049e0 100644 > --- a/input-keys.c > +++ b/input-keys.c > @@ -223,7 +223,8 @@ input_mouse(struct window_pane *wp, struct mouse_event *m) > } > > if ((m->b & 3) != 1 && > - options_get_number(&wp->window->options, "mode-mouse") == 1) { > + options_get_number(&wp->window->options, "mode-mouse") == 1 && > + (wp->base.mode & ALL_MOUSE_MODES)) { > if (window_pane_set_mode(wp, &window_copy_mode) == 0) { > window_copy_init_from_pane(wp); > if (wp->mode->mouse != NULL) > > >> Regardless of this feature (which is now in git HEAD) your logic is > >> flawed regarding the circumstances of this -- what if I want to scroll > >> through some program's output, for instance? > >> > >> -- Thomas Adam > > I think that in most cases programs that enable mouse support > scrolling too, but it could be easily done as an option, for example > let's add one more mode: off, copy-mode, on, always-on. > Or, to preserve backward compatibility: off, copy-mode, terminal, on. > > Sergey Naumov. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users