Skip to content
Myr

Keep a minimum wait for a sequence in flight

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

ESCDELAY=0 makes the retry count zero, so the wait added in d0377ed had no effect and the reply still leaked. Past the introducer these bytes cannot be the ESC key, so waiting for them adds no Escape latency. - Wait at least defaultEscDelay, honour a larger ESCDELAY - Lone ESC still honours ESCDELAY=0, measured 3ms to exit either way Fix #4899

authored by Junegunn Choi · committed by Junegunn Choi · parent d0377ed · Browse files · 1 file+3 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:src/tui/light.go+3 added-1 removed
418 unmodified lines
419 }420 buffer = append(buffer, byte(c))421 // Keep waiting while a sequence is still arriving. Dropping the budget422 // after every byte left fzf parsing whatever the read happened to end on.423 // Past the introducer this is not the ESC key, so the wait costs no424 // Escape latency and ESCDELAY=0 must not reduce it to nothing.425 if retries == 0 && incompleteEscape(buffer) {424 retries = r.escDelay / escPollInterval426 retries = max(r.escDelay, defaultEscDelay) / escPollInterval427 }428 pc = c429430 // This should never happen under normal conditions,
1263 unmodified lines