search: match_to_end_of_word(): use has_wrapped_around() while extracting text

This commit is contained in:
Daniel Eklöf 2021-03-28 21:16:42 +02:00
parent 11f7a6616b
commit 1c8bdf34ce
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -472,7 +472,9 @@ search_match_to_end_of_word(struct terminal *term, bool spaces_only)
if (++pos.col >= term->cols) {
pos.row = (pos.row + 1) & (term->grid->num_rows - 1);
pos.col = 0;
row = term->grid->rows[pos.row];
if (has_wrapped_around(term, pos.row))
break;
}
if (!extract_one(term, row, &row->cells[pos.col], pos.col, ctx))
break;