Revision: 2691
http://tmux.svn.sourceforge.net/tmux/?rev=2691&view=rev
Author: tcunha
Date: 2012-01-31 12:03:56 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
Sync OpenBSD patchset 1020:
Add pane id to each pane in layout description (while still accepting
the old form). Based on diff from George Nachman.
Modified Paths:
--------------
trunk/cmd-select-layout.c
trunk/layout-custom.c
Modified: trunk/cmd-select-layout.c
===================================================================
--- trunk/cmd-select-layout.c 2012-01-31 12:03:00 UTC (rev 2690)
+++ trunk/cmd-select-layout.c 2012-01-31 12:03:56 UTC (rev 2691)
@@ -105,6 +105,7 @@
layout = layout_set_next(wl->window);
else
layout = layout_set_previous(wl->window);
+ server_redraw_window(wl->window);
ctx->info(ctx, "arranging in: %s", layout_set_name(layout));
return (0);
}
@@ -115,6 +116,7 @@
layout = layout_set_lookup(args->argv[0]);
if (layout != -1) {
layout = layout_set_select(wl->window, layout);
+ server_redraw_window(wl->window);
ctx->info(ctx, "arranging in: %s", layout_set_name(layout));
return (0);
}
@@ -125,6 +127,7 @@
ctx->error(ctx, "can't set layout: %s", layoutname);
return (-1);
}
+ server_redraw_window(wl->window);
ctx->info(ctx, "arranging in: %s", layoutname);
return (0);
}
Modified: trunk/layout-custom.c
===================================================================
--- trunk/layout-custom.c 2012-01-31 12:03:00 UTC (rev 2690)
+++ trunk/layout-custom.c 2012-01-31 12:03:56 UTC (rev 2691)
@@ -79,8 +79,13 @@
if (len == 0)
return (-1);
- tmplen = xsnprintf(tmp, sizeof tmp,
- "%ux%u,%u,%u", lc->sx, lc->sy, lc->xoff, lc->yoff);
+ if (lc->wp != NULL) {
+ tmplen = xsnprintf(tmp, sizeof tmp, "%ux%u,%u,%u,%u",
+ lc->sx, lc->sy, lc->xoff, lc->yoff, lc->wp->id);
+ } else {
+ tmplen = xsnprintf(tmp, sizeof tmp, "%ux%u,%u,%u",
+ lc->sx, lc->sy, lc->xoff, lc->yoff);
+ }
if (tmplen > (sizeof tmp) - 1)
return (-1);
if (strlcat(buf, tmp, len) >= len)
@@ -202,7 +207,8 @@
if (!isdigit((u_char) **layout))
return (NULL);
- if (sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)
+ if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 5 &&
+ sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)
return (NULL);
while (isdigit((u_char) **layout))
@@ -222,6 +228,11 @@
(*layout)++;
while (isdigit((u_char) **layout))
(*layout)++;
+ if (**layout == ',') {
+ (*layout)++;
+ while (isdigit((u_char) **layout))
+ (*layout)++;
+ }
lc = layout_create_cell(lcparent);
lc->sx = sx;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs