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

Diff for /src/usr.bin/tmux/window.c between version 1.247 and 1.248

version 1.247, 2020/01/13 07:51:55 version 1.248, 2020/02/14 13:57:58
Line 541 
Line 541 
 struct window_pane *  struct window_pane *
 window_find_string(struct window *w, const char *s)  window_find_string(struct window *w, const char *s)
 {  {
         u_int   x, y;          u_int   x, y, top = 0, bottom = w->sy - 1;
           int     status;
   
         x = w->sx / 2;          x = w->sx / 2;
         y = w->sy / 2;          y = w->sy / 2;
   
           status = options_get_number(w->options, "pane-border-status");
           if (status == PANE_STATUS_TOP)
                   top++;
           else if (status == PANE_STATUS_BOTTOM)
                   bottom--;
   
         if (strcasecmp(s, "top") == 0)          if (strcasecmp(s, "top") == 0)
                 y = 0;                  y = top;
         else if (strcasecmp(s, "bottom") == 0)          else if (strcasecmp(s, "bottom") == 0)
                 y = w->sy - 1;                  y = bottom;
         else if (strcasecmp(s, "left") == 0)          else if (strcasecmp(s, "left") == 0)
                 x = 0;                  x = 0;
         else if (strcasecmp(s, "right") == 0)          else if (strcasecmp(s, "right") == 0)
                 x = w->sx - 1;                  x = w->sx - 1;
         else if (strcasecmp(s, "top-left") == 0) {          else if (strcasecmp(s, "top-left") == 0) {
                 x = 0;                  x = 0;
                 y = 0;                  y = top;
         } else if (strcasecmp(s, "top-right") == 0) {          } else if (strcasecmp(s, "top-right") == 0) {
                 x = w->sx - 1;                  x = w->sx - 1;
                 y = 0;                  y = top;
         } else if (strcasecmp(s, "bottom-left") == 0) {          } else if (strcasecmp(s, "bottom-left") == 0) {
                 x = 0;                  x = 0;
                 y = w->sy - 1;                  y = bottom;
         } else if (strcasecmp(s, "bottom-right") == 0) {          } else if (strcasecmp(s, "bottom-right") == 0) {
                 x = w->sx - 1;                  x = w->sx - 1;
                 y = w->sy - 1;                  y = bottom;
         } else          } else
                 return (NULL);                  return (NULL);
   

Legend:
Removed from v.1.247  
changed lines
  Added in v.1.248