From 260c64a0fd974511c1d349ff4dfb65f5dba8d7ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 19 Jul 2026 08:35:52 +0000 Subject: [PATCH] chore: release version bump --- .changeset/fix-a11y-change-duplication.md | 10 -------- .changeset/fix-g-z-prefix-command-lookup.md | 11 --------- .changeset/fix-ime-composition-corruption.md | 14 ------------ packages/core/CHANGELOG.md | 12 ++++++++++ packages/core/package.json | 2 +- packages/renderer-vecto/CHANGELOG.md | 24 ++++++++++++++++++++ packages/renderer-vecto/package.json | 4 ++-- 7 files changed, 39 insertions(+), 38 deletions(-) delete mode 100644 .changeset/fix-a11y-change-duplication.md delete mode 100644 .changeset/fix-g-z-prefix-command-lookup.md delete mode 100644 .changeset/fix-ime-composition-corruption.md diff --git a/.changeset/fix-a11y-change-duplication.md b/.changeset/fix-a11y-change-duplication.md deleted file mode 100644 index a43d03b..0000000 --- a/.changeset/fix-a11y-change-duplication.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@vemjs/renderer-vecto': patch ---- - -Fix text duplication on i/a after ESC: the a11y change handler was -processing single-key values from the shadow textarea as INSERT mode -input, duplicating the first character of every new INSERT session -(e.g. pressing i entered INSERT mode but also inserted "i" as text, -and after an edit, pressing i/ESC/i replayed the entire previous edit -via the change/value cycle). diff --git a/.changeset/fix-g-z-prefix-command-lookup.md b/.changeset/fix-g-z-prefix-command-lookup.md deleted file mode 100644 index b46a302..0000000 --- a/.changeset/fix-g-z-prefix-command-lookup.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@vemjs/core': patch ---- - -Fix a major bug where every g/z/Z/bracket two-key prefix command except `gg` silently failed: `gu`, `gU`, `gq`, `gJ`, `ga`, `g8`, `gf`, `gv`, `gi`, `g;`, `g,`, `zz`, `zt`, `zb`, `ZZ`, `ZQ`, `[[`, `]]`, `[]`, `][` all resolved to `isValid: false` and did nothing when pressed. - -Root cause: the parser's lookup tables for these commands (`gPrefixCommands`, `zPrefixCommands`, `ZPrefixCommands`) are keyed by the second character only (e.g. `gPrefixCommands.u === 'gu'`), but the lookups indexed them by the full two-character sequence (`gPrefixCommands['gu']`) — a key that never exists in any of these tables, so the lookup was always `undefined`. `gg` appeared to work only because it has a separately hardcoded motion check that never depended on the broken lookup at all, which is exactly why this went unnoticed for so long. - -Also fixes `bracketPrefixCommands`, which additionally had wrong _values_ (`]]` resolved to command `[]`, `][` resolved to `[[`) independent of the lookup-key bug. - -Added a dedicated regression test suite (`g/z/Z/bracket two-key prefix commands`) covering every command in NORMAL, VISUAL, and after-operator contexts, verified to fail against the pre-fix parser and pass against the fix. diff --git a/.changeset/fix-ime-composition-corruption.md b/.changeset/fix-ime-composition-corruption.md deleted file mode 100644 index ed3c111..0000000 --- a/.changeset/fix-ime-composition-corruption.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@vemjs/renderer-vecto': patch ---- - -Fix severe text corruption bug: typing in INSERT mode (including pressing `i`/`a` to enter it, or pressing Enter for newlines) could duplicate or scramble large portions of the buffer under real network/rendering latency. - -Root cause: the previous IME-composition detection trusted a `composition` field forwarded by `@vectojs/core`'s accessibility layer on every `change`/`input` event from the shadow textarea. That field is `null` both for a just-committed IME composition AND for an ordinary direct keystroke — the two cases are indistinguishable from the event payload alone. Under load (slow page load, a11y sync racing with keydown), a queued `change` event carrying stale/full buffer text was misidentified as a composition commit and re-inserted verbatim, producing the reported "typing anything returns a long garbled string" and "same file opens with duplicated content" symptoms. - -Fix: attach dedicated `compositionstart`/`compositionend` listeners directly on the shadow textarea and track composition state ourselves. Only the one `change` event that fires synchronously inside `compositionend`'s own listener chain (the real IME commit) is ever inserted as text; every other `change` event — regardless of its `value` or `composition` field — is ignored, since direct key input is already fully handled by the `keydown` handler. Verified with a stress test that previously reproduced heavy corruption (10-line typed loop, numeric input, ESC/re-enter INSERT) — all pass cleanly now. - -Also includes two smaller fixes bundled in this release: - -- `zz`/`zb` no longer collapse to a 1-line scroll fallback when `visibleLines` hasn't synced yet (falls back to `halfPageLines`). -- The text-render clip region now reserves the bottom 30px for the status/command bar, so scrolled buffer text can no longer paint underneath the ruler or overlap the command-mode input line. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6f56f71..c2b6d56 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @vemjs/core +## 0.8.1 + +### Patch Changes + +- 25a89df: Fix a major bug where every g/z/Z/bracket two-key prefix command except `gg` silently failed: `gu`, `gU`, `gq`, `gJ`, `ga`, `g8`, `gf`, `gv`, `gi`, `g;`, `g,`, `zz`, `zt`, `zb`, `ZZ`, `ZQ`, `[[`, `]]`, `[]`, `][` all resolved to `isValid: false` and did nothing when pressed. + + Root cause: the parser's lookup tables for these commands (`gPrefixCommands`, `zPrefixCommands`, `ZPrefixCommands`) are keyed by the second character only (e.g. `gPrefixCommands.u === 'gu'`), but the lookups indexed them by the full two-character sequence (`gPrefixCommands['gu']`) — a key that never exists in any of these tables, so the lookup was always `undefined`. `gg` appeared to work only because it has a separately hardcoded motion check that never depended on the broken lookup at all, which is exactly why this went unnoticed for so long. + + Also fixes `bracketPrefixCommands`, which additionally had wrong _values_ (`]]` resolved to command `[]`, `][` resolved to `[[`) independent of the lookup-key bug. + + Added a dedicated regression test suite (`g/z/Z/bracket two-key prefix commands`) covering every command in NORMAL, VISUAL, and after-operator contexts, verified to fail against the pre-fix parser and pass against the fix. + ## 0.7.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index cec18bf..78be031 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@vemjs/core", - "version": "0.8.0", + "version": "0.8.1", "description": "Pure state machine for the Vem modal text editor", "type": "module", "main": "./dist/index.js", diff --git a/packages/renderer-vecto/CHANGELOG.md b/packages/renderer-vecto/CHANGELOG.md index 26b4b78..4fb1c10 100644 --- a/packages/renderer-vecto/CHANGELOG.md +++ b/packages/renderer-vecto/CHANGELOG.md @@ -1,5 +1,29 @@ # @vemjs/renderer-vecto +## 0.4.24 + +### Patch Changes + +- 611a44c: Fix text duplication on i/a after ESC: the a11y change handler was + processing single-key values from the shadow textarea as INSERT mode + input, duplicating the first character of every new INSERT session + (e.g. pressing i entered INSERT mode but also inserted "i" as text, + and after an edit, pressing i/ESC/i replayed the entire previous edit + via the change/value cycle). +- c391639: Fix severe text corruption bug: typing in INSERT mode (including pressing `i`/`a` to enter it, or pressing Enter for newlines) could duplicate or scramble large portions of the buffer under real network/rendering latency. + + Root cause: the previous IME-composition detection trusted a `composition` field forwarded by `@vectojs/core`'s accessibility layer on every `change`/`input` event from the shadow textarea. That field is `null` both for a just-committed IME composition AND for an ordinary direct keystroke — the two cases are indistinguishable from the event payload alone. Under load (slow page load, a11y sync racing with keydown), a queued `change` event carrying stale/full buffer text was misidentified as a composition commit and re-inserted verbatim, producing the reported "typing anything returns a long garbled string" and "same file opens with duplicated content" symptoms. + + Fix: attach dedicated `compositionstart`/`compositionend` listeners directly on the shadow textarea and track composition state ourselves. Only the one `change` event that fires synchronously inside `compositionend`'s own listener chain (the real IME commit) is ever inserted as text; every other `change` event — regardless of its `value` or `composition` field — is ignored, since direct key input is already fully handled by the `keydown` handler. Verified with a stress test that previously reproduced heavy corruption (10-line typed loop, numeric input, ESC/re-enter INSERT) — all pass cleanly now. + + Also includes two smaller fixes bundled in this release: + + - `zz`/`zb` no longer collapse to a 1-line scroll fallback when `visibleLines` hasn't synced yet (falls back to `halfPageLines`). + - The text-render clip region now reserves the bottom 30px for the status/command bar, so scrolled buffer text can no longer paint underneath the ruler or overlap the command-mode input line. + +- Updated dependencies [25a89df] + - @vemjs/core@0.8.1 + ## 0.4.16 ### Patch Changes diff --git a/packages/renderer-vecto/package.json b/packages/renderer-vecto/package.json index d3304b9..5a0dfd5 100644 --- a/packages/renderer-vecto/package.json +++ b/packages/renderer-vecto/package.json @@ -1,6 +1,6 @@ { "name": "@vemjs/renderer-vecto", - "version": "0.4.23", + "version": "0.4.24", "description": "VectoUI integration renderer for the Vem text editor", "type": "module", "main": "./dist/index.js", @@ -14,7 +14,7 @@ "dependencies": { "@vectojs/core": "^1.11.1", "@vectojs/ui": "^1.11.0", - "@vemjs/core": "^0.8.0" + "@vemjs/core": "^0.8.1" }, "publishConfig": { "access": "public"