Actually, I've reverted this. When I use "mode-mouse on" with
applications inside that claim the mouse (easiest example is another
tmux server with mouse-select-pane and the window split) it works fine.

Do I misunderstand what you are trying to fix?


On Tue, Nov 27, 2012 at 02:23:03PM +0000, Nicholas Marriott wrote:
> Applied, thnaks.
> 
> 
> 
> On Fri, Oct 26, 2012 at 08:09:17PM +0400, Sergey Naumov wrote:
> > Yes, of course, there have to be a negation:
> > sknaumov@sknaumov-VirtualBox:~/tmux.compile$ git diff HEAD
> > diff --git a/input-keys.c b/input-keys.c
> > index 2b30d4b..b39d024 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)
> > 
> > 2012/10/26 Sergey Naumov <sknau...@gmail.com>:
> > > No, I want to enter copy mode when I am in terminal with shell prompt
> > > (and it is better to have an option to scroll first then move cursor
> > > when we reached a top of history, because it resembles original mouse
> > > scrolling in terminal), but I want to use program-implemented mouse
> > > scrolling in terminal program (and I always can enter copy mode with
> > > Ctrl-a [, so this logic is not flawed, I think).
> > > With this aptch applied I can use mouse scrolling within mc and mcedit
> > > to select files/navigate through code, but when I press Ctrl-o (switch
> > > to mc internal subshell), I can scroll mouse to enter copy mode and
> > > look at terminal history.
> > >
> > > Sergey Naumov.
> > >
> > > 2012/10/26, Nicholas Marriott <nicholas.marri...@gmail.com>:
> > >> 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.
> > >>

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to