Re: Patch to implement reflowing

2013-02-05 Thread Nicholas Marriott
Hi I've applied this (and the rest) to OpenBSD now, should be in over to Git at some point. Thanks for your work! On Fri, Feb 01, 2013 at 06:42:50PM -0500, Richard Woodbury wrote: > On Fri, Feb 1, 2013 at 6:30 AM, Nicholas Marriott > wrote: > > > > Hi > > > > Take a look at this please. > > >

Re: Patch to implement reflowing

2013-02-01 Thread Richard Woodbury
On Fri, Feb 1, 2013 at 6:30 AM, Nicholas Marriott wrote: > > Hi > > Take a look at this please. > > We reflow in window_pane_resize when the alternate screen is off > (saved_grid == NULL) and always when switching back from alternate > screen. No need to reflow from any of the modes. One quick fi

Re: Patch to implement reflowing

2013-02-01 Thread Thomas Adam
Hi, On 1 February 2013 11:30, Nicholas Marriott wrote: > Hi > > Take a look at this please. > > We reflow in window_pane_resize when the alternate screen is off > (saved_grid == NULL) and always when switching back from alternate > screen. No need to reflow from any of the modes. Yep; looks good

Re: Patch to implement reflowing

2013-02-01 Thread Nicholas Marriott
Hi Take a look at this please. We reflow in window_pane_resize when the alternate screen is off (saved_grid == NULL) and always when switching back from alternate screen. No need to reflow from any of the modes. Index: grid.c === R

Re: Patch to implement reflowing

2013-02-01 Thread Nicholas Marriott
I think an argument rather than a flag would be better TBH, don't see a flag as being useful. On Fri, Feb 01, 2013 at 08:28:10AM +, Thomas Adam wrote: > Hi, > > On 1 February 2013 07:15, Richard Woodbury wrote: > > On Thu, Jan 31, 2013 at 6:55 AM, Nicholas Marriott > > wrote: > >> > >> Ok

Re: Patch to implement reflowing

2013-02-01 Thread Thomas Adam
Hi, On 1 February 2013 07:15, Richard Woodbury wrote: > On Thu, Jan 31, 2013 at 6:55 AM, Nicholas Marriott > wrote: >> >> Ok let's lose the option and make it the default and that means we don't >> have to have resizep -F and that means no man page changes too. >> >> I think I would try to put t

Re: Patch to implement reflowing

2013-01-31 Thread Richard Woodbury
On Thu, Jan 31, 2013 at 6:55 AM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > Ok let's lose the option and make it the default and that means we don't > have to have resizep -F and that means no man page changes too. > > I think I would try to put the call to grid_reflow into screen_r

Re: Patch to implement reflowing

2013-01-31 Thread Nicholas Marriott
Ok let's lose the option and make it the default and that means we don't have to have resizep -F and that means no man page changes too. I think I would try to put the call to grid_reflow into screen_resize but it will need an extra argument because we still won't want to do it in alternate screen

Re: Patch to implement reflowing

2013-01-31 Thread Thomas Adam
Hi, On Thu, Jan 31, 2013 at 11:23:01AM +, Nicholas Marriott wrote: > Hi > > Here is a tweaked version with some trivial style nitpicking and one > change to not reflow when the application has issued smcup (alternate > screen). > > I'm a bit torn about the need for an option - I'm not a huge

Re: Patch to implement reflowing

2013-01-31 Thread Nicholas Marriott
Hi Here is a tweaked version with some trivial style nitpicking and one change to not reflow when the application has issued smcup (alternate screen). I'm a bit torn about the need for an option - I'm not a huge fan of this behaviour but I don't think I actually care enough to need an option to t

Re: Patch to implement reflowing

2013-01-30 Thread Richard Woodbury
On Wed, Jan 30, 2013 at 11:14 AM, Thomas Adam wrote: > I've pushed changes to tmux.git which means you'll need to rework your > patch slightly since GRID_FLAG_UTF8 is no longer used by anything. > > You're probably OK to just call grid_cell_{get,set}() without checking > first; but I've not looke

