I can't check it right now at work because build on Debian Squeeze is broken:

control.c: In function ‘control_callback’:
control.c:103: warning: implicit declaration of function ‘evbuffer_readln’
control.c:103: warning: nested extern declaration of ‘evbuffer_readln’
control.c:103: error: ‘EVBUFFER_EOL_LF’ undeclared (first use in this function)
control.c:103: error: (Each undeclared identifier is reported only once
control.c:103: error: for each function it appears in.)

As far as I understand, EVBUFFER_EOL_LF is from libevent, but I have
libevent-dev package installed.

At home I will pull last changes from tmux git and give you a feedback.

Sergey Naumov.



2012/11/27, Nicholas Marriott <nicholas.marri...@gmail.com>:
> 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.
>> > >>
>

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to