Revision: 2619
          http://tmux.svn.sourceforge.net/tmux/?rev=2619&view=rev
Author:   tcunha
Date:     2011-10-23 15:05:20 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Sync OpenBSD patchset 967:

For initial session, use size of command client even if detached.

Modified Paths:
--------------
    trunk/cmd-new-session.c

Modified: trunk/cmd-new-session.c
===================================================================
--- trunk/cmd-new-session.c     2011-10-23 15:04:30 UTC (rev 2618)
+++ trunk/cmd-new-session.c     2011-10-23 15:05:20 UTC (rev 2619)
@@ -154,9 +154,17 @@
        }
 
        /* Find new session size. */
-       if (detached) {
+       if (ctx->cmdclient != NULL) {
+               sx = ctx->cmdclient->tty.sx;
+               sy = ctx->cmdclient->tty.sy;
+       } else if (ctx->curclient != NULL) {
+               sx = ctx->curclient->tty.sx;
+               sy = ctx->curclient->tty.sy;
+       } else {
                sx = 80;
                sy = 24;
+       }
+       if (detached) {
                if (args_has(args, 'x')) {
                        sx = strtonum(
                            args_get(args, 'x'), 1, USHRT_MAX, &errstr);
@@ -173,12 +181,6 @@
                                return (-1);
                        }
                }
-       } else if (ctx->cmdclient != NULL) {
-               sx = ctx->cmdclient->tty.sx;
-               sy = ctx->cmdclient->tty.sy;
-       } else {
-               sx = ctx->curclient->tty.sx;
-               sy = ctx->curclient->tty.sy;
        }
        if (sy > 0 && options_get_number(&global_s_options, "status"))
                sy--;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to