Browse Source

Updates search results messages

main
Eric Amodio 5 years ago
parent
commit
5d56039266
4 changed files with 10 additions and 10 deletions
  1. +6
    -6
      src/commands/git/search.ts
  2. +2
    -2
      src/commands/showQuickCommitDetails.ts
  3. +1
    -1
      src/quickpicks/commonQuickPicks.ts
  4. +1
    -1
      src/views/searchView.ts

+ 6
- 6
src/commands/git/search.ts View File

@ -348,7 +348,7 @@ export class SearchGitCommand extends QuickCommandBase {
} else { } else {
quickpick.items = [ quickpick.items = [
{ {
label: 'Search for commits matching',
label: 'Search for',
description: quickpick.value, description: quickpick.value,
item: quickpick.value item: quickpick.value
} }
@ -389,7 +389,7 @@ export class SearchGitCommand extends QuickCommandBase {
state.repo.path, state.repo.path,
search, search,
{ {
label: { label: `commits matching: ${state.search}` }
label: { label: `for ${state.search}` }
}, },
resultsPromise resultsPromise
); );
@ -411,10 +411,10 @@ export class SearchGitCommand extends QuickCommandBase {
title: `${this.title}${Strings.pad(GlyphChars.Dot, 2, 2)}${state.repo.formattedName}`, title: `${this.title}${Strings.pad(GlyphChars.Dot, 2, 2)}${state.repo.formattedName}`,
placeholder: placeholder:
results === undefined results === undefined
? `No results for commits matching: ${state.search}`
? `No results for ${state.search}`
: `${Strings.pluralize('result', results.count, { : `${Strings.pluralize('result', results.count, {
number: results.truncated ? `${results.count}+` : undefined number: results.truncated ? `${results.count}+` : undefined
})} for commits matching: ${state.search}`,
})} for ${state.search}`,
matchOnDescription: true, matchOnDescription: true,
matchOnDetail: true, matchOnDetail: true,
items: items:
@ -440,7 +440,7 @@ export class SearchGitCommand extends QuickCommandBase {
state.repo!.path, state.repo!.path,
search, search,
{ {
label: { label: `commits matching: ${state.search}` }
label: { label: `for ${state.search}` }
}, },
results results
); );
@ -459,7 +459,7 @@ export class SearchGitCommand extends QuickCommandBase {
pickedCommit.repoPath, pickedCommit.repoPath,
{ pattern: `commit:${pickedCommit.sha}` }, { pattern: `commit:${pickedCommit.sha}` },
{ {
label: { label: `commits matching: commit:${pickedCommit.shortSha}` }
label: { label: `for commit id ${pickedCommit.shortSha}` }
} }
); );

+ 2
- 2
src/commands/showQuickCommitDetails.ts View File

@ -122,9 +122,9 @@ export class ShowQuickCommitDetailsCommand extends ActiveEditorCachedCommand {
if (args.showInView) { if (args.showInView) {
void (await Container.searchView.search( void (await Container.searchView.search(
repoPath!, repoPath!,
{ pattern: `commit: ${args.commit.sha}` },
{ pattern: `commit:${args.commit.sha}` },
{ {
label: { label: `commits matching: commit:${args.commit.shortSha}` }
label: { label: `for commit id ${args.commit.shortSha}` }
} }
)); ));

+ 1
- 1
src/quickpicks/commonQuickPicks.ts View File

@ -113,7 +113,7 @@ export class ShowCommitInViewQuickPickItem extends CommandQuickPickItem {
this.commit.repoPath, this.commit.repoPath,
{ pattern: `commit:${this.commit.sha}` }, { pattern: `commit:${this.commit.sha}` },
{ {
label: { label: `commits matching: commit:${this.commit.shortSha}` }
label: { label: `for commit id ${this.commit.shortSha}` }
} }
)); ));
} }

+ 1
- 1
src/views/searchView.ts View File

@ -203,7 +203,7 @@ export class SearchView extends ViewBase {
number: truncated ? `${count}+` : undefined, number: truncated ? `${count}+` : undefined,
plural: resultsType.plural, plural: resultsType.plural,
zero: 'No' zero: 'No'
})} for ${label.label}`;
})} ${label.label}`;
} }
private getSearchQueryFn( private getSearchQueryFn(

Loading…
Cancel
Save