mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 05:29:53 +00:00
fix(tui): mouse wheel ansi codes leaking into editor
This commit is contained in:
parent
8be1ca836c
commit
294d0e7ee3
35 changed files with 6104 additions and 61 deletions
27
packages/tui/input/focus_test.go
Normal file
27
packages/tui/input/focus_test.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package input
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFocus(t *testing.T) {
|
||||
var p Parser
|
||||
_, e := p.parseSequence([]byte("\x1b[I"))
|
||||
switch e.(type) {
|
||||
case FocusEvent:
|
||||
// ok
|
||||
default:
|
||||
t.Error("invalid sequence")
|
||||
}
|
||||
}
|
||||
|
||||
func TestBlur(t *testing.T) {
|
||||
var p Parser
|
||||
_, e := p.parseSequence([]byte("\x1b[O"))
|
||||
switch e.(type) {
|
||||
case BlurEvent:
|
||||
// ok
|
||||
default:
|
||||
t.Error("invalid sequence")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue