mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
Tweak previous to check the wrapped flag and stop if not set.
This commit is contained in:
@ -2084,6 +2084,7 @@ window_copy_search_lr(struct grid *gd,
|
|||||||
{
|
{
|
||||||
u_int ax, bx, px, pywrap, endline;
|
u_int ax, bx, px, pywrap, endline;
|
||||||
int matched;
|
int matched;
|
||||||
|
struct grid_line *gl;
|
||||||
|
|
||||||
endline = gd->hsize + gd->sy - 1;
|
endline = gd->hsize + gd->sy - 1;
|
||||||
for (ax = first; ax < last; ax++) {
|
for (ax = first; ax < last; ax++) {
|
||||||
@ -2092,6 +2093,9 @@ window_copy_search_lr(struct grid *gd,
|
|||||||
pywrap = py;
|
pywrap = py;
|
||||||
/* Wrap line. */
|
/* Wrap line. */
|
||||||
while (px >= gd->sx && pywrap < endline) {
|
while (px >= gd->sx && pywrap < endline) {
|
||||||
|
gl = grid_get_line(gd, pywrap);
|
||||||
|
if (~gl->flags & GRID_LINE_WRAPPED)
|
||||||
|
break;
|
||||||
px -= gd->sx;
|
px -= gd->sx;
|
||||||
pywrap++;
|
pywrap++;
|
||||||
}
|
}
|
||||||
@ -2117,6 +2121,7 @@ window_copy_search_rl(struct grid *gd,
|
|||||||
{
|
{
|
||||||
u_int ax, bx, px, pywrap, endline;
|
u_int ax, bx, px, pywrap, endline;
|
||||||
int matched;
|
int matched;
|
||||||
|
struct grid_line *gl;
|
||||||
|
|
||||||
endline = gd->hsize + gd->sy - 1;
|
endline = gd->hsize + gd->sy - 1;
|
||||||
for (ax = last; ax > first; ax--) {
|
for (ax = last; ax > first; ax--) {
|
||||||
@ -2125,6 +2130,9 @@ window_copy_search_rl(struct grid *gd,
|
|||||||
pywrap = py;
|
pywrap = py;
|
||||||
/* Wrap line. */
|
/* Wrap line. */
|
||||||
while (px >= gd->sx && pywrap < endline) {
|
while (px >= gd->sx && pywrap < endline) {
|
||||||
|
gl = grid_get_line(gd, pywrap);
|
||||||
|
if (~gl->flags & GRID_LINE_WRAPPED)
|
||||||
|
break;
|
||||||
px -= gd->sx;
|
px -= gd->sx;
|
||||||
pywrap++;
|
pywrap++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user