Files
RedBear-OS/local/recipes
vasilito 833509a979 tlc: phase 20 wire-up — F9 menubar fully integrated
Connect the standalone editor::menubar module into the editor's
main loop:

  editor/mod.rs:
    - Add menubar: Option<EditorMenuBar> field on Editor struct
    - Init menubar: None in both Editor::open and Editor::new_empty
    - Add dispatch_editor_cmd(cmd) -> EditorResult, mapping
      EditorCmd to existing editor methods:
        Undo, Redo, Cut, Copy, Paste, GotoTop, GotoBottom,
        BookmarkToggle (opens BookmarkSet prompt),
        BookmarkClearAll, GotoLine (opens GotoLine prompt).
      Not yet wired (New, Open, Save, SaveAs, Quit, Find,
      FindNext, FindPrev, Replace, BookmarkNext/Prev, Settings)
      surface 'F9: ... (not yet wired)' message.

  editor/handlers.rs:
    - At top of handle_key, route through menubar when Some
      (Esc/F9 → Close, Enter → Dispatch, arrows/hotkeys → Running).
    - F9 keybind opens menubar.

  editor/render.rs:
    - When menubar is Some, split area into [Length(1) menubar,
      Min(1) editor]. Pass lower area as editor_area to existing
      layout, replacing two 'area' references with 'editor_area'.

Tests: 1132 passed (was 1129, +3 handler tests covering open,
Esc-close, dispatch-undo integration end-to-end).

Ref: MC src/editor/editmenu.c (six menus), editor handle_key
routing precedence for menubar overlay (matches filemanager).
2026-06-20 20:40:44 +03:00
..
2026-06-18 20:46:44 +03:00