{"record":{"id":"c5bd8d8ce137893a","repo":"kovidgoyal/kitty","slug":"resize-window-needs-one-or-two-arguments-using-de","errorCode":null,"errorMessage":"resize_window needs one or two arguments, using defaults","messagePattern":"resize_window needs one or two arguments, using defaults","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":298,"sourceCode":"        log_error('Ignoring invalid paste string: ' + rest)\n    return func, [text]\n\n\n@func_with_args('neighboring_window')\ndef neighboring_window(func: str, rest: str) -> FuncArgsType:\n    rest = rest.lower()\n    rest = {'up': 'top', 'down': 'bottom'}.get(rest, rest)\n    if rest not in ('left', 'right', 'top', 'bottom'):\n        log_error(f'Invalid neighbor specification: {rest}')\n        rest = 'right'\n    return func, [rest]\n\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:","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L280-L316","documentation":"The resize_window action got more than two arguments; kitty discards them and uses defaults ['wider', 1].","triggerScenarios":"`map f1 resize_window taller 2 extra` — rest.strip().split(maxsplit=1) still leaves extra tokens, i.e. len(vals) > 2 is detected when more than two whitespace-separated tokens are present.","commonSituations":"Copy-paste errors or misunderstanding the syntax and adding unit suffixes like `resize_window taller 2 px`.","solutions":["Use at most two arguments: resize_window <reset|taller|shorter|wider|narrower> [increment]","Remove any extra tokens after the increment"],"exampleFix":"# before\nmap f1 resize_window taller 2 cells\n# after\nmap f1 resize_window taller 2","handlingStrategy":"validation","validationCode":"tokens = 'taller 2'.split()\nok = 1 <= len(tokens) <= 2","typeGuard":null,"tryCatchPattern":null,"preventionTips":["resize_window takes exactly quality plus optional integer increment","Don't append units to the increment"],"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"}