Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-12 Thread Ben Boeckel
On Fri, May 11, 2012 at 09:12:09 +0100, Thomas Adam wrote: > Hi, > > On 10 May 2012 07:02, Nicholas Marriott wrote: > > Whoops, I missed this. I think it should use -t like everything else: > > That looks OK, but as I mentioned before, the semantics for -s change > when used with -r, in that whe

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-11 Thread Thomas Adam
Hi, On 10 May 2012 07:02, Nicholas Marriott wrote: > Whoops, I missed this. I think it should use -t like everything else: That looks OK, but as I mentioned before, the semantics for -s change when used with -r, in that when using -s, we're not looking up a src-window, but a src-session. I am n

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-09 Thread Nicholas Marriott
Whoops, I missed this. I think it should use -t like everything else: Index: cmd-move-window.c === RCS file: /cvs/src/usr.bin/tmux/cmd-move-window.c,v retrieving revision 1.11 diff -u -p -r1.11 cmd-move-window.c --- cmd-move-window.c

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-08 Thread Ben Boeckel
On Tue, May 08, 2012 at 11:04:36 +0100, Thomas Adam wrote: > On 8 May 2012 10:04, Thomas Adam wrote: > > So I am not sure how best do this, other than have -r take a parameter to > > specify a session, and use cmd_find_session() to look it up. > > Something like the following? Completely and utt

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-08 Thread Thomas Adam
On 8 May 2012 10:04, Thomas Adam wrote: > So I am not sure how best do this, other than have -r take a parameter to > specify a session, and use cmd_find_session() to look it up. Something like the following? Completely and utterly untested. diff --git a/trunk/cmd-move-window.c b/trunk/cmd-move

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-08 Thread Thomas Adam
On Tue, May 08, 2012 at 12:13:13AM +, Ben Boeckel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Tue, Apr 24, 2012 at 22:07:40 GMT, Thomas Adam wrote: > > diff --git a/trunk/cmd-move-window.c b/trunk/cmd-move-window.c > > index 5c4dbbe..acb5044 100644 > > --- a/trunk/cmd-mov

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-05-07 Thread Ben Boeckel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Tue, Apr 24, 2012 at 22:07:40 GMT, Thomas Adam wrote: > diff --git a/trunk/cmd-move-window.c b/trunk/cmd-move-window.c > index 5c4dbbe..acb5044 100644 > --- a/trunk/cmd-move-window.c > +++ b/trunk/cmd-move-window.c > @@ -42,11 +42,22 @@ int > cmd

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-29 Thread Nicholas Marriott
Hi RB_FOREACH_SAFE is fairly new, so yes no doubt there are a good few places it could be used instead of manual loops. I've applied the diff, thanks! On Sun, Apr 29, 2012 at 05:35:28PM +0100, Thomas Adam wrote: > Hi, > > On 29 April 2012 09:16, Nicholas Marriott wrote: > > Hi > > > > This lo

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-29 Thread Thomas Adam
Hi, On 29 April 2012 09:16, Nicholas Marriott wrote: > Hi > > This looks great, except you need to call winlink_remove on the old > winlink to remove the old win ref count and free the winlink. Also no Oops. That'll help plug some leaks, yes. Thanks for spotting that. > point in the function

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-29 Thread Nicholas Marriott
Hi This looks great, except you need to call winlink_remove on the old winlink to remove the old win ref count and free the winlink. Also no point in the function returning an error that is never used or checking that s is NULL when it never can be :-). Going to go with this, minor tweaks only:

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-24 Thread Thomas Adam
On Mon, Apr 23, 2012 at 11:25:28PM +0100, Nicholas Marriott wrote: > Do we need a command at all or is the option enough? Well, I can already see people wanting both, and I see both as light-weight, especially since both code-paths between a flag to move-window and a session option call the same f

Re: [PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-23 Thread Nicholas Marriott
Do we need a command at all or is the option enough? If a manual trigger is really useful, could this be a flag to move-window? On Sun, Apr 22, 2012 at 02:46:52PM +0100, Thomas Adam wrote: > This adds the definition file for the renumber-windows command, as well as > supporting its addition in t

[PATCH v2 1/4] Add cmd-renumber-windows definition

2012-04-22 Thread Thomas Adam
This adds the definition file for the renumber-windows command, as well as supporting its addition in the Makefile. --- trunk/Makefile.am|1 + trunk/cmd-renumber-windows.c | 53 ++ trunk/cmd.c |1 + trunk/tmux.h