Repository navigation
P928: TextArea editing ownership for embedded Neovim; delete Vim subset - #208
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
added a commit
that referenced
this pull request
Oct 29, 2026
This merge (7ba616b) removed VimInsert and LineMotion while Toad main still imports them, so Toad main stopped building and every install of current main failed before cutover. Its Toad half, toad#1320, is not ready: on real nvim 0.12.4 the embedded engine dies on its first redraw (neovim_editing.py:601 decodes msgpack ExtType as JSON). Four merged fixes were waiting behind it. #208 re-lands together with #1320 once the engine passes the real-nvim qualification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dR85kyFKcc2tQAJLhK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary — remove the handwritten Vim interpreter
7 commits beyond fetched main; 15 files, +291/-936 (net -645). The 765-line
_editing.pybecomes 157 lines. Deleted 26 command declarations and the 62-line private motion/word geometry; removed separate linewise clipboard/catalog behavior rather than keeping a compatibility copy.Paired with Toad #1320: 17 commits, 13 files, +1,328/-129.
Current source pair:
7435e87eb733bd259a55856d12bc5552322f63f0b2d0218b0af3ed0ba83a684527de224a94a961e6Source checkpoint only. P928 is not accepted, installed or live-qualified. Keep the two PRs together; root reviewed the earlier document-owner change at 46df7c0 as OK, not this new head or the whole user workflow.
Before / after ownership
The abstractions carry real work: Toad's ordinary display and native arrow callback now call the same synchronous session publication method. It projects all preceding lines through DocumentBase before exposing the corresponding state. TextArea finishes the view batch once afterward. Render cannot mutate the document to catch up.
Document lifetime is not widget lifetime
A retained editor keeps the actual document reference, not an unmounted widget. Line and full-buffer changes while hidden update that same object; a full transfer no longer replaces it and leaves TextAreaState holding the orphaned predecessor. Reopening adopts it through set_document before using the retained mode. Native document construction and retained restore use the same width-dependent view factory.
restore_editor_state closes an unused temporary mode without a refusal that leaves half a tab. Generic paint_selection installs the saved view selection without sending it back as an engine command. It runs before the retained mode reattaches, so the current engine cursor wins. In Toad the UnpaintedSnapshot baseline survives a pending line batch, and forces no fabricated cursor/label values or extra flag.
The old apply_engine_text/apply_engine_lines/apply_engine_selection names have no remaining callers across the paired src/tests/tools roots. No aliases preserve the superseded API.
Generic editing capability, Standard unchanged
_line_cache.Remaining paired work and actual evidence
The current Neovim display still eagerly walks every selected row through getregion/getregionpos. The next ordered change removes regions/text from the wire, replacing them with compact native endpoints and a declared kind family. It derives visible painting and on-demand copy from the now-coherent document. Native exclusive-selection policy, virtual-cell bounds and a cell-span paint capability are required for honest partial-tab/wide-character support. This is open work, not a performance result.
Retained NRA source inventory parsed 566 production modules with zero omissions; dynamic binding identities and Lua/C were read separately. Pushed refs were verified and owned diff checks passed. No author pytest, synthetic app, replacement-head checker, new environment or provider request was run.
Textual #208 previously had no check runs despite Actions enabled. Reading no checks is not reading a pass. Toad 237bc5a58/run40927791764 has suite/debt FAILURE; older e9c7917ae retained 23 type-error growth and seven current-main screen/sidebar string identities relative to an older workflow base. Current-head results and paired diagnostics are not declared green. Locked main Textual lacks this paired API and caused earlier Toad collection failure.
Root now owns the combined real-editor qualification under its existing lease: pending-input refusal/Escape; interleaved queued edits; actual fast-arrow/deferred-operation execution order; remapped history/operands; asynchronous line changes; accepted-display Visual burst/getregion agreement; zero line applications in render; Unicode/visual/block/copy/paste; counts/dot/undo/redo; Ex/search; saved capture and hidden full-buffer transfer/return; Standard/profile restoration; acknowledged submit and teardown. Partial-cell painting and the compact selection change remain unfinished. Existing queued-history-control.md describes the new cases; it is not a test result.
After complete paired acceptance: land this PR with #1320, refresh Toad's main-tracking Textual lock, read actual hosted results, then install and verify the live prompt. Do not reuse the rejected parent's B/o evidence.
Assumed: integration/root owns combined source diagnostics, actual run, dependency integration and installation. This PR supplies no acceptance claim for the remaining whole workflow.