app: restore IME snippet after an EditorReplace

Commit 0273203743 removed the snippet
restore event, which broke IME on macOS and Windows.

Fixes: https://todo.sr.ht/~eliasnaur/gio/424
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-07 11:58:07 +02:00
parent 5ff316ed6d
commit bf6371c8e9
+1
View File
@@ -513,6 +513,7 @@ func (c *callbacks) EditorInsert(text string) {
func (c *callbacks) EditorReplace(r key.Range, text string) {
c.w.imeState.Replace(r, text)
c.Event(key.EditEvent{Range: r, Text: text})
c.Event(key.SnippetEvent(c.w.imeState.Snippet.Range))
}
func (c *callbacks) SetEditorSelection(r key.Range) {