mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
io/key: [API] replace key.InputOp with a filter
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -124,6 +124,9 @@ func TestEditorReadOnly(t *testing.T) {
|
||||
gtx.Ops.Reset()
|
||||
layoutEditor()
|
||||
r.Frame(gtx.Ops)
|
||||
gtx.Ops.Reset()
|
||||
layoutEditor()
|
||||
r.Frame(gtx.Ops)
|
||||
|
||||
// Select everything.
|
||||
gtx.Ops.Reset()
|
||||
@@ -1005,8 +1008,11 @@ func TestSelectMove(t *testing.T) {
|
||||
gtx.Ops.Reset()
|
||||
e.Layout(gtx, cache, font, fontSize, op.CallOp{}, op.CallOp{})
|
||||
r.Frame(gtx.Ops)
|
||||
gtx.Ops.Reset()
|
||||
e.Layout(gtx, cache, font, fontSize, op.CallOp{}, op.CallOp{})
|
||||
r.Frame(gtx.Ops)
|
||||
|
||||
for _, keyName := range []string{key.NameLeftArrow, key.NameRightArrow, key.NameUpArrow, key.NameDownArrow} {
|
||||
for _, keyName := range []key.Name{key.NameLeftArrow, key.NameRightArrow, key.NameUpArrow, key.NameDownArrow} {
|
||||
// Select 345
|
||||
e.SetCaret(3, 6)
|
||||
if expected, got := "345", e.SelectedText(); expected != got {
|
||||
|
||||
Reference in New Issue
Block a user