mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app,io/router: expand IME snippets if a new range overlaps the old
Instead of cmpletely replacing the IME snippet for every update, expand the old range if there is overlap. This change avoids never-ending restarts of the IME on Android where snippets are expanded in two calls, one for expanding before the selection and one for exanding after the selection. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -492,7 +492,6 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user