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

Diff for /src/usr.bin/tmux/menu.c between version 1.44 and 1.45

version 1.44, 2022/02/16 18:55:05 version 1.45, 2022/05/31 10:22:42
Line 56 
Line 56 
 {  {
         struct menu_item        *new_item;          struct menu_item        *new_item;
         const char              *key = NULL, *cmd, *suffix = "";          const char              *key = NULL, *cmd, *suffix = "";
         char                    *s, *name;          char                    *s, *trimmed, *name;
         u_int                    width, max_width;          u_int                    width, max_width;
         int                      line;          int                      line;
         size_t                   keylen, slen;          size_t                   keylen, slen;
Line 103 
Line 103 
                 max_width--;                  max_width--;
                 suffix = ">";                  suffix = ">";
         }          }
         if (key != NULL)          trimmed = format_trim_right(s, max_width);
                 xasprintf(&name, "%.*s%s#[default] #[align=right](%s)",          if (key != NULL) {
                     (int)max_width, s, suffix, key);                  xasprintf(&name, "%s%s#[default] #[align=right](%s)",
         else                      trimmed, suffix, key);
                 xasprintf(&name, "%.*s%s", (int)max_width, s, suffix);          } else
                   xasprintf(&name, "%s%s", trimmed, suffix);
           free(trimmed);
   
         new_item->name = name;          new_item->name = name;
         free(s);          free(s);

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