Skip to content

fulcrum

FreeBodyEngine.cli.fulcrum #

A small terminal based text editor for the FreeBodyEngine CLI.

fulcrum_editor(stdscr, filepath) #

Runs a minimal curses-based line editor on filepath inside stdscr: arrow keys to move the cursor, Enter to split a line, Backspace to merge lines, Ctrl+S to save, Ctrl+C to quit. Loads the file's existing contents up front (starting from a single empty line if it doesn't exist yet, or is empty) and writes them back out verbatim, newline-joined, on save.

fulcrum_handler(env, args) #

fb fulcrum handler: opens args[0] (relative to env.path) in the curses editor, swallowing Ctrl+C so quitting doesn't surface as a CLI traceback.