2 Commits

Author SHA1 Message Date
Ed Zynda 7747fc2033 fix: keep vim interceptor active in both modes so Esc returns to normal
The interceptor now stays installed for the entire vim session, handling
both normal and insert modes. Esc switches from insert back to normal,
and /vim toggles the entire interceptor on/off.
2026-02-28 17:54:28 +03:00
Ed Zynda 864230bd0a feat: add editor interceptor system for extensions
Extensions can now intercept key events and wrap the editor's rendered
output via ctx.SetEditor/ctx.ResetEditor, enabling vim-like modal
editing, custom key bindings, and visual decorators.

Key fixes during development:
- Yaegi requires closure wrappers for struct function fields (bare
  function references return zero values across the interpreter boundary)
- SetEditor/ResetEditor use async NotifyWidgetUpdate to avoid deadlocking
  BubbleTea's event loop when called from HandleKey callbacks
- distributeHeight now uses renderInput() to account for interceptor
  Render wrapper in height calculations
2026-02-28 17:46:41 +03:00