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

Diff for /src/usr.bin/tmux/format.c between version 1.224 and 1.225

version 1.224, 2020/01/28 10:44:30 version 1.225, 2020/02/14 13:57:58
Line 880 
Line 880 
         xasprintf(&fe->value, "%u", n);          xasprintf(&fe->value, "%u", n);
 }  }
   
   /* Callback for pane_at_top. */
   static void
   format_cb_pane_at_top(struct format_tree *ft, struct format_entry *fe)
   {
           struct window_pane      *wp = ft->wp;
           struct window           *w = wp->window;
           int                      status, flag;
   
           if (wp == NULL)
                   return;
   
           status = options_get_number(w->options, "pane-border-status");
           if (status == PANE_STATUS_TOP)
                   flag = (wp->yoff == 1);
           else
                   flag = (wp->yoff == 0);
           xasprintf(&fe->value, "%d", flag);
   }
   
   /* Callback for pane_at_bottom. */
   static void
   format_cb_pane_at_bottom(struct format_tree *ft, struct format_entry *fe)
   {
           struct window_pane      *wp = ft->wp;
           struct window           *w = wp->window;
           int                      status, flag;
   
           if (wp == NULL)
                   return;
   
           status = options_get_number(w->options, "pane-border-status");
           if (status == PANE_STATUS_BOTTOM)
                   flag = (wp->yoff + wp->sy == w->sy - 1);
           else
                   flag = (wp->yoff + wp->sy == w->sy);
           xasprintf(&fe->value, "%d", flag);
   }
   
 /* Callback for cursor_character. */  /* Callback for cursor_character. */
 static void  static void
 format_cb_cursor_character(struct format_tree *ft, struct format_entry *fe)  format_cb_cursor_character(struct format_tree *ft, struct format_entry *fe)
Line 2531 
Line 2569 
         format_add(ft, "pane_right", "%u", wp->xoff + wp->sx - 1);          format_add(ft, "pane_right", "%u", wp->xoff + wp->sx - 1);
         format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1);          format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1);
         format_add(ft, "pane_at_left", "%d", wp->xoff == 0);          format_add(ft, "pane_at_left", "%d", wp->xoff == 0);
         format_add(ft, "pane_at_top", "%d", wp->yoff == 0);          format_add_cb(ft, "pane_at_top", format_cb_pane_at_top);
         format_add(ft, "pane_at_right", "%d", wp->xoff + wp->sx == w->sx);          format_add(ft, "pane_at_right", "%d", wp->xoff + wp->sx == w->sx);
         format_add(ft, "pane_at_bottom", "%d", wp->yoff + wp->sy == w->sy);          format_add_cb(ft, "pane_at_bottom", format_cb_pane_at_bottom);
   
         wme = TAILQ_FIRST(&wp->modes);          wme = TAILQ_FIRST(&wp->modes);
         if (wme != NULL) {          if (wme != NULL) {

Legend:
Removed from v.1.224  
changed lines
  Added in v.1.225