Skip to content

fix: align input editor with message content padding#791

Closed
ferologics wants to merge 1 commit intobadlogic:mainfrom
ferologics:fix/editor-padding-alignment
Closed

fix: align input editor with message content padding#791
ferologics wants to merge 1 commit intobadlogic:mainfrom
ferologics:fix/editor-padding-alignment

Conversation

@ferologics
Copy link
Copy Markdown
Contributor

Adds paddingX option to the TUI Editor component and hardcodes paddingX: 1 in coding-agent editors so the cursor/text aligns with chat message content.

Changes

@mariozechner/pi-tui

  • Added EditorOptions interface with optional paddingX property
  • Editor constructor now accepts optional EditorOptions third parameter
  • Render logic calculates contentWidth and applies left/right padding to all lines including autocomplete

@mariozechner/pi-coding-agent

  • CustomEditor and ExtensionEditorComponent pass through EditorOptions
  • Hardcoded { paddingX: 1 } when creating editors to match Markdown component's paddingX=1

Before/After

The input editor text now starts at the same column as message content instead of flush left.

@ferologics ferologics force-pushed the fix/editor-padding-alignment branch from 1d43b2f to 60b8abf Compare January 16, 2026 21:42
Adds paddingX option to Editor component and hardcodes paddingX: 1 in
coding-agent editors so the cursor/text aligns with chat message content.
@ferologics ferologics force-pushed the fix/editor-padding-alignment branch from 60b8abf to 593b9c3 Compare January 16, 2026 21:43
@badlogic
Copy link
Copy Markdown
Owner

Merged, thanks @ferologics!

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.

2 participants