mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-12 16:47:42 -05:00
Add an API for passing pre-edit text to terminal; call from GTK
The terminal code doesn't yet do anything with the text other than feed it to a debugging printf. The call uses UTF-8 and expects the terminal to copy the string because that's compatible with gtk_im_context_get_preedit_string().
This commit is contained in:
@ -2150,6 +2150,7 @@ void input_method_preedit_changed_event(GtkIMContext *imc, gpointer data)
|
||||
string_string, (int)cursor_pos);
|
||||
sfree(string_string);
|
||||
#endif
|
||||
term_set_preedit_text(inst->term, preedit_string);
|
||||
g_free(preedit_string);
|
||||
}
|
||||
|
||||
@ -2160,6 +2161,7 @@ void input_method_preedit_end_event(GtkIMContext *imc, gpointer data)
|
||||
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||
debug(" - IM preedit-end event\n");
|
||||
#endif
|
||||
term_set_preedit_text(inst->term, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user