[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.348 and 1.349

version 1.348, 2024/04/23 13:34:51 version 1.349, 2024/05/14 07:40:39
Line 3615 
Line 3615 
     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                      wrapped, found = 0, cflags = REG_EXTENDED;
         char                    *sbuf;          char                    *sbuf;
         regex_t                  reg;          regex_t                  reg;
         struct grid_line        *gl;          struct grid_line        *gl;
   
           wrapped = options_get_number(global_options, "search-wrapped-lines");
   
         if (regex) {          if (regex) {
                 sbuf = xmalloc(ssize);                  sbuf = xmalloc(ssize);
                 sbuf[0] = '\0';                  sbuf[0] = '\0';
Line 3636 
Line 3638 
         if (direction) {          if (direction) {
                 for (i = fy; i <= endline; i++) {                  for (i = fy; i <= endline; i++) {
                         gl = grid_get_line(gd, i);                          gl = grid_get_line(gd, i);
                         if (i != endline && gl->flags & GRID_LINE_WRAPPED)                          if (!wrapped &&
                               i != endline &&
                               gl->flags & GRID_LINE_WRAPPED)
                                 continue;                                  continue;
                         if (regex) {                          if (regex) {
                                 found = window_copy_search_lr_regex(gd,                                  found = window_copy_search_lr_regex(gd,
Line 3652 
Line 3656 
         } else {          } else {
                 for (i = fy + 1; endline < i; i--) {                  for (i = fy + 1; endline < i; i--) {
                         gl = grid_get_line(gd, i - 1);                          gl = grid_get_line(gd, i - 1);
                         if (i != endline && gl->flags & GRID_LINE_WRAPPED)                          if (!wrapped &&
                               i != endline &&
                               gl->flags & GRID_LINE_WRAPPED)
                                 continue;                                  continue;
                         if (regex) {                          if (regex) {
                                 found = window_copy_search_rl_regex(gd,                                  found = window_copy_search_rl_regex(gd,

Legend:
Removed from v.1.348  
changed lines
  Added in v.1.349