mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
search: reset match state when selection is cancelled
While we’re in scrollback search mode, the selection may be cancelled (for example, if the application is scrolling out the selected text). Trying to e.g. extend the search selection after this has happened triggered a crash. This fixes it by simply resetting the search match state when the selection is cancelled. Closes #644
This commit is contained in:
parent
a987b1bd99
commit
251545203b
4 changed files with 15 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "grid.h"
|
||||
#include "misc.h"
|
||||
#include "render.h"
|
||||
#include "search.h"
|
||||
#include "uri.h"
|
||||
#include "util.h"
|
||||
#include "vt.h"
|
||||
|
|
@ -1058,6 +1059,8 @@ selection_cancel(struct terminal *term)
|
|||
term->selection.pivot.end = (struct coord){-1, -1};
|
||||
term->selection.direction = SELECTION_UNDIR;
|
||||
term->selection.ongoing = false;
|
||||
|
||||
search_selection_cancelled(term);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue