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

Diff for /src/usr.bin/tmux/key-string.c between version 1.60 and 1.61

version 1.60, 2020/05/20 07:11:45 version 1.61, 2020/05/25 18:57:25
Line 169 
Line 169 
         struct utf8_data         ud;          struct utf8_data         ud;
         u_int                    i;          u_int                    i;
         enum utf8_state          more;          enum utf8_state          more;
         wchar_t                  wc;          utf8_char                uc;
   
         /* Is this no key or any key? */          /* Is this no key or any key? */
         if (strcasecmp(string, "None") == 0)          if (strcasecmp(string, "None") == 0)
Line 210 
Line 210 
                                 more = utf8_append(&ud, (u_char)string[i]);                                  more = utf8_append(&ud, (u_char)string[i]);
                         if (more != UTF8_DONE)                          if (more != UTF8_DONE)
                                 return (KEYC_UNKNOWN);                                  return (KEYC_UNKNOWN);
                         if (utf8_combine(&ud, &wc) != UTF8_DONE)                          if (utf8_from_data(&ud, &uc) != UTF8_DONE)
                                 return (KEYC_UNKNOWN);                                  return (KEYC_UNKNOWN);
                         return (wc|modifiers);                          return (uc|modifiers);
                 }                  }
   
                 /* Otherwise look the key up in the table. */                  /* Otherwise look the key up in the table. */
Line 349 
Line 349 
   
         /* Is this a UTF-8 key? */          /* Is this a UTF-8 key? */
         if (key > 127 && key < KEYC_BASE) {          if (key > 127 && key < KEYC_BASE) {
                 if (utf8_split(key, &ud) == UTF8_DONE) {                  utf8_to_data(key, &ud);
                         off = strlen(out);                  off = strlen(out);
                         memcpy(out + off, ud.data, ud.size);                  memcpy(out + off, ud.data, ud.size);
                         out[off + ud.size] = '\0';                  out[off + ud.size] = '\0';
                         goto out;                  goto out;
                 }  
         }          }
   
         /* Invalid keys are errors. */          /* Invalid keys are errors. */

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61