[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.343 and 1.344

version 1.343, 2023/09/01 14:29:11 version 1.344, 2023/09/04 08:01:43
Line 295 
Line 295 
         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_MAX_LINE 2000
   
         int                      jumptype;          int                      jumptype;
         struct utf8_data        *jumpchar;          struct utf8_data        *jumpchar;
Line 3205 
Line 3206 
         len = gd->sx - first;          len = gd->sx - first;
         endline = gd->hsize + gd->sy - 1;          endline = gd->hsize + gd->sy - 1;
         pywrap = py;          pywrap = py;
         while (buf != NULL && pywrap <= endline) {          while (buf != NULL &&
               pywrap <= endline &&
               len < WINDOW_COPY_SEARCH_MAX_LINE) {
                 gl = grid_get_line(gd, pywrap);                  gl = grid_get_line(gd, pywrap);
                 if (~gl->flags & GRID_LINE_WRAPPED)                  if (~gl->flags & GRID_LINE_WRAPPED)
                         break;                          break;
Line 3262 
Line 3265 
         len = gd->sx - first;          len = gd->sx - first;
         endline = gd->hsize + gd->sy - 1;          endline = gd->hsize + gd->sy - 1;
         pywrap = py;          pywrap = py;
         while (buf != NULL && (pywrap <= endline)) {          while (buf != NULL &&
               pywrap <= endline &&
               len < WINDOW_COPY_SEARCH_MAX_LINE) {
                 gl = grid_get_line(gd, pywrap);                  gl = grid_get_line(gd, pywrap);
                 if (~gl->flags & GRID_LINE_WRAPPED)                  if (~gl->flags & GRID_LINE_WRAPPED)
                         break;                          break;
Line 3601 
Line 3606 
     struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap,      struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap,
     int direction, int regex)      int direction, int regex)
 {  {
         u_int    i, px, sx, ssize = 1;          u_int                    i, px, sx, ssize = 1;
         int      found = 0, cflags = REG_EXTENDED;          int                      found = 0, cflags = REG_EXTENDED;
         char    *sbuf;          char                    *sbuf;
         regex_t  reg;          regex_t                  reg;
           struct grid_line        *gl;
   
         if (regex) {          if (regex) {
                 sbuf = xmalloc(ssize);                  sbuf = xmalloc(ssize);
Line 3621 
Line 3627 
   
         if (direction) {          if (direction) {
                 for (i = fy; i <= endline; i++) {                  for (i = fy; i <= endline; i++) {
                           gl = grid_get_line(gd, i);
                           if (i != endline && gl->flags & GRID_LINE_WRAPPED)
                                   continue;
                         if (regex) {                          if (regex) {
                                 found = window_copy_search_lr_regex(gd,                                  found = window_copy_search_lr_regex(gd,
                                     &px, &sx, i, fx, gd->sx, &reg);                                      &px, &sx, i, fx, gd->sx, &reg);
Line 3634 
Line 3643 
                 }                  }
         } else {          } else {
                 for (i = fy + 1; endline < i; i--) {                  for (i = fy + 1; endline < i; i--) {
                           gl = grid_get_line(gd, i - 1);
                           if (i != endline && gl->flags & GRID_LINE_WRAPPED)
                                   continue;
                         if (regex) {                          if (regex) {
                                 found = window_copy_search_rl_regex(gd,                                  found = window_copy_search_rl_regex(gd,
                                     &px, &sx, i - 1, 0, fx + 1, &reg);                                      &px, &sx, i - 1, 0, fx + 1, &reg);

Legend:
Removed from v.1.343  
changed lines
  Added in v.1.344