Skip to content

Commit

Permalink
allow minimal decorations
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSiefke committed Jul 22, 2024
1 parent a8e7495 commit 315449c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/vs/editor/common/viewModel/viewModelImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import { GlyphMarginLanesModel } from 'vs/editor/common/viewModel/glyphLanesMode

const USE_IDENTITY_LINES_COLLECTION = true;

const minimalAllowedDecorations: string[] = ['marker-decoration'];


export class ViewModel extends Disposable implements IViewModel {

private readonly _editorId: number;
Expand Down Expand Up @@ -769,13 +772,10 @@ export class ViewModel extends Disposable implements IViewModel {
public getAllOverviewRulerDecorations(theme: EditorTheme): OverviewRulerDecorationsGroup[] {
const decorations = this.model.getOverviewRulerDecorations(this._editorId, filterValidationDecorations(this._configuration.options));
const result = new OverviewRulerDecorations();
const overviewRulerDecorationsEnabled = this._configuration.options.get(EditorOption.fontInfo);
const minimalAllowed: string[] = [];
const filteredDecorations = decorations.filter(d => {
if (overviewRulerDecorationsEnabled) {
return true;
}
return minimalAllowed.includes(d.id);
const overviewRulerDecorationsEnabled = this._configuration.options.get(EditorOption.overviewRulerEnabled);
const filteredDecorations = overviewRulerDecorationsEnabled ? decorations : decorations.filter(d => {
console.log({ id: d.id, desc: d.options.description });
return minimalAllowedDecorations.includes(d.id);
});

for (const decoration of filteredDecorations) {
Expand Down

0 comments on commit 315449c

Please sign in to comment.