search: find_next(): correctly wrap row number

This commit is contained in:
Daniel Eklöf 2021-03-30 14:29:48 +02:00
parent 5e621bbdb9
commit 0945e71572
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -338,7 +338,7 @@ search_find_next(struct terminal *term)
for (size_t i = 0; i < term->search.len;) {
if (end_col >= term->cols) {
end_row++;
end_row = (end_row + 1) & (term->grid->num_rows - 1);
end_col = 0;
if (has_wrapped_around(term, end_row))