From bf6371c8e9cc6424fe09f70b807429b763bc3040 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 7 Jun 2022 11:58:07 +0200 Subject: [PATCH] app: restore IME snippet after an EditorReplace Commit 02732037436f547717ec53073ce8b295329c9bd8 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 --- app/window.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/window.go b/app/window.go index 116a38d2..86a8a6af 100644 --- a/app/window.go +++ b/app/window.go @@ -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) {