Skip to content

Support completion edits in text controls - #1

Merged
andreespirela merged 1 commit into
mainfrom
codex/editor-completion
Oct 4, 2026
Merged

andreespirela merged 1 commit into
mainfrom
codex/editor-completion

Conversation

@andreespirela

@andreespirela andreespirela commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Text controls need to replace the identifier at the caret without replacing the whole draft or losing focus. Add Node::replace_range with grapheme-boundary and edit-limit validation, and expose on:select for caret and selection changes.

Dispatch keydown before Tab traversal so completion menus can accept a suggestion. Place the caret on mouse clicks using the rendered content box and retained scroll offsets. The existing consumer contract exercises replacement, Unicode boundaries, limits, default Tab traversal, and pointer placement.

Validation: just check (formatting, workspace tests, Clippy, documentation, consumer contracts, generated starter, package archives, and Rust 1.85).

This supplies the editor APIs used by SQL Bomb's in-process SQL completion. The patch contains only the editor changes and their contract documentation; net +194 lines.

@andreespirela
andreespirela merged commit 9d0b1d9 into main Oct 4, 2026
6 checks passed
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.

1 participant