Skip to main content

Module inline_editor

Module inline_editor 

Source
Expand description

Inline text editor for the TUI file explorer.

Provides a minimal, modal-free text editor that can open, display, edit, and save plain-text files directly inside the terminal UI. Only files up to [MAX_EDIT_FILE_SIZE] bytes are accepted — anything larger is rejected to avoid freezing the terminal.

§Key bindings

KeyAction
Arrow keysMove cursor
Home / EndJump to beginning / end of line
PgUp / PgDnScroll one page (20 lines)
PrintableInsert character at cursor
EnterSplit line at cursor
BackspaceDelete char before cursor / join lines
DeleteDelete char at cursor / join lines
TabInsert 4 spaces
Ctrl+SSave to disk
EscExit the editor

Structs§

InlineEditor
A simple, single-file text editor that lives inside the TUI.

Enums§

EditorAction
Result of handling a key event in the inline editor.

Functions§

render_inline_editor
Render the inline editor into the given area.