mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
search: find_next(): handle trailing SPACER cells
Make sure to increment match_end_col to account for trailing SPACER cells after a match. This fixes an issue where search matches weren’t highlighted correctly when the match *ends* with a double-width character.
This commit is contained in:
parent
d79a3b9350
commit
632c4839cd
2 changed files with 5 additions and 0 deletions
|
|
@ -94,6 +94,8 @@
|
|||
* Certain dead-key combinations resulting in different escape
|
||||
sequences compared to kitty, when the kitty keyboard protocol is
|
||||
used ([#1120][1120]).
|
||||
* Search matches ending with a double-width character not being
|
||||
highlighted correctly.
|
||||
|
||||
[1055]: https://codeberg.org/dnkl/foot/issues/1055
|
||||
[1092]: https://codeberg.org/dnkl/foot/issues/1092
|
||||
|
|
|
|||
3
search.c
3
search.c
|
|
@ -371,6 +371,9 @@ find_next(struct terminal *term, enum search_direction direction,
|
|||
i += additional_chars;
|
||||
match_len += additional_chars;
|
||||
match_end_col++;
|
||||
|
||||
while (match_row->cells[match_end_col].wc > CELL_SPACER)
|
||||
match_end_col++;
|
||||
}
|
||||
|
||||
if (match_len != term->search.len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue