diff options
| author | adamdotdevin <[email protected]> | 2025-07-15 12:03:21 -0500 |
|---|---|---|
| committer | adamdotdevin <[email protected]> | 2025-07-15 12:03:30 -0500 |
| commit | 4f955f2127f9881b7fd57ec19e920e5e3557238b (patch) | |
| tree | 5bfe165c18dae9e31e42bc51c294b330e3ed8fa5 /packages/tui/input/parse.go | |
| parent | bbeb579d3a21575c4766a66abf9f266e146e8f82 (diff) | |
| download | opencode-4f955f2127f9881b7fd57ec19e920e5e3557238b.tar.gz opencode-4f955f2127f9881b7fd57ec19e920e5e3557238b.zip | |
fix(tui): mouse scroll ansi parsing and perf
Diffstat (limited to 'packages/tui/input/parse.go')
| -rw-r--r-- | packages/tui/input/parse.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/tui/input/parse.go b/packages/tui/input/parse.go index 13f564d67..ad8e21849 100644 --- a/packages/tui/input/parse.go +++ b/packages/tui/input/parse.go @@ -303,7 +303,8 @@ func (p *Parser) parseCsi(b []byte) (int, Event) { return i, CursorPositionEvent{Y: row - 1, X: col - 1} case 'm' | '<'<<parser.PrefixShift, 'M' | '<'<<parser.PrefixShift: // Handle SGR mouse - if paramsLen == 3 { + if paramsLen >= 3 { + pa = pa[:3] return i, parseSGRMouseEvent(cmd, pa) } case 'm' | '>'<<parser.PrefixShift: |
