Browse Source

Fixes #211 - Unsaved code lens on untracked files

main
Eric Amodio 7 years ago
parent
commit
73a183b687
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -0
      src/gitCodeLensProvider.ts

+ 1
- 0
CHANGELOG.md View File

@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Removes `gitlens.theme.*` settings - now using built-in theme support
### Fixed
- Fixes [#211](https://github.com/eamodio/vscode-gitlens/issues/211) - Unsaved code lens appears on untracked files
- Fixes issue where `Open * in Remote` commands are sometimes missing
## [6.1.2] - 2017-11-21

+ 2
- 0
src/gitCodeLensProvider.ts View File

@ -67,6 +67,8 @@ export class GitCodeLensProvider implements CodeLensProvider {
}
async provideCodeLenses(document: TextDocument, token: CancellationToken): Promise<CodeLens[]> {
if (!await this.git.isTracked(document.uri.fsPath)) return [];
const dirty = document.isDirty;
const cfg = configuration.get<ICodeLensConfig>(configuration.name('codeLens').value, document.uri);

Loading…
Cancel
Save