mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04: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
|
#define LOG_ENABLE_DBG 0
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
#include "search.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "wayland.h"
|
#include "wayland.h"
|
||||||
|
|
@ -129,14 +130,14 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
||||||
|
|
||||||
/* 3. Insert commit string */
|
/* 3. Insert commit string */
|
||||||
if (seat->ime.commit.pending.text != NULL) {
|
if (seat->ime.commit.pending.text != NULL) {
|
||||||
|
const char *text = seat->ime.commit.pending.text;
|
||||||
|
size_t len = strlen(text);
|
||||||
|
|
||||||
if (term->is_searching) {
|
if (term->is_searching) {
|
||||||
/* TODO */
|
search_add_chars(term, text, len);
|
||||||
} else {
|
render_refresh_search(term);
|
||||||
term_to_slave(
|
} else
|
||||||
term,
|
term_to_slave(term, text, len);
|
||||||
seat->ime.commit.pending.text,
|
|
||||||
strlen(seat->ime.commit.pending.text));
|
|
||||||
}
|
|
||||||
ime_reset_commit(seat);
|
ime_reset_commit(seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue