Ver código fonte

Adds status to tooltip of commit file nodes

main
Eric Amodio 6 anos atrás
pai
commit
e7ce9a0b1d
2 arquivos alterados com 4 adições e 2 exclusões
  1. +1
    -0
      CHANGELOG.md
  2. +3
    -2
      src/views/nodes/commitFileNode.ts

+ 1
- 0
CHANGELOG.md Ver arquivo

@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds control over the contributed menu commands to the Source Control side bar to the GitLens interactive settings editor (via the `gitlens.menus` setting)
- Adds Git extended regex support to commit searches
- Adds the date and a changes indicator (+x ~x -x) to stashes in GitLens views (uses the new `${changes}` token in the `gitlens.views.stashFormat` setting)
- Adds the changed file status (added, modified, renamed, deleted, etc) to the tooltip of each revision in the _File History_ and _Line History_ views
### Changed

+ 3
- 2
src/views/nodes/commitFileNode.ts Ver arquivo

@ -143,10 +143,11 @@ export class CommitFileNode extends ViewRefNode {
get tooltip() {
if (this._tooltip === undefined) {
if (this._displayAs & CommitFileNodeDisplayAs.CommitLabel) {
const status = StatusFileFormatter.fromTemplate('${status}', this.file);
this._tooltip = CommitFormatter.fromTemplate(
this.commit.isUncommitted
? `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})`
: `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})\n\n\${message}`,
? `\${author} ${GlyphChars.Dash} \${id}\n${status}\n\${ago} (\${date})`
: `\${author} ${GlyphChars.Dash} \${id}\n${status}\n\${ago} (\${date})\n\n\${message}`,
this.commit,
{
dateFormat: Container.config.defaultDateFormat

Carregando…
Cancelar
Salvar