diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-28 19:16:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-17 16:14:10 +0000 |
| commit | 1c8bdf34ced8f263d61293f3559b2dd570a1c23c (patch) | |
| tree | 15c1e41cb6afa64965e7ee1e21267677a541dcba | |
| parent | search: match_to_end_of_word(): we always extend the selection with at least one character (diff) | |
search: match_to_end_of_word(): use has_wrapped_around() while extracting text
| -rw-r--r-- | search.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |
