mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-11 10:38:12 +00:00
Fix panic on unexpected escape sequences
This commit is contained in:
parent
5cae8ea733
commit
ec75d16ea8
@ -467,7 +467,7 @@ func (r *LightRenderer) escSequence(sz *int) Event {
|
||||
}
|
||||
}
|
||||
// Bracketed paste mode: \e[200~ ... \e[201~
|
||||
if r.buffer[3] == '0' && (r.buffer[4] == '0' || r.buffer[4] == '1') && r.buffer[5] == '~' {
|
||||
if len(r.buffer) > 5 && r.buffer[3] == '0' && (r.buffer[4] == '0' || r.buffer[4] == '1') && r.buffer[5] == '~' {
|
||||
// Immediately discard the sequence from the buffer and reread input
|
||||
r.buffer = r.buffer[6:]
|
||||
*sz = 0
|
||||
|
Loading…
Reference in New Issue
Block a user