Adds new CodeLens visibility & location settings

Adds new command to toggle CodeLens on and off when `gitlens.codeLens.visibility` is set to `ondemand`
This commit is contained in:
Eric Amodio
2016-09-19 21:28:52 -04:00
parent 14e9c5b4fa
commit 7b4dd77fbc
9 changed files with 200 additions and 63 deletions

View File

@@ -154,4 +154,14 @@ export class ToggleBlameCommand extends EditorCommand {
.catch(ex => console.error('[GitLens.ToggleBlameCommand]', 'getBlameForLine', ex))
.then(blame => this.blameController.toggleBlame(editor, blame && blame.commit.sha));
}
}
export class ToggleCodeLensCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.ToggleCodeLens);
}
execute(editor: TextEditor, edit: TextEditorEdit) {
return this.git.toggleCodeLens(editor);
}
}