Skip to content

Commit

Permalink
Fixes #331 - Code lens shows on every import in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Apr 11, 2018
1 parent e170e9e commit 62a7eaf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Marks temporary files (used when showing comparisions with previous revisions) as read-only to help avoid accidental edits/saving

### Fixed
- Fixes [#331](https://github.com/eamodio/vscode-gitlens/issues/331) - Code lens shows on every import in Python
- Fixes issues where quick pick menu progress indicators will get stuck in some cases because of a vscode api change in [Microsoft/vscode#46102](https://github.com/Microsoft/vscode/pull/46102)

## [8.2.0] - 2018-03-31
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,20 +238,26 @@
"document"
]
},
{
"language": "python",
"symbolScopes": [
"!Module"
]
},
{
"language": "scss",
"scopes": [
"document"
]
},
{
"language": "vue",
"language": "stylus",
"scopes": [
"document"
]
},
{
"language": "stylus",
"language": "vue",
"scopes": [
"document"
]
Expand Down
8 changes: 8 additions & 0 deletions src/gitCodeLensProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ export class GitCodeLensProvider implements CodeLensProvider {
symbolScopes: cfg.symbolScopes
} as CodeLensLanguageScope;
}
else {
if (languageScope.scopes === undefined) {
languageScope.scopes = cfg.scopes;
}
if (languageScope.symbolScopes === undefined) {
languageScope.symbolScopes = cfg.symbolScopes;
}
}

languageScope.symbolScopes = languageScope.symbolScopes != null
? languageScope.symbolScopes = languageScope.symbolScopes.map(s => s.toLowerCase())
Expand Down

0 comments on commit 62a7eaf

Please sign in to comment.