mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
ime: commit text using search_add_chars() while in scrollback search mode
This commit is contained in:
parent
f51ce34753
commit
d87160e5f6
1 changed files with 8 additions and 7 deletions
15
ime.c
15
ime.c
|
|
@ -10,6 +10,7 @@
|
|||
#define LOG_ENABLE_DBG 0
|
||||
#include "log.h"
|
||||
#include "render.h"
|
||||
#include "search.h"
|
||||
#include "terminal.h"
|
||||
#include "util.h"
|
||||
#include "wayland.h"
|
||||
|
|
@ -129,14 +130,14 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
|||
|
||||
/* 3. Insert commit string */
|
||||
if (seat->ime.commit.pending.text != NULL) {
|
||||
const char *text = seat->ime.commit.pending.text;
|
||||
size_t len = strlen(text);
|
||||
|
||||
if (term->is_searching) {
|
||||
/* TODO */
|
||||
} else {
|
||||
term_to_slave(
|
||||
term,
|
||||
seat->ime.commit.pending.text,
|
||||
strlen(seat->ime.commit.pending.text));
|
||||
}
|
||||
search_add_chars(term, text, len);
|
||||
render_refresh_search(term);
|
||||
} else
|
||||
term_to_slave(term, text, len);
|
||||
ime_reset_commit(seat);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue