mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
commit
14737d1d82
4 changed files with 16 additions and 0 deletions
|
|
@ -39,6 +39,9 @@
|
||||||
* Rendering into the right margin area with `tweak.overflowing-glyphs`
|
* Rendering into the right margin area with `tweak.overflowing-glyphs`
|
||||||
enabled.
|
enabled.
|
||||||
* PGO builds with clang (https://codeberg.org/dnkl/foot/issues/642).
|
* PGO builds with clang (https://codeberg.org/dnkl/foot/issues/642).
|
||||||
|
* Crash in scrollback search mode when selection has been canceled due
|
||||||
|
to terminal content updates
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/644).
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
8
search.c
8
search.c
|
|
@ -155,6 +155,14 @@ search_cancel(struct terminal *term)
|
||||||
selection_cancel(term);
|
selection_cancel(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
search_selection_cancelled(struct terminal *term)
|
||||||
|
{
|
||||||
|
term->search.match = (struct coord){-1, -1};
|
||||||
|
term->search.match_len = 0;
|
||||||
|
render_refresh_search(term);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
search_update_selection(struct terminal *term,
|
search_update_selection(struct terminal *term,
|
||||||
int start_row, int start_col,
|
int start_row, int start_col,
|
||||||
|
|
|
||||||
2
search.h
2
search.h
|
|
@ -11,3 +11,5 @@ void search_input(
|
||||||
const xkb_keysym_t *raw_syms, size_t raw_count,
|
const xkb_keysym_t *raw_syms, size_t raw_count,
|
||||||
uint32_t serial);
|
uint32_t serial);
|
||||||
void search_add_chars(struct terminal *term, const char *text, size_t len);
|
void search_add_chars(struct terminal *term, const char *text, size_t len);
|
||||||
|
|
||||||
|
void search_selection_cancelled(struct terminal *term);
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include "grid.h"
|
#include "grid.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
#include "search.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "vt.h"
|
#include "vt.h"
|
||||||
|
|
@ -1058,6 +1059,8 @@ selection_cancel(struct terminal *term)
|
||||||
term->selection.pivot.end = (struct coord){-1, -1};
|
term->selection.pivot.end = (struct coord){-1, -1};
|
||||||
term->selection.direction = SELECTION_UNDIR;
|
term->selection.direction = SELECTION_UNDIR;
|
||||||
term->selection.ongoing = false;
|
term->selection.ongoing = false;
|
||||||
|
|
||||||
|
search_selection_cancelled(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue