[BACK]Return to cmd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd.c between version 1.56 and 1.57

version 1.56, 2011/06/05 11:19:03 version 1.57, 2011/12/09 16:28:18
Line 1213 
Line 1213 
   
         return (buf);          return (buf);
 }  }
   
   /* Return the default path for a new pane. */
   char *
   cmd_get_default_path(struct cmd_ctx *ctx)
   {
           char                    *cwd;
           struct session          *s;
           struct window_pane      *wp;
   
           if ((s = cmd_current_session(ctx, 0)) == NULL)
                   return (NULL);
   
           cwd = options_get_string(&s->options, "default-path");
           if (*cwd == '\0') {
                   if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
                           return (ctx->cmdclient->cwd);
                   if (ctx->curclient != NULL) {
                           wp = s->curw->window->active;
                           if ((cwd = get_proc_cwd(wp->pid)) != NULL)
                                   return (cwd);
                   }
                   return (s->cwd);
           }
           return (cwd);
   }

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57