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

Diff for /src/usr.bin/tmux/mode-tree.c between version 1.16 and 1.17

version 1.16, 2017/11/02 21:29:17 version 1.17, 2017/11/02 22:00:42
Line 39 
Line 39 
         u_int                     sort_size;          u_int                     sort_size;
         u_int                     sort_type;          u_int                     sort_type;
   
         void                     (*buildcb)(void *, u_int, uint64_t *,          mode_tree_build_cb        buildcb;
                                      const char *);          mode_tree_draw_cb         drawcb;
         struct screen           *(*drawcb)(void *, void *, u_int, u_int);          mode_tree_search_cb       searchcb;
         int                      (*searchcb)(void*, void *, const char *);  
   
         struct mode_tree_list     children;          struct mode_tree_list     children;
         struct mode_tree_list     saved;          struct mode_tree_list     saved;
Line 265 
Line 264 
 }  }
   
 void  void
 mode_tree_each_tagged(struct mode_tree_data *mtd, void (*cb)(void *, void *,  mode_tree_each_tagged(struct mode_tree_data *mtd, mode_tree_each_cb cb,
     struct client *, key_code), struct client *c, key_code key, int current)      struct client *c, key_code key, int current)
 {  {
         struct mode_tree_item   *mti;          struct mode_tree_item   *mti;
         u_int                    i;          u_int                    i;
Line 288 
Line 287 
   
 struct mode_tree_data *  struct mode_tree_data *
 mode_tree_start(struct window_pane *wp, struct args *args,  mode_tree_start(struct window_pane *wp, struct args *args,
     void (*buildcb)(void *, u_int, uint64_t *, const char *),      mode_tree_build_cb buildcb, mode_tree_draw_cb drawcb,
     struct screen *(*drawcb)(void *, void *, u_int, u_int),      mode_tree_search_cb searchcb, void *modedata, const char **sort_list,
     int (*searchcb)(void *, void *, const char *), void *modedata,      u_int sort_size, struct screen **s)
     const char **sort_list, u_int sort_size, struct screen **s)  
 {  {
         struct mode_tree_data   *mtd;          struct mode_tree_data   *mtd;
         const char              *sort;          const char              *sort;
Line 463 
Line 461 
 mode_tree_draw(struct mode_tree_data *mtd)  mode_tree_draw(struct mode_tree_data *mtd)
 {  {
         struct window_pane      *wp = mtd->wp;          struct window_pane      *wp = mtd->wp;
         struct screen           *s = &mtd->screen, *box = NULL;          struct screen           *s = &mtd->screen;
         struct mode_tree_line   *line;          struct mode_tree_line   *line;
         struct mode_tree_item   *mti;          struct mode_tree_item   *mti;
         struct options          *oo = wp->window->options;          struct options          *oo = wp->window->options;
Line 591 
Line 589 
         box_x = w - 4;          box_x = w - 4;
         box_y = sy - h - 2;          box_y = sy - h - 2;
   
         if (box_x != 0 && box_y != 0)          if (box_x != 0 && box_y != 0) {
                 box = mtd->drawcb(mtd->modedata, mti->itemdata, box_x, box_y);  
         if (box != NULL) {  
                 screen_write_cursormove(&ctx, 2, h + 1);                  screen_write_cursormove(&ctx, 2, h + 1);
                 screen_write_fast_copy(&ctx, box, 0, 0, box_x, box_y);                  mtd->drawcb(mtd->modedata, mti->itemdata, &ctx, box_x, box_y);
   
                 screen_free(box);  
         }          }
   
         screen_write_stop(&ctx);          screen_write_stop(&ctx);

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17