{"record":{"id":"bc8cba64f6d53cbb","repo":"kovidgoyal/kitty","slug":"invalid-tab-bar-margin-height-x-ignoring","errorCode":null,"errorMessage":"Invalid tab_bar_margin_height: {x}, ignoring","messagePattern":"Invalid tab_bar_margin_height: (.+?), ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":1047,"sourceCode":"    if x == 'right':\n        return 0b01\n    if to_bool(x):\n        return 0b11\n    return 0\n\n\nclass TabBarMarginHeight(NamedTuple):\n    outer: float = 0\n    inner: float = 0\n\n    def __bool__(self) -> bool:\n        return (self.outer + self.inner) > 0\n\n\ndef tab_bar_margin_height(x: str) -> TabBarMarginHeight:\n    parts = x.split(maxsplit=1)\n    if len(parts) != 2:\n        log_error(f'Invalid tab_bar_margin_height: {x}, ignoring')\n        return TabBarMarginHeight()\n    ans = map(positive_float, parts)\n    return TabBarMarginHeight(next(ans), next(ans))\n\n\ndef clone_source_strategies(x: str) -> frozenset[str]:\n    return frozenset({'venv', 'conda', 'path', 'env_var'} & set(x.lower().split(',')))\n\n\ndef clear_all_mouse_actions(val: str, dict_with_parse_results: dict[str, Any] | None = None) -> bool:\n    ans = to_bool(val)\n    if ans and dict_with_parse_results is not None:\n        dict_with_parse_results['mouse_map'] = [None]\n    return ans\n\n\ndef clear_all_shortcuts(val: str, dict_with_parse_results: dict[str, Any] | None = None) -> bool:\n    ans = to_bool(val)","sourceCodeStart":1029,"sourceCodeEnd":1065,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1029-L1065","documentation":"tab_bar_margin_height expects exactly two whitespace-separated positive numbers (vertical horizontal). When the value does not split into exactly 2 parts, kitty logs this warning and falls back to TabBarMarginHeight() (zero margins).","triggerScenarios":"tab_bar_margin_height with 0, 1, or 3+ tokens, e.g. 'tab_bar_margin_height 10' or 'tab_bar_margin_height 10 5 2', or a non-numeric token which will also fail positive_float.","commonSituations":"Assuming the option takes a single number like other margin options; copy-pasting multi-line values; using 'none' or units like '10px'.","solutions":["Provide exactly two positive floats: tab_bar_margin_height <vertical> <horizontal>.","Example: tab_bar_margin_height 10 5","Avoid units and negative values."],"exampleFix":"# before\ntab_bar_margin_height 10\n\n# after\ntab_bar_margin_height 10 5","handlingStrategy":"validation","validationCode":"def valid_tbmh(x: str) -> bool:\n    parts = x.split()\n    return len(parts) == 2 and all(p.replace('.','',1).isdigit() and float(p) > 0 for p in parts)","typeGuard":"def is_two_positive_floats(x: str) -> bool:\n    p = x.split()\n    return len(p) == 2 and all(float(t) > 0 for t in p if t.lstrip('-').replace('.','',1).isdigit()) and len(p) == 2","tryCatchPattern":null,"preventionTips":["Always specify both vertical and horizontal margins","Use plain positive numbers without units"],"tags":["kitty","config","tab-bar","margin"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}