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

Diff for /src/usr.bin/tmux/cmd-send-keys.c between version 1.33 and 1.34

version 1.33, 2016/10/16 19:04:05 version 1.34, 2016/11/29 12:54:46
Line 66 
Line 66 
         const u_char            *keystr;          const u_char            *keystr;
         int                      i, literal;          int                      i, literal;
         key_code                 key;          key_code                 key;
         u_int                    np;          u_int                    np = 1;
         char                    *cause = NULL;          char                    *cause = NULL;
   
         if (args_has(args, 'N')) {          if (args_has(args, 'N')) {
                 if (wp->mode == NULL || wp->mode->command == NULL) {  
                         cmdq_error(item, "not in a mode");  
                         return (CMD_RETURN_ERROR);  
                 }  
                 np = args_strtonum(args, 'N', 1, UINT_MAX, &cause);                  np = args_strtonum(args, 'N', 1, UINT_MAX, &cause);
                 if (cause != NULL) {                  if (cause != NULL) {
                         cmdq_error(item, "prefix %s", cause);                          cmdq_error(item, "repeat count %s", cause);
                         free(cause);                          free(cause);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 wp->modeprefix = np;  
         }          }
   
         if (args_has(args, 'X')) {          if (args_has(args, 'X')) {
Line 88 
Line 83 
                         cmdq_error(item, "not in a mode");                          cmdq_error(item, "not in a mode");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                   wp->modeprefix = np;
                 if (!m->valid)                  if (!m->valid)
                         wp->mode->command(wp, c, s, args, NULL);                          wp->mode->command(wp, c, s, args, NULL);
                 else                  else
Line 95 
Line 91 
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
         }          }
   
         if (args_has(args, 'N')) /* only with -X */  
                 return (CMD_RETURN_NORMAL);  
   
         if (args_has(args, 'M')) {          if (args_has(args, 'M')) {
                 wp = cmd_mouse_pane(m, &s, NULL);                  wp = cmd_mouse_pane(m, &s, NULL);
                 if (wp == NULL) {                  if (wp == NULL) {
Line 120 
Line 113 
         if (args_has(args, 'R'))          if (args_has(args, 'R'))
                 input_reset(wp, 1);                  input_reset(wp, 1);
   
         for (i = 0; i < args->argc; i++) {          for (; np != 0; np--) {
                 literal = args_has(args, 'l');                  for (i = 0; i < args->argc; i++) {
                 if (!literal) {                          literal = args_has(args, 'l');
                         key = key_string_lookup_string(args->argv[i]);                          if (!literal) {
                         if (key != KEYC_NONE && key != KEYC_UNKNOWN)                                  key = key_string_lookup_string(args->argv[i]);
                                 window_pane_key(wp, NULL, s, key, NULL);                                  if (key != KEYC_NONE && key != KEYC_UNKNOWN)
                         else                                          window_pane_key(wp, NULL, s, key, NULL);
                                 literal = 1;                                  else
                                           literal = 1;
                           }
                           if (literal) {
                                   for (keystr = args->argv[i]; *keystr != '\0'; keystr++)
                                           window_pane_key(wp, NULL, s, *keystr, NULL);
                           }
                 }                  }
                 if (literal) {  
                         for (keystr = args->argv[i]; *keystr != '\0'; keystr++)  
                                 window_pane_key(wp, NULL, s, *keystr, NULL);  
                 }  
         }          }
   
         return (CMD_RETURN_NORMAL);          return (CMD_RETURN_NORMAL);

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34