junegunn/fzf · error

input buffer overflow (%d): %v

Error message

input buffer overflow (%d): %v

What it means

Error "input buffer overflow (%d): %v" thrown in junegunn/fzf.

Source

Thrown at src/tui/light.go:387

			if retries > 0 {
				retries--
				time.Sleep(escPollInterval * time.Millisecond)
				continue
			}
			break
		} else if c == Esc.Int() && pc != c {
			retries = r.escDelay / escPollInterval
		} else {
			retries = 0
		}
		buffer = append(buffer, byte(c))
		pc = c

		// This should never happen under normal conditions,
		// so terminate fzf immediately.
		if len(buffer) > maxInputBuffer {
			r.Close()
			return nil, getCharError, fmt.Errorf("input buffer overflow (%d): %v", len(buffer), buffer)
		}
	}

	return buffer, getCharSuccess, nil
}

func (r *LightRenderer) GetChar(cancellable bool) Event {
	var err error
	var result getCharResult
	if len(r.buffer) == 0 {
		r.buffer, result, err = r.getBytes(cancellable)
		if err != nil {
			return Event{Fatal, 0, nil}
		}
		if result == getCharCancelled {
			return Event{Invalid, 0, nil}
		}
	}

View on GitHub (pinned to bd4efa277b)

Solutions

  1. Upgrade fzf: this overflow indicates a terminal escape sequence longer than the internal input buffer, which should not happen in normal use
  2. Check the terminal emulator for a malfunction producing runaway escape sequences; try a different TERM value or terminal
  3. Report the issue with the overflowing input bytes shown in the message

When it happens

Trigger: Thrown at src/tui/light.go:387 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of junegunn/fzf@bd4efa277b (2026-08-15). Data as JSON: /api/errors/255a938e10ffa351. Report an issue: GitHub.