Applied, thanks.

On Mon, Jan 20, 2014 at 02:25:38AM +0100, Benoit Pierre wrote:
> Hi,
> 
> Currently, tmux will automatically leave copy mode when scrolling to bottom
> with the mouse. This patch tweaks the behaviour to stay in copy mode if a
> selection is in progress so mouse scrolling does not prematurely end it.
> 
> ---
>  window-copy.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/window-copy.c b/window-copy.c
> index 37b65c8..3e9e580 100644
> --- a/window-copy.c
> +++ b/window-copy.c
> @@ -853,8 +853,12 @@ window_copy_mouse(
>               } else if (m->wheel == MOUSE_WHEEL_DOWN) {
>                       for (i = 0; i < 5; i++)
>                               window_copy_cursor_down(wp, 1);
> -                     if (data->oy == 0)
> -                             goto reset_mode;
> +                     /*
> +                      * We reached the bottom, leave copy mode,
> +                      * but only if no selection is in progress.
> +                      */
> +                     if (data->oy == 0 && !s->sel.flag)
> +                         goto reset_mode;
>               }
>               return;
>       }
> -- 
> 1.8.5.3
> 
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to