[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.295 and 1.296

version 1.295, 2021/10/05 12:45:02 version 1.296, 2021/10/05 17:23:13
Line 1614 
Line 1614 
         struct window_pane      *wp;          struct window_pane      *wp;
         u_int                    x, y;          u_int                    x, y;
   
         if (ft->m.valid) {          if (!ft->m.valid)
                 wp = cmd_mouse_pane(&ft->m, NULL, NULL);  
                 if (wp != NULL && cmd_mouse_at(wp, &ft->m, &x, &y, 0) == 0)  
                         return (format_printf("%u", x));  
                 return (NULL);                  return (NULL);
           wp = cmd_mouse_pane(&ft->m, NULL, NULL);
           if (wp != NULL && cmd_mouse_at(wp, &ft->m, &x, &y, 0) == 0)
                   return (format_printf("%u", x));
           if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) {
                   if (ft->m.statusat == 0 && ft->m.y < ft->m.statuslines)
                           return (format_printf("%u", ft->m.x));
                   if (ft->m.statusat > 0 && ft->m.y >= ft->m.statusat)
                           return (format_printf("%u", ft->m.x));
         }          }
         return (NULL);          return (NULL);
 }  }
Line 1628 
Line 1633 
 format_cb_mouse_y(struct format_tree *ft)  format_cb_mouse_y(struct format_tree *ft)
 {  {
         struct window_pane      *wp;          struct window_pane      *wp;
         u_int                    x, y;          u_int                    x, y, top;
   
         if (ft->m.valid) {          if (!ft->m.valid)
                 wp = cmd_mouse_pane(&ft->m, NULL, NULL);  
                 if (wp != NULL && cmd_mouse_at(wp, &ft->m, &x, &y, 0) == 0)  
                         return (format_printf("%u", y));  
                 return (NULL);                  return (NULL);
           wp = cmd_mouse_pane(&ft->m, NULL, NULL);
           if (wp != NULL && cmd_mouse_at(wp, &ft->m, &x, &y, 0) == 0)
                   return (format_printf("%u", y));
           if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) {
                   if (ft->m.statusat == 0 && ft->m.y < ft->m.statuslines)
                           return (format_printf("%u", ft->m.y));
                   if (ft->m.statusat > 0 && ft->m.y >= ft->m.statusat)
                           return (format_printf("%u", ft->m.y - ft->m.statusat));
         }          }
         return (NULL);          return (NULL);
 }  }

Legend:
Removed from v.1.295  
changed lines
  Added in v.1.296