Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #211878 for preferencesModels.ts #230031

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ function parse(model: ITextModel, isSettingsProperty: (currentProperty: string,
if (!model.isDisposed()) {
visit(model.getValue(), visitor);
}
return settings.length > 0 ? [<ISettingsGroup>{
return settings.length > 0 ? [{
id: model.isDisposed() ? '' : model.id,
sections: [
{
settings
Expand All @@ -431,7 +432,7 @@ function parse(model: ITextModel, isSettingsProperty: (currentProperty: string,
title: '',
titleRange: nullRange,
range
}] : [];
} satisfies ISettingsGroup] : [];
}

export class WorkspaceConfigurationEditorModel extends SettingsEditorModel {
Expand Down Expand Up @@ -844,7 +845,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements

const metadata = this.collectMetadata(resultGroups);
return resultGroups.length ?
<IFilterResult>{
{
allGroups: this.settingsGroups,
filteredGroups,
matches,
Expand Down Expand Up @@ -894,9 +895,10 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements
filterMatches = filterMatches
.map(filteredMatch => {
// Fix match ranges to offset from setting start line
return <ISettingMatch>{
return {
setting: filteredMatch.setting,
score: filteredMatch.score,
matchType: filteredMatch.matchType,
matches: filteredMatch.matches && filteredMatch.matches.map(match => {
return new Range(
match.startLineNumber - filteredMatch.setting.range.startLineNumber,
Expand Down Expand Up @@ -965,7 +967,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements
}

private getGroup(resultGroup: ISearchResultGroup): ISettingsGroup {
return <ISettingsGroup>{
return {
id: resultGroup.id,
range: nullRange,
title: resultGroup.label,
Expand Down
Loading