Skip to content

Commit 1df29fc

Browse files
committed
Adds cppy to search results
1 parent 33412b3 commit 1df29fc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99
### Added
1010

1111
- Adds a `gitlens.fileAnnotations.dismissOnEscape` setting to specify whether pressing the `ESC` key dismisses the active file annotations — closes [#3016](https://github.com/gitkraken/vscode-gitlens/issues/3016)
12+
- Adds _Copy_ to search results in the _Search & Compare_ view to copy the search query to more easily share or paste queries into the _Commit Graph_
1213

1314
### Fixed
1415

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13771,12 +13771,7 @@
1377113771
},
1377213772
{
1377313773
"command": "gitlens.views.copy",
13774-
"when": "viewItem =~ /gitlens:(?=(autolinked:issue|branch|commit|contributor|folder|history:line|pullrequest|remote|repository|repo-folder|stash|tag|workspace|worktree)\\b)/",
13775-
"group": "7_gitlens_cutcopypaste@1"
13776-
},
13777-
{
13778-
"command": "gitlens.views.copy",
13779-
"when": "viewItem =~ /gitlens:file(?!.*?\\b\\+(staged|unstaged))\\b/",
13774+
"when": "viewItem =~ /gitlens:(?=(autolinked:issue|branch|commit|contributor|file(?!.*?\\b\\+(staged|unstaged))\\b|folder|history:line|pullrequest|remote|repository|repo-folder|search:results|stash|tag|workspace|worktree)\\b)/",
1378013775
"group": "7_gitlens_cutcopypaste@1"
1378113776
},
1378213777
{

src/views/nodes/searchResultsNode.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export class SearchResultsNode extends ViewNode<'search-results', SearchAndCompa
6666
return this._uniqueId;
6767
}
6868

69+
override toClipboard(): string {
70+
return this.search.query;
71+
}
72+
6973
get order(): number {
7074
return this._storedAt;
7175
}

0 commit comments

Comments
 (0)