io/input,io/key: [API] replace SelectionOp with command

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-09 17:04:22 -05:00
parent 627e028d3c
commit 813d836641
5 changed files with 29 additions and 54 deletions
+1 -5
View File
@@ -537,11 +537,7 @@ func (e *Editor) Update(gtx layout.Context) {
}
if newSel != e.ime.selection {
e.ime.selection = newSel
key.SelectionOp{
Tag: &e.eventKey,
Range: newSel.rng,
Caret: newSel.caret,
}.Add(gtx.Ops)
gtx.Queue(key.SelectionCmd{Tag: &e.eventKey, Range: newSel.rng, Caret: newSel.caret})
}
e.updateSnippet(gtx, e.ime.start, e.ime.end)