{"record":{"id":"4ebf3fc5860e8d5e","repo":"junegunn/fzf","slug":"adaptive-height-is-not-compatible-with-top-bottom-4ebf3f","errorCode":null,"errorMessage":"adaptive height is not compatible with top/bottom percent padding","messagePattern":"adaptive height is not compatible with top/bottom percent padding","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":3652,"sourceCode":"\t\tif len(runes) > 2 {\n\t\t\treturn errors.New(\"--scrollbar should be given one or two characters\")\n\t\t}\n\t\tfor _, r := range runes {\n\t\t\tif uniseg.StringWidth(string(r)) != 1 {\n\t\t\t\treturn errors.New(\"scrollbar display width should be 1\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif opts.Height.auto && (opts.Tmux == nil || opts.Tmux.index < opts.Height.index) {\n\t\tfor _, s := range []sizeSpec{opts.Margin[0], opts.Margin[2]} {\n\t\t\tif s.percent {\n\t\t\t\treturn errors.New(\"adaptive height is not compatible with top/bottom percent margin\")\n\t\t\t}\n\t\t}\n\t\tfor _, s := range []sizeSpec{opts.Padding[0], opts.Padding[2]} {\n\t\t\tif s.percent {\n\t\t\t\treturn errors.New(\"adaptive height is not compatible with top/bottom percent padding\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif opts.Theme.Nth.IsColorDefined() {\n\t\treturn errors.New(\"only ANSI attributes are allowed for 'nth' (regular, bold, underline, reverse, dim, italic, strikethrough)\")\n\t}\n\n\tif opts.BorderShape == tui.BorderInline ||\n\t\topts.ListBorderShape == tui.BorderInline ||\n\t\topts.InputBorderShape == tui.BorderInline ||\n\t\topts.Preview.border == tui.BorderInline {\n\t\treturn errors.New(\"inline border is only supported for --header-border, --header-lines-border, and --footer-border\")\n\t}\n\tif opts.HeaderBorderShape == tui.BorderInline &&\n\t\topts.HeaderLinesShape != tui.BorderInline &&\n\t\topts.HeaderLinesShape != tui.BorderUndefined &&\n\t\topts.HeaderLinesShape != tui.BorderNone {","sourceCodeStart":3634,"sourceCodeEnd":3670,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L3634-L3670","documentation":"Same circular-sizing constraint as percent margins, but for padding: with adaptive height, top/bottom percent padding cannot be resolved because both depend on the final height fzf is trying to compute. The check at options.go:3652 fires when opts.Height.auto is active and opts.Padding[0] or opts.Padding[2] is a percent sizeSpec.","triggerScenarios":"Combining --height=~80% with --padding=5%,0,5%,0 (or any --padding where the first or third value ends in '%').","commonSituations":"Theme/config presets that use percent padding being reused with adaptive height; users assuming padding and margin follow different rules.","solutions":["Use absolute padding values for top/bottom with adaptive height (e.g. --padding=2,4,2,4)","Or use a fixed --height so percent padding is computable","Audit shared config files for percent padding when switching to --height=~…"],"exampleFix":"# before\nfzf --height=~80% --padding=5%,2,5%,2\n# after\nfzf --height=~80% --padding=2,2,2,2","handlingStrategy":"validation","validationCode":"// Shell: absolute top/bottom padding for adaptive height\ncase \"$height\" in '~'*) padding='1,2,1,2' ;; esac\nexec fzf --height=\"$height\" --padding=\"$padding\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute padding values whenever --height starts with '~'","Audit shared themes for percent padding before enabling adaptive height","Left/right percent padding remains fine; only top/bottom conflict"],"tags":["fzf","cli","layout","validation","padding"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}