mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
search: don't create a new selection when match start coords haven't changed
This commit is contained in:
parent
3f767be500
commit
d518d9dafb
1 changed files with 8 additions and 2 deletions
10
search.c
10
search.c
|
|
@ -153,8 +153,14 @@ search_update(struct terminal *term)
|
||||||
start_row--;
|
start_row--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Begin a selection (it's finalized when "committing" the search) */
|
/* Begin a new selection if the start coords changed */
|
||||||
selection_start(term, start_col, start_row - term->grid->view);
|
if (start_row != term->search.match.row ||
|
||||||
|
start_col != term->search.match.col)
|
||||||
|
{
|
||||||
|
selection_start(term, start_col, start_row - term->grid->view);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Update selection endpoint */
|
||||||
selection_update(term, end_col, end_row - term->grid->view);
|
selection_update(term, end_col, end_row - term->grid->view);
|
||||||
|
|
||||||
/* Update match state */
|
/* Update match state */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue