Summary #
The event loop now stores mouse events via editor:set_mouse_event() and dispatches mouse tokens via keybindings that call editor:mouse_event(), but these methods may not be defined.
The Problem #
In src/cursed/editor.lua, fields _mouse_event and _mouse_token are declared, but the diff does not show the definition of set_mouse_event(me) and mouse_event() methods. The event loop (main.lua) calls editor:set_mouse_event(me) and the keybinding commands (e.g., mouse_set_point) presumably call editor:mouse_event(). If these methods are not defined elsewhere, mouse dispatch will fail at runtime.
Impact #
- correctness: Editor may be missing required set_mouse_event/mouse_event methods, which could cause runtime errors on mouse actions if not defined elsewhere.
Recommended Fix #
Add the missing methods to Editor (in editor.lua or a submodule). set_mouse_event should store the event table; mouse_event should return it.
Commit range: 335f21a5..335f21a5
Code Review: CR-2026-07-25-3