foot/search.h
Daniel Eklöf 251545203b
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
2021-07-22 17:57:43 +02:00

15 lines
509 B
C

#pragma once
#include <xkbcommon/xkbcommon.h>
#include "terminal.h"
void search_begin(struct terminal *term);
void search_cancel(struct terminal *term);
void search_input(
struct seat *seat, struct terminal *term, uint32_t key,
xkb_keysym_t sym, xkb_mod_mask_t mods, xkb_mod_mask_t consumed,
const xkb_keysym_t *raw_syms, size_t raw_count,
uint32_t serial);
void search_add_chars(struct terminal *term, const char *text, size_t len);
void search_selection_cancelled(struct terminal *term);