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

Diff for /src/usr.bin/tmux/window-copy.c between version 1.297 and 1.298

version 1.297, 2020/06/04 21:40:27 version 1.298, 2020/06/05 07:44:42
Line 266 
Line 266 
         u_int            my;          u_int            my;
         int              showmark;          int              showmark;
   
         uint64_t         searchtime;  
         int              searchtype;          int              searchtype;
         int              searchregex;          int              searchregex;
         char            *searchstr;          char            *searchstr;
Line 282 
Line 281 
         int              timeout;       /* search has timed out */          int              timeout;       /* search has timed out */
 #define WINDOW_COPY_SEARCH_TIMEOUT 10000  #define WINDOW_COPY_SEARCH_TIMEOUT 10000
 #define WINDOW_COPY_SEARCH_ALL_TIMEOUT 200  #define WINDOW_COPY_SEARCH_ALL_TIMEOUT 200
 #define WINDOW_COPY_SEARCH_REPEAT 50  
   
         int              jumptype;          int              jumptype;
         char             jumpchar;          char             jumpchar;
Line 1662 
Line 1660 
         struct window_copy_mode_data    *data = wme->data;          struct window_copy_mode_data    *data = wme->data;
         u_int                            np = wme->prefix;          u_int                            np = wme->prefix;
   
         if (data->searchtime != 0 &&  
             get_timer() - data->searchtime < WINDOW_COPY_SEARCH_REPEAT)  
                 return (WINDOW_COPY_CMD_NOTHING);  
   
         if (data->searchtype == WINDOW_COPY_SEARCHUP) {          if (data->searchtype == WINDOW_COPY_SEARCHUP) {
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_search_up(wme, data->searchregex);                          window_copy_search_up(wme, data->searchregex);
Line 1673 
Line 1667 
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_search_down(wme, data->searchregex);                          window_copy_search_down(wme, data->searchregex);
         }          }
         data->searchtime = get_timer();  
         return (WINDOW_COPY_CMD_NOTHING);          return (WINDOW_COPY_CMD_NOTHING);
 }  }
   
Line 1684 
Line 1677 
         struct window_copy_mode_data    *data = wme->data;          struct window_copy_mode_data    *data = wme->data;
         u_int                            np = wme->prefix;          u_int                            np = wme->prefix;
   
         if (data->searchtime != 0 &&  
             get_timer() - data->searchtime < WINDOW_COPY_SEARCH_REPEAT)  
                 return (WINDOW_COPY_CMD_NOTHING);  
   
         if (data->searchtype == WINDOW_COPY_SEARCHUP) {          if (data->searchtype == WINDOW_COPY_SEARCHUP) {
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_search_down(wme, data->searchregex);                          window_copy_search_down(wme, data->searchregex);
Line 1695 
Line 1684 
                 for (; np != 0; np--)                  for (; np != 0; np--)
                         window_copy_search_up(wme, data->searchregex);                          window_copy_search_up(wme, data->searchregex);
         }          }
         data->searchtime = get_timer();  
         return (WINDOW_COPY_CMD_NOTHING);          return (WINDOW_COPY_CMD_NOTHING);
 }  }
   

Legend:
Removed from v.1.297  
changed lines
  Added in v.1.298