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

minor cleanup to improve leader usage with <space> #1429

Merged
merged 1 commit into from
Mar 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class ConfigurationClass {
}
}

// <space> is special, change it to " " internally if it is used as leader
if (this.leader.toLowerCase() === "<space>") {
this.leader = " ";
}

// Get the cursor type from vscode
const cursorStyleString = vscode.workspace.getConfiguration().get("editor.cursorStyle") as string;
this.userCursor = this.cursorStyleFromString(cursorStyleString);
Expand Down
6 changes: 0 additions & 6 deletions src/notation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ export class AngleBracketNotation {
}

if (key.toLowerCase() === "<leader>") {
// <space> is special, change it to " " internally if it is used
if (Configuration.leader.toLowerCase() === "<space>") {
Configuration.leader = " ";
}

// Otherwise just return leader from config as-is
return Configuration.leader;
}

Expand Down