Skip to content

Commit

Permalink
Merge pull request #1429 from xconverge/space-as-leader-fix
Browse files Browse the repository at this point in the history
minor cleanup to improve leader usage with <space>
  • Loading branch information
xconverge authored Mar 25, 2017
2 parents 84d209f + 9276134 commit f0c584a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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

0 comments on commit f0c584a

Please sign in to comment.