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

Diff for /src/usr.bin/tmux/input-keys.c between version 1.57 and 1.58

version 1.57, 2017/01/25 14:24:54 version 1.58, 2017/01/25 14:36:08
Line 158 
Line 158 
         char                            *out;          char                            *out;
         key_code                         justkey;          key_code                         justkey;
         struct utf8_data                 ud;          struct utf8_data                 ud;
         int                              mode;  
   
         log_debug("writing key 0x%llx (%s) to %%%u", key,          log_debug("writing key 0x%llx (%s) to %%%u", key,
             key_string_lookup_key(key), wp->id);              key_string_lookup_key(key), wp->id);
Line 195 
Line 194 
          * Then try to look this up as an xterm key, if the flag to output them           * Then try to look this up as an xterm key, if the flag to output them
          * is set.           * is set.
          */           */
         mode = wp->screen->mode;  
         if (options_get_number(wp->window->options, "xterm-keys")) {          if (options_get_number(wp->window->options, "xterm-keys")) {
                 if ((out = xterm_keys_lookup(key, mode)) != NULL) {                  if ((out = xterm_keys_lookup(key)) != NULL) {
                         bufferevent_write(wp->event, out, strlen(out));                          bufferevent_write(wp->event, out, strlen(out));
                         free(out);                          free(out);
                         return;                          return;
Line 208 
Line 206 
         for (i = 0; i < nitems(input_keys); i++) {          for (i = 0; i < nitems(input_keys); i++) {
                 ike = &input_keys[i];                  ike = &input_keys[i];
   
                 if ((ike->flags & INPUTKEY_KEYPAD) && (~mode & MODE_KKEYPAD))                  if ((ike->flags & INPUTKEY_KEYPAD) &&
                       !(wp->screen->mode & MODE_KKEYPAD))
                         continue;                          continue;
                 if ((ike->flags & INPUTKEY_CURSOR) && (~mode & MODE_KCURSOR))                  if ((ike->flags & INPUTKEY_CURSOR) &&
                       !(wp->screen->mode & MODE_KCURSOR))
                         continue;                          continue;
   
                 if ((key & KEYC_ESCAPE) && (ike->key | KEYC_ESCAPE) == key)                  if ((key & KEYC_ESCAPE) && (ike->key | KEYC_ESCAPE) == key)

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