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

Diff for /src/usr.bin/tmux/cmd-switch-client.c between version 1.43 and 1.44

version 1.43, 2016/10/10 21:51:39 version 1.44, 2016/10/16 19:04:05
Line 27 
Line 27 
  * Switch client to a different session.   * Switch client to a different session.
  */   */
   
 static enum cmd_retval   cmd_switch_client_exec(struct cmd *, struct cmd_q *);  static enum cmd_retval  cmd_switch_client_exec(struct cmd *,
                               struct cmdq_item *);
   
 const struct cmd_entry cmd_switch_client_entry = {  const struct cmd_entry cmd_switch_client_entry = {
         .name = "switch-client",          .name = "switch-client",
Line 45 
Line 46 
 };  };
   
 static enum cmd_retval  static enum cmd_retval
 cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct cmd_state        *state = &cmdq->state;          struct cmd_state        *state = &item->state;
         struct client           *c = state->c;          struct client           *c = state->c;
         struct session          *s = cmdq->state.tflag.s;          struct session          *s = item->state.tflag.s;
         struct window_pane      *wp;          struct window_pane      *wp;
         const char              *tablename, *update;          const char              *tablename, *update;
         struct key_table        *table;          struct key_table        *table;
Line 62 
Line 63 
         if (tablename != NULL) {          if (tablename != NULL) {
                 table = key_bindings_get_table(tablename, 0);                  table = key_bindings_get_table(tablename, 0);
                 if (table == NULL) {                  if (table == NULL) {
                         cmdq_error(cmdq, "table %s doesn't exist", tablename);                          cmdq_error(item, "table %s doesn't exist", tablename);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 table->references++;                  table->references++;
Line 73 
Line 74 
   
         if (args_has(args, 'n')) {          if (args_has(args, 'n')) {
                 if ((s = session_next_session(c->session)) == NULL) {                  if ((s = session_next_session(c->session)) == NULL) {
                         cmdq_error(cmdq, "can't find next session");                          cmdq_error(item, "can't find next session");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
         } else if (args_has(args, 'p')) {          } else if (args_has(args, 'p')) {
                 if ((s = session_previous_session(c->session)) == NULL) {                  if ((s = session_previous_session(c->session)) == NULL) {
                         cmdq_error(cmdq, "can't find previous session");                          cmdq_error(item, "can't find previous session");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
         } else if (args_has(args, 'l')) {          } else if (args_has(args, 'l')) {
Line 87 
Line 88 
                 else                  else
                         s = NULL;                          s = NULL;
                 if (s == NULL) {                  if (s == NULL) {
                         cmdq_error(cmdq, "can't find last session");                          cmdq_error(item, "can't find last session");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
         } else {          } else {
                 if (cmdq->client == NULL)                  if (item->client == NULL)
                         return (CMD_RETURN_NORMAL);                          return (CMD_RETURN_NORMAL);
                 if (state->tflag.wl != NULL) {                  if (state->tflag.wl != NULL) {
                         wp = state->tflag.wp;                          wp = state->tflag.wp;

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44