Skip to content

Commit 73a183b

Browse files
committed
Fixes #211 - Unsaved code lens on untracked files
1 parent a18e850 commit 73a183b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2424
- Removes `gitlens.theme.*` settings - now using built-in theme support
2525

2626
### Fixed
27+
- Fixes [#211](https://github.com/eamodio/vscode-gitlens/issues/211) - Unsaved code lens appears on untracked files
2728
- Fixes issue where `Open * in Remote` commands are sometimes missing
2829

2930
## [6.1.2] - 2017-11-21

src/gitCodeLensProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export class GitCodeLensProvider implements CodeLensProvider {
6767
}
6868

6969
async provideCodeLenses(document: TextDocument, token: CancellationToken): Promise<CodeLens[]> {
70+
if (!await this.git.isTracked(document.uri.fsPath)) return [];
71+
7072
const dirty = document.isDirty;
7173

7274
const cfg = configuration.get<ICodeLensConfig>(configuration.name('codeLens').value, document.uri);

0 commit comments

Comments
 (0)