Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #8975 The literal string "<leader>" is substituted for the leader key when repeating a command-line command #9075

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HenryTSZ
Copy link
Contributor

What this PR does / why we need it:

fixes #8975 The literal string "" is substituted for the leader key when repeating a command-line command

Which issue(s) this PR fixes

#8975

Special notes for your reviewer:

The commandList here saves the ex command, which typically do not include leader.

// Used for the registers and macros that only record on commandList
result = this.commandList.join('');

Therefore, we do not need the following replace

return result
.replace(new RegExp(configuration.leader.replace(ESCAPE_REGEX, '\\$&'), 'g'), '<leader>')
.replace(BUFFERED_KEYS_REGEX, '');

… the leader key when repeating a command-line command
@@ -56,7 +56,7 @@ export class RecordedState {
this.commandList.length > 0
) {
// Used for the registers and macros that only record on commandList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's clarify & expand this comment - it's not obvious why we're doing this early return.

@J-Fields
Copy link
Member

Can you please write a test case for this?

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.

The literal string "<leader>" is substituted for the leader key when repeating a command-line command.
2 participants