junegunn/fzf Β· warning

%v display width should be up to %d

Error message

%v display width should be up to %d

What it means

validateOptions checks that the pointer and marker signs fit their allotted cells: the pointer gets 2 columns, the marker 2 as well. If the configured string's display width (uniseg.StringWidth, grapheme-aware) exceeds maxWidth, this error names the option and the limit.

Source

Thrown at src/options.go:3609

		opts.HeaderBorderShape = defaultBorderShape
		opts.FooterBorderShape = defaultBorderShape
		opts.Preview.border = defaultBorderShape
		if defaultBorderShape == tui.BorderLine {
			opts.BorderShape = defaultBorderShape
		}
		opts.Preview.info = true
		opts.InfoStyle = infoInlineRight
		opts.Theme.Gutter = tui.NewColorAttr()
		opts.Separator = nil
		opts.Scrollbar = nil
		opts.CursorLine = true
	}
	return nil
}

func validateSign(sign string, signOptName string, maxWidth int) error {
	if uniseg.StringWidth(sign) > maxWidth {
		return fmt.Errorf("%v display width should be up to %d", signOptName, maxWidth)
	}
	return nil
}

func validateOptions(opts *Options) error {
	if opts.Pointer != nil {
		if err := validateSign(*opts.Pointer, "pointer", 2); err != nil {
			return err
		}
	}

	if opts.Marker != nil {
		if err := validateSign(*opts.Marker, "marker", 2); err != nil {
			return err
		}
	}

	if opts.Gutter != nil && uniseg.StringWidth(*opts.Gutter) != 1 ||

View on GitHub (pinned to bd4efa277b)

Solutions

  1. Use a sign of at most 2 display columns: --pointer='β–Ά' (1) or --pointer='πŸš€' (2)
  2. Remember limits: pointer ≀ 2 columns, marker ≀ 2 columns
  3. If you need richer indicators, use --marker with preview labels instead of a wide glyph

Example fix

# before
fzf --pointer='>>>'
# after
fzf --pointer='β–Ά'
Defensive patterns

Strategy: validation

Validate before calling

# Go helper: keep pointer/marker within 2 display columns
func signOK(s string) bool { return uniseg.StringWidth(s) <= 2 }

Prevention

When it happens

Trigger: Setting --pointer or --marker to a string wider than 2 columns: e.g. '>>>' (3), a wide emoji plus an ASCII char (3), or any multi-emoji sequence totaling >2 columns.

Common situations: Theming fzf with emoji pointers ('πŸš€' alone is width 2 and fine, 'πŸš€πŸš€' is 4 and fails); combining two characters where one is East-Asian-wide; scripts defaulting to a fancy prompt-like arrow.

Related errors


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