{"record":{"id":"91a9404540ba8f48","repo":"kovidgoyal/kitty","slug":"invalid-move-window-specification-rest","errorCode":null,"errorMessage":"Invalid move_window specification: {rest}","messagePattern":"Invalid move_window specification: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":324,"sourceCode":"        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\n@func_with_args('pipe')\ndef pipe(func: str, rest: str) -> FuncArgsType:\n    r = list(shlex_split(rest))\n    if len(r) < 3:\n        log_error('Too few arguments to pipe function')\n        r = ['none', 'none', 'true']\n    return func, r\n\n\n@func_with_args('set_colors')\ndef set_colors(func: str, rest: str) -> FuncArgsType:\n    r = list(shlex_split(rest))\n    if len(r) < 1:\n        log_error('Too few arguments to set_colors function')","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L306-L342","documentation":"The move_window argument is neither an integer (window number) nor one of left/right/top/bottom; kitty falls back to 0 (move to window 0 / no-op depending on layout).","triggerScenarios":"`map f1 move_window diagonal` — int() fails and the string isn't a valid direction.","commonSituations":"Expecting direction names beyond the four sides, or typos in a numeric target.","solutions":["Use an integer window number or one of: left, right, top, bottom (up/down are aliases)","Fix typos in the argument"],"exampleFix":"# before\nmap f1 move_window diag\n# after\nmap f1 move_window left","handlingStrategy":"validation","validationCode":"arg = 'left'\ntry:\n    int(arg); ok = True\nexcept ValueError:\n    ok = arg in ('left','right','top','bottom')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["move_window accepts an integer or one of four directions only","Fix typos before reloading config"],"tags":["kitty","config","window-move","parser"],"backgroundTag":"invalid-config-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}