Re: Patch to implement reflowing

2013-01-30 Thread Nicholas Marriott
Hi Code looks mostly fine, a few style nits below. I think we should make this a flag to resize-pane (I suggest -R or -L) rather than a new command. Could you do that? Thanks diff --git a/grid.c b/grid.c index 71a3679..4f07bf8 100644 --- a/grid.c +++ b/grid.c @@ -541,3 +541,58 @@ grid_duplicat

Re: Patch to implement reflowing

2013-01-30 Thread Thomas Adam
Hi, On 30 January 2013 15:58, Richard Woodbury wrote: > On Wed, Jan 30, 2013 at 3:15 AM, Nicholas Marriott > wrote: >> >> Looks like your mailer mangled the whitespace in the first diff so can >> you resend please as an attachment including this change? > > > Curses! Sorry about that... I'm more

Re: Patch to implement reflowing

2013-01-30 Thread Richard Woodbury
On Wed, Jan 30, 2013 at 3:15 AM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > Looks like your mailer mangled the whitespace in the first diff so can > you resend please as an attachment including this change? > Curses! Sorry about that... I'm more used to git pull requests. Please fi

Re: Patch to implement reflowing

2013-01-30 Thread Nicholas Marriott
Hi Looks like your mailer mangled the whitespace in the first diff so can you resend please as an attachment including this change? On Wed, Jan 30, 2013 at 02:24:12AM -0500, Richard Woodbury wrote: > On Tue, Jan 29, 2013 at 6:10 PM, Thomas Adam wrote: > > > > Your patch segfaults tmux when I

Re: Patch to implement reflowing

2013-01-29 Thread Richard Woodbury
On Tue, Jan 29, 2013 at 6:10 PM, Thomas Adam wrote: > > Your patch segfaults tmux when I do this: > > tmux -Stemp -Ltemp -f/dev/null > ^b:setw reflow > ^b" > > (That is, start tmux on a new server with your patch compiled; > immediately set the 'reflow' option on the window; then call 'splitw' > o

Re: Patch to implement reflowing

2013-01-29 Thread Thomas Adam
Hi, I'm sorry that I don't have time to debug this right now... On 29 January 2013 18:27, Richard Woodbury wrote: > On Tue, Jan 29, 2013 at 7:15 AM, Nicholas Marriott > wrote: >> >> Can you send a unified diff to the mailing list please? > > Sure thing. See below. Your patch segfaults tmux wh

Re: Patch to implement reflowing

2013-01-29 Thread Richard Woodbury
On Tue, Jan 29, 2013 at 7:15 AM, Nicholas Marriott wrote: > > Can you send a unified diff to the mailing list please? Sure thing. See below. >From df6f6960cb469bf5a5f6332697186afd1d568ab5 Mon Sep 17 00:00:00 2001 From: Richard Woodbury Date: Sun, 27 Jan 2013 16:44:49 -0500 Subject: [PATCH] Imp

Re: Patch to implement reflowing

2013-01-29 Thread Nicholas Marriott
Can you send a unified diff to the mailing list please? Thanks On Mon, Jan 28, 2013 at 01:34:07AM -0500, Richard Woodbury wrote: >I have written code that can reflow text in a pane to suit a new width. >*It can be induced manually via the "reflow-pane" command, or >automatically on r

Re: Patch to implement reflowing

2013-01-29 Thread Thomas Adam
Hi, On 28 January 2013 06:34, Richard Woodbury wrote: > I have written code that can reflow text in a pane to suit a new width. It > can be induced manually via the "reflow-pane" command, or automatically on > resize by setting the "reflow" window option. Of course, automatic > reflowing is dis

Patch to implement reflowing

2013-01-29 Thread Richard Woodbury
I have written code that can reflow text in a pane to suit a new width. It can be induced manually via the "reflow-pane" command, or automatically on resize by setting the "reflow" window option. Of course, automatic reflowing is disabled by default. See below for a pull request. The following