diff --git a/CHANGELOG.md b/CHANGELOG.md index 245db0f..d988871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Adds `gitlens.heatmap.locations` setting to specify where the indicators of the gutter heatmap annotations will be shown - Adds a `gitlens.fileAnnotations.command` setting to specify whether the file annotations button in the editor title shows a menu or immediately toggles the specified file annotations — closes [#1165](https://github.com/eamodio/vscode-gitlens/issues/1165) thanks to [PR #1171](https://github.com/eamodio/vscode-gitlens/pull/1171) by Raaj Patil ([@arrpee](https://github.com/arrpee)) - Adds this new option to the _Menus & Toolbars_ section of the GitLens Interactive Settings +- Adds a welcome, i.e. richer empty state, to the _Search & Compare_ view ### Fixed diff --git a/package.json b/package.json index cdf21bd..efc8406 100644 --- a/package.json +++ b/package.json @@ -8063,6 +8063,14 @@ { "view": "gitlens.views.updates", "contents": "[Close](command:gitlens.closeUpdatesView)" + }, + { + "view": "gitlens.views.searchAndCompare", + "contents": "Search for commits by [message](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22message%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [author](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22author%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [SHA](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22commit%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [file](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22file%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), or [changes](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22change%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D)\n\n[Search Commits...](command:gitlens.views.searchAndCompare.searchCommits)" + }, + { + "view": "gitlens.views.searchAndCompare", + "contents": "Compare a with another \n\n[Compare References...](command:gitlens.views.searchAndCompare.selectForCompare)" } ], "views": { diff --git a/src/views/searchAndCompareView.ts b/src/views/searchAndCompareView.ts index 6c906c6..e590208 100644 --- a/src/views/searchAndCompareView.ts +++ b/src/views/searchAndCompareView.ts @@ -52,11 +52,7 @@ export class SearchAndCompareViewNode extends ViewNode { } getChildren(): ViewNode[] { - if (this.children.length === 0) { - this.view.message = 'No search or comparison results could be found.'; - - return []; - } + if (this.children.length === 0) return []; this.view.message = undefined;