mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-12 04:27:51 -05:00
search: bug: restore end-col/end-row adjustment
Turns out end_col *can* be exactly 0. In this case, we need to adjust the end-row too.
This commit is contained in:
parent
b0d555255c
commit
6cfb3216c3
1 changed files with 4 additions and 2 deletions
6
search.c
6
search.c
|
|
@ -123,8 +123,10 @@ search_update_selection(struct terminal *term,
|
|||
term_damage_view(term);
|
||||
|
||||
/* Selection endpoint is inclusive */
|
||||
assert(end_col > 0);
|
||||
end_col--;
|
||||
if (--end_col < 0) {
|
||||
end_col = term->cols - 1;
|
||||
end_row--;
|
||||
}
|
||||
|
||||
/* Begin a new selection if the start coords changed */
|
||||
if (start_row != term->search.match.row ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue