A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/microsoft/vscode/commit/acc7365e41f9cb380e79bf78d7d102184f1ffe0d below:

Enable type to find in search view · microsoft/vscode@acc7365 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+22

-3

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+22

-3

lines changed Original file line number Diff line number Diff line change

@@ -177,6 +177,7 @@

177 177

line-height: 22px;

178 178

display: flex;

179 179

overflow: hidden;

180 +

padding-left: 22px;

180 181

}

181 182 182 183

.search-view .linematch > .match {

Original file line number Diff line number Diff line change

@@ -26,6 +26,7 @@ import { IResourceLabel, ResourceLabels } from 'vs/workbench/browser/labels';

26 26

import { RemoveAction, ReplaceAction, ReplaceAllAction, ReplaceAllInFolderAction } from 'vs/workbench/parts/search/browser/searchActions';

27 27

import { SearchView } from 'vs/workbench/parts/search/browser/searchView';

28 28

import { FileMatch, FolderMatch, Match, RenderableMatch, SearchModel, BaseFolderMatch } from 'vs/workbench/parts/search/common/searchModel';

29 +

import { createMatches } from 'vs/base/common/filters';

29 30 30 31

interface IFolderMatchTemplate {

31 32

label: IResourceLabel;

@@ -162,7 +163,7 @@ export class FileMatchRenderer extends Disposable implements ITreeRenderer<FileM

162 163

renderTemplate(container: HTMLElement): IFileMatchTemplate {

163 164

const disposables: IDisposable[] = [];

164 165

const fileMatchElement = DOM.append(container, DOM.$('.filematch'));

165 -

const label = this.labels.create(fileMatchElement);

166 +

const label = this.labels.create(fileMatchElement, { supportHighlights: true });

166 167

disposables.push(label);

167 168

const badge = new CountBadge(DOM.append(fileMatchElement, DOM.$('.badge')));

168 169

disposables.push(attachBadgeStyler(badge, this.themeService));

@@ -182,7 +183,11 @@ export class FileMatchRenderer extends Disposable implements ITreeRenderer<FileM

182 183

renderElement(node: ITreeNode<FileMatch, any>, index: number, templateData: IFileMatchTemplate): void {

183 184

const fileMatch = node.element;

184 185

templateData.el.setAttribute('data-resource', fileMatch.resource().toString());

185 -

templateData.label.setFile(fileMatch.resource(), { hideIcon: false });

186 +

templateData.label.setFile(

187 +

fileMatch.resource(), {

188 +

hideIcon: false,

189 +

matches: createMatches(node.filterData)

190 +

});

186 191

const count = fileMatch.count();

187 192

templateData.badge.setCount(count);

188 193

templateData.badge.setTitleFormat(count > 1 ? nls.localize('searchMatches', "{0} matches found", count) : nls.localize('searchMatch', "{0} match found", count));

Original file line number Diff line number Diff line change

@@ -62,6 +62,8 @@ import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorG

62 62

import { IPartService } from 'vs/workbench/services/part/common/partService';

63 63

import { IPreferencesService, ISettingsEditorOptions } from 'vs/workbench/services/preferences/common/preferences';

64 64

import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';

65 +

import { createFileIconThemableTreeContainerScope } from 'vs/workbench/browser/parts/views/views';

66 +

import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';

65 67 66 68

const $ = dom.$;

67 69

@@ -143,10 +145,11 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {

143 145

@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,

144 146

@IPreferencesService private readonly preferencesService: IPreferencesService,

145 147

@IThemeService protected themeService: IThemeService,

148 +

@IWorkbenchThemeService protected workbenchThemeService: IWorkbenchThemeService,

146 149

@ISearchHistoryService private readonly searchHistoryService: ISearchHistoryService,

147 150

@IEditorGroupsService private readonly editorGroupsService: IEditorGroupsService,

148 151

@IContextMenuService private readonly contextMenuService: IContextMenuService,

149 -

@IMenuService private readonly menuService: IMenuService

152 +

@IMenuService private readonly menuService: IMenuService,

150 153

) {

151 154

super(VIEW_ID, configurationService, partService, telemetryService, themeService, storageService);

152 155

@@ -615,6 +618,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {

615 618

private createSearchResultsView(container: HTMLElement): void {

616 619

this.resultsElement = dom.append(container, $('.results.show-file-icons'));

617 620

const delegate = this.instantiationService.createInstance(SearchDelegate);

621 +

this._register(createFileIconThemableTreeContainerScope(this.resultsElement, this.workbenchThemeService));

618 622 619 623

const identityProvider: IIdentityProvider<RenderableMatch> = {

620 624

getId(element: RenderableMatch) {

@@ -632,6 +636,15 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {

632 636

this._register(this.instantiationService.createInstance(MatchRenderer, this.viewModel, this)),

633 637

],

634 638

{

639 +

keyboardNavigationLabelProvider: {

640 +

getKeyboardNavigationLabel: (element: RenderableMatch) => {

641 +

if (element instanceof FolderMatch || element instanceof FileMatch) {

642 +

return element.name();

643 +

}

644 + 645 +

return '';

646 +

}

647 +

},

635 648

identityProvider,

636 649

accessibilityProvider: this.instantiationService.createInstance(SearchAccessibilityProvider, this.viewModel)

637 650

}));

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4