Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-15 Thread Nicholas Marriott
Applied to OpenBSD now, will be in SF later, thanks. On Wed, Dec 10, 2014 at 04:33:51PM -0800, Michael Graczyk wrote: >Whoops, last message had the wrong attachment.** This is the correct one. >On Wed, Dec 10, 2014 at 3:54 PM, Michael Graczyk <[1]mich...@mgraczyk.com> >wrote: > >

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-10 Thread Michael Graczyk
Whoops, last message had the wrong attachment. This is the correct one. On Wed, Dec 10, 2014 at 3:54 PM, Michael Graczyk wrote: > Thanks Javier for the information. Good to know. > > Thomas, > > I removed "static" from the declaration. > > Bye the time window_copy_redraw_screen is called, the o

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-10 Thread Michael Graczyk
Thanks Javier for the information. Good to know. Thomas, I removed "static" from the declaration. Bye the time window_copy_redraw_screen is called, the old data->cy has already been clobbered so there is no way of determining which lines must be withdrawn. I made window_copy_for_selection it's

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-10 Thread Thomas Adam
On Tue, Dec 09, 2014 at 01:45:48AM -0800, Michael Graczyk wrote: > +static void We don't mark functions as static in tmux; not even for the portable version. > if (window_copy_update_selection(wp, 1)) > - window_copy_redraw_screen(wp); > +

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-10 Thread Javier Tia
>From 'git help format-patch': GMail does not have any way to turn off line wrapping in the web interface, so it will mangle any emails that you send. You can however use "git send-email" and send your patches through the GMail SMTP server, or use any IMAP email client to connect to the google IMA

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-10 Thread Michael Graczyk
I removed the unused argument and attached the patch. For future reference, any easy way to get gmail to not mangle patches? As for the data->cy temporary, the successive call to window_copy_update_cursor clobbers the y coordinate in data. Unless the y-coordinate is stored somewhere else (It doe

Re: [PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-09 Thread Nicholas Marriott
Your mailer has mangled this patch, can you send it as an attachment please? Also please just remove the old_x argument if you don't need it (or mark it "unused", but I'd just remove it). And there seems no need to use temporaries for data->c[xy]. On Mon, Dec 08, 2014 at 05:25:29PM -0800, Michae

[PATCH 1/1]: Fix poor performance during mouse mode selection.

2014-12-09 Thread Michael Graczyk
On large displays, mouse selection performance was poor. Tmux was redrawing the entire screen for every mouse coordinate update when it only needed to update those lines where the selection might have changed. This patch makes mouse selection buttery-smooth by only updating those lines that need