{"record":{"id":"ce3d260d505dfb46","repo":"kovidgoyal/kitty","slug":"invalid-increment-specification-vals-1","errorCode":null,"errorMessage":"Invalid increment specification: {vals[1]}","messagePattern":"Invalid increment specification: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":310,"sourceCode":"\n\n@func_with_args('resize_window')\ndef resize_window(func: str, rest: str) -> FuncArgsType:\n    vals = rest.strip().split(maxsplit=1)\n    if len(vals) > 2:\n        log_error('resize_window needs one or two arguments, using defaults')\n        args = ['wider', 1]\n    else:\n        quality = vals[0].lower()\n        if quality not in ('reset', 'taller', 'shorter', 'wider', 'narrower'):\n            log_error(f'Invalid quality specification: {quality}')\n            quality = 'wider'\n        increment = 1\n        if len(vals) == 2:\n            try:\n                increment = int(vals[1])\n            except Exception:\n                log_error(f'Invalid increment specification: {vals[1]}')\n        args = [quality, increment]\n    return func, args\n\n\n@func_with_args('move_window')\ndef move_window(func: str, rest: str) -> FuncArgsType:\n    rest = rest.lower()\n    rest = {'up': 'top', 'down': 'bottom'}.get(rest, rest)\n    prest: int | str = rest\n    try:\n        prest = int(prest)\n    except Exception:\n        if prest not in ('left', 'right', 'top', 'bottom'):\n            log_error(f'Invalid move_window specification: {rest}')\n            prest = 0\n    return func, [prest]\n\n","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L292-L328","documentation":"The second argument to resize_window could not be parsed as an integer; kitty keeps the default increment of 1.","triggerScenarios":"`map f1 resize_window wider two` — int(vals[1]) raises ValueError, the message reports the offending token.","commonSituations":"Writing the increment as a word, or including a unit/type suffix like '2px' or '3 rows'.","solutions":["Use a plain integer for the increment, e.g. `resize_window wider 3`","Strip any unit suffixes from the number"],"exampleFix":"# before\nmap f1 resize_window wider 2px\n# after\nmap f1 resize_window wider 2","handlingStrategy":"validation","validationCode":"ok = '2'.lstrip('+-').isdigit()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Increment must be a bare integer","Avoid unit suffixes like px/lines"],"tags":["kitty","config","window-resize","parser"],"backgroundTag":"invalid-config-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}