Skip to content

Edit tasks with $EDITOR (CLI + TUI) - #109

Open
netikular wants to merge 16 commits into
webstonehq:mainfrom
Paradem:pr/editor-integration
Open

Edit tasks with $EDITOR (CLI + TUI)#109
netikular wants to merge 16 commits into
webstonehq:mainfrom
Paradem:pr/editor-integration

Conversation

@netikular

Copy link
Copy Markdown

Closes #106

Adds tuxedo edit N CLI command and E TUI keybinding that open a task's raw text in $EDITOR for full editing. Terminal suspend/restore uses ratatui::restore() + ratatui::try_init(). Temp files named *.todo.txt for syntax highlighting plugins. Existing inline editing (e/i) is untouched.

netikular added 16 commits July 22, 2026 14:28
After launching nvim and restoring the terminal, the ratatui
Terminal object's back buffer still holds the pre-editor frame.
Since Terminal::draw() diffs against the back buffer, it produces
an incomplete update — garbling the screen.

Fix: set a needs_clear flag in launch_editor() and call
terminal.clear() in run() before the next draw, which resets the
back buffer and sends a hardware clear to force a full redraw.
Replaces raw crossterm calls with ratatui::restore() + ratatui::try_init()
in both editor paths (open_path_in_editor and LaunchEditor). Creates a
brand-new Terminal with a clean back buffer instead of relying on
partial clearing, which caused stale buffer diffs after editor exit.

Also refactors LaunchEditor to delegate terminal handling to run()
where the Terminal object is accessible, matching the existing
open_path_in_editor pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Edit tasks with $EDITOR

1 participant