Skip to content

Conversation

@coxxny
Copy link
Contributor

@coxxny coxxny commented Nov 1, 2025

What this PR does / why we need it:

Aligns dot-repeat behavior with Vim semantics: . should only repeat the last editing (buffer-changing) action and must not replay Ex commands.
Currently, . can replay Ex commands (e.g., :bn, :b<number>, :ls, :pwd), which causes unintended navigation and breaks common “edit → .” workflows. This PR consolidates the rule so that all Ex commands are excluded from dot-repeat.

Scope & notes

Which issue(s) this PR fixes

Fixes #9807

Special notes for your reviewer:

Build & Test evidence

Build log (yarn build)
yarn run v1.22.22
$ gulp build
(node:155189) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[16:10:30] Using gulpfile ~/document/repositories/Vim/gulpfile.js
[16:10:30] Starting 'build'...
[16:10:30] Starting 'webpack'...
[16:10:47] asset extension.js 956 KiB [emitted] [minimized] (name: main) 1 related asset
orphan modules 73.5 KiB [orphan] 15 modules
runtime modules 793 bytes 4 modules
cacheable modules 2.63 MiB
  modules by path ./src/ 1.39 MiB 162 modules
  modules by path ./node_modules/ 1.19 MiB 137 modules
  modules by path ./*.ts 27 KiB
    ./extension.ts 3.63 KiB [built] [code generated]
    ./extensionBase.ts 23.4 KiB [built] [code generated]
  ./package.json 32.7 KiB [built] [code generated]
+ 17 modules
webpack 5.102.0 compiled successfully in 15676 ms

asset extensionWeb.js 2.17 MiB [emitted] [minimized] (name: main) 1 related asset
runtime modules 344 bytes 2 modules
modules by path ./src/ 1.34 MiB 155 modules
modules by path ./node_modules/ 663 KiB
  ./node_modules/process/browser.js 5.29 KiB [built] [code generated]
  ./node_modules/parsimmon/build/parsimmon.umd.min.js 14.9 KiB [built] [code generated]
  ./node_modules/path-browserify/index.js 15.8 KiB [built] [code generated]
  ./node_modules/lodash/lodash.js 531 KiB [built] [code generated]
  ./node_modules/queue/index.js 4.03 KiB [built] [code generated]
  ./node_modules/untildify/index.js 331 bytes [built] [code generated]
  + 4 modules
modules by path ./*.ts 24 KiB
  ./extensionWeb.ts 682 bytes [built] [code generated]
  ./extensionBase.ts 23.4 KiB [built] [code generated]
external "vscode" 42 bytes [built] [code generated]
./package.json 32.7 KiB [built] [code generated]
webpack 5.102.0 compiled successfully in 8207 ms
[16:10:47] Finished 'webpack' after 17 s
[16:10:47] Starting 'commit-hash'...
[16:10:47] Finished 'commit-hash' after 12 ms
[16:10:47] Finished 'build' after 17 s
Done in 18.86s.
Test log (tail of npx gulp test)
    ✔ s+[num]
    ✔ s-[num]
    ✔ b
    ✔ b+
    ✔ b-
    ✔ b[num]
    ✔ b+[num]
    ✔ b-[num]
  3088 passing (2m)
  10 pending
[main 2025-11-01T07:17:40.401Z] Extension host with pid 220 exited with code: 0, signal: unknown.
Exit code:   0

behavior after this change

example1.txt.-.test.-.Visual.Studio.Code.2025-11-01.16-32-42.mp4

@coxxny
Copy link
Contributor Author

coxxny commented Nov 4, 2025

@J-Fields
This change may increase the occurrence of the freezes mentioned in PR #9809, so please merge it before this PR.
The problem is fixed in that PR.

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.

[Spec]Dot repeat (.) incorrectly replays non-editing Ex commands like :bn, :<number>, :pwd

1 participant