{"record":{"id":"75d45e08930b251b","repo":"kovidgoyal/kitty","slug":"canceled-by-user-75d45e","errorCode":null,"errorMessage":"canceled by user","messagePattern":"canceled by user","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"kittens/choose_fonts/ui.go","lineNumber":204,"sourceCode":"\tredraw_needed := false\n\tif h.mouse_state.UpdateState(event) {\n\t\tredraw_needed = true\n\t}\n\tif event.Event_type == loop.MOUSE_CLICK && event.Buttons&loop.LEFT_MOUSE_BUTTON != 0 {\n\t\tif err = h.mouse_state.ClickHoveredRegions(); err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tif redraw_needed && rc == h.render_count {\n\t\terr = h.draw_screen()\n\t}\n\treturn\n}\n\nfunc (h *handler) on_key_event(event *loop.KeyEvent) (err error) {\n\tif event.MatchesPressOrRepeat(\"ctrl+c\") {\n\t\tevent.Handled = true\n\t\treturn fmt.Errorf(\"canceled by user\")\n\t}\n\tif h.current_pane != nil {\n\t\terr = h.current_pane.on_key_event(event)\n\t}\n\treturn\n}\n\nfunc (h *handler) on_text(text string, from_key_event bool, in_bracketed_paste bool) (err error) {\n\tif h.current_pane != nil {\n\t\terr = h.current_pane.on_text(text, from_key_event, in_bracketed_paste)\n\t}\n\treturn\n}\n\nfunc (h *handler) on_escape_code(etype loop.EscapeCodeType, payload []byte) error {\n\tswitch etype {\n\tcase loop.APC:\n\t\tgc := graphics.GraphicsCommandFromAPC(payload)","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/choose_fonts/ui.go#L186-L222","documentation":"The choose_fonts kitten handler returns this error when the user presses ctrl+c, aborting the font chooser. It is the deliberate user-cancellation signal, not a bug.","triggerScenarios":"Pressing ctrl+c while the choose_fonts kitten UI is focused.","commonSituations":"User exiting the font chooser to abort without applying a font.","solutions":["No fix needed; it is intentional cancellation behavior","If cancellation should be quieter, handle this error at the caller and exit gracefully"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := h.on_key_event(ev)\nif err != nil && err.Error() == \"canceled by user\" { os.Exit(130) } // standard SIGINT exit code","preventionTips":["Treat 'canceled by user' as an expected exit path, exit code 130","Don't retry automatically after user cancellation"],"tags":["kitty","user-cancellation","ctrl-c","choose-fonts"],"backgroundTag":"user-cancelled-operation","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}