Compare commits

..

No commits in common. "e26356607e38cbb4676a7c91815ae2d5734443c3" and "1742138f0534d953f640308c924576dd2e189cd6" have entirely different histories.

View File

@ -295,7 +295,6 @@ struct window_copy_mode_data {
int timeout; /* search has timed out */
#define WINDOW_COPY_SEARCH_TIMEOUT 10000
#define WINDOW_COPY_SEARCH_ALL_TIMEOUT 200
#define WINDOW_COPY_SEARCH_MAX_LINE 2000
int jumptype;
struct utf8_data *jumpchar;
@ -3206,9 +3205,7 @@ window_copy_search_lr_regex(struct grid *gd, u_int *ppx, u_int *psx, u_int py,
len = gd->sx - first;
endline = gd->hsize + gd->sy - 1;
pywrap = py;
while (buf != NULL &&
pywrap <= endline &&
len < WINDOW_COPY_SEARCH_MAX_LINE) {
while (buf != NULL && pywrap <= endline) {
gl = grid_get_line(gd, pywrap);
if (~gl->flags & GRID_LINE_WRAPPED)
break;
@ -3265,9 +3262,7 @@ window_copy_search_rl_regex(struct grid *gd, u_int *ppx, u_int *psx, u_int py,
len = gd->sx - first;
endline = gd->hsize + gd->sy - 1;
pywrap = py;
while (buf != NULL &&
pywrap <= endline &&
len < WINDOW_COPY_SEARCH_MAX_LINE) {
while (buf != NULL && (pywrap <= endline)) {
gl = grid_get_line(gd, pywrap);
if (~gl->flags & GRID_LINE_WRAPPED)
break;
@ -3606,11 +3601,10 @@ window_copy_search_jump(struct window_mode_entry *wme, struct grid *gd,
struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap,
int direction, int regex)
{
u_int i, px, sx, ssize = 1;
int found = 0, cflags = REG_EXTENDED;
char *sbuf;
regex_t reg;
struct grid_line *gl;
u_int i, px, sx, ssize = 1;
int found = 0, cflags = REG_EXTENDED;
char *sbuf;
regex_t reg;
if (regex) {
sbuf = xmalloc(ssize);
@ -3627,9 +3621,6 @@ window_copy_search_jump(struct window_mode_entry *wme, struct grid *gd,
if (direction) {
for (i = fy; i <= endline; i++) {
gl = grid_get_line(gd, i);
if (i != endline && gl->flags & GRID_LINE_WRAPPED)
continue;
if (regex) {
found = window_copy_search_lr_regex(gd,
&px, &sx, i, fx, gd->sx, &reg);
@ -3643,9 +3634,6 @@ window_copy_search_jump(struct window_mode_entry *wme, struct grid *gd,
}
} else {
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) {
found = window_copy_search_rl_regex(gd,
&px, &sx, i - 1, 0, fx + 1, &reg);