{"record":{"id":"787a7cdf5be8c2ea","repo":"kovidgoyal/kitty","slug":"cursor-trail-start-threshold-must-have-1-or-2-valu","errorCode":null,"errorMessage":"cursor_trail_start_threshold must have 1 or 2 values, got: {x!r}","messagePattern":"cursor_trail_start_threshold must have 1 or 2 values, got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":667,"sourceCode":"        return cshapes_unfocused[x.lower()]\n    except KeyError:\n        raise ValueError('Invalid unfocused cursor shape: {} allowed values are {}'.format(x, ', '.join(cshapes_unfocused)))\n\n\ndef cursor_trail_decay(x: str) -> tuple[float, float]:\n    fast, slow = map(positive_float, x.split())\n    slow = max(slow, fast)\n    return fast, slow\n\n\ndef cursor_trail_start_threshold(x: str) -> tuple[int, int]:\n    parts = x.split()\n    if len(parts) == 1:\n        val = positive_int(parts[0])\n        return val, val\n    if len(parts) == 2:\n        return positive_int(parts[0]), positive_int(parts[1])\n    raise ValueError(f'cursor_trail_start_threshold must have 1 or 2 values, got: {x!r}')\n\n\ndef scrollback_lines(x: str) -> int:\n    ans = int(x)\n    if ans < 0:\n        ans = 2**32 - 1\n    return ans\n\n\ndef scrollback_pager_history_size(x: str) -> int:\n    ans = int(max(0, float(x)) * 1024 * 1024)\n    return min(ans, 4096 * 1024 * 1024 - 1)\n\n\n# \"single\" for backwards compat\nurl_style_map = {'none': 0, 'single': 1, 'straight': 1, 'double': 2, 'curly': 3, 'dotted': 4, 'dashed': 5}\n\n","sourceCodeStart":649,"sourceCodeEnd":685,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L649-L685","documentation":"cursor_trail_start_threshold raises this when the option value does not have exactly 1 or 2 whitespace-separated positive integers. One value sets both x and y thresholds; two set them separately (default 2 2 in pixels).","triggerScenarios":"cursor_trail_start_threshold 2,2 (commas), 0 -5 (non-positive fails positive_int), or three values.","commonSituations":"Using comma separators, zero/negative thresholds, or copy-paste errors from other pixel options.","solutions":["Provide one or two space-separated positive integers","Restore default: cursor_trail_start_threshold 2 2"],"exampleFix":"# before\ncursor_trail_start_threshold 2,2\n# after\ncursor_trail_start_threshold 2 2","handlingStrategy":"validation","validationCode":"def valid_threshold(x: str) -> bool:\n    parts = x.split()\n    return len(parts) in (1,2) and all(p.isdigit() and int(p) > 0 for p in parts)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["One or two positive integers, space separated","No commas"],"tags":["kitty","config","cursor-trail"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}