Skip to content
Myr

Fix panic on unexpected escape sequences

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 5cae8ea · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/tui/light.go+1 added-1 removed
465 unmodified lines
466 return Event{F12, 0, nil}467 }468 }469 // Bracketed paste mode: \e[200~ ... \e[201~470 if r.buffer[3] == '0' && (r.buffer[4] == '0' || r.buffer[4] == '1') && r.buffer[5] == '~' {470 if len(r.buffer) > 5 && r.buffer[3] == '0' && (r.buffer[4] == '0' || r.buffer[4] == '1') && r.buffer[5] == '~' {471 // Immediately discard the sequence from the buffer and reread input472 r.buffer = r.buffer[6:]473 *sz = 0474 return r.GetChar()
490 unmodified lines