Skip to content

Don't end macro recording on a q that is another key's argument - #282

Open
jiaxuan wants to merge 1 commit into
replit:masterfrom
jiaxuan:fix-q-as-argument-while-recording
Open

jiaxuan wants to merge 1 commit into
replit:masterfrom
jiaxuan:fix-q-as-argument-while-recording

Conversation

@jiaxuan

@jiaxuan jiaxuan commented Oct 22, 2026

Copy link
Copy Markdown

While recording a macro, every q ends the recording, including a q that a pending key is waiting for as its argument: fq, tq, "qp, @q, or a text object's iq. So qa f q x q stops recording at the f q, and the register holds just f.

Vim ends the recording only on a q that is a command of its own. The check now looks at the key buffer: a q ends the recording when the buffer is empty or holds only a count.

Test. macro_q_as_argument_does_not_end_recording records f q x and replays it. It fails without the change, and the full suite passes with it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W2aBHqJtz3wmW7kAdNmsYS

While recording, every `q` ended the recording, even when a pending key
was waiting for it as its argument: `fq`, `tq`, `"qp`, `@q`, a text
object's `iq`. Vim ends the recording only on a `q` that is a command of
its own. The check now looks at the key buffer: an empty buffer, or a
count only, means the `q` is a command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2aBHqJtz3wmW7kAdNmsYS

This branch has not been deployed

No deployments
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