mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
remove automatic merging/overwriting of decorations, simplify proposed API, #54938
This commit is contained in:
@@ -661,11 +661,7 @@ export type SCMRawResource = [
|
||||
string[] /*icons: light, dark*/,
|
||||
string /*tooltip*/,
|
||||
boolean /*strike through*/,
|
||||
boolean /*faded*/,
|
||||
|
||||
string | undefined /*source*/,
|
||||
string | undefined /*letter*/,
|
||||
ThemeColor | null /*color*/
|
||||
boolean /*faded*/
|
||||
];
|
||||
|
||||
export type SCMRawResourceSplice = [
|
||||
@@ -1272,7 +1268,7 @@ export interface DecorationRequest {
|
||||
readonly uri: UriComponents;
|
||||
}
|
||||
|
||||
export type DecorationData = [number, boolean, string, string, ThemeColor, string];
|
||||
export type DecorationData = [number, boolean, string, string, ThemeColor];
|
||||
export type DecorationReply = { [id: number]: DecorationData };
|
||||
|
||||
export interface ExtHostDecorationsShape {
|
||||
|
||||
@@ -63,7 +63,7 @@ export class ExtHostDecorations implements IExtHostDecorations {
|
||||
console.warn(`INVALID decoration from extension '${extensionId.value}'. The 'letter' must be set and be one character, not '${data.letter}'.`);
|
||||
}
|
||||
if (data) {
|
||||
result[id] = <DecorationData>[data.priority, data.bubble, data.title, data.letter, data.color, data.source];
|
||||
result[id] = <DecorationData>[data.priority, data.bubble, data.title, data.letter, data.color];
|
||||
|
||||
}
|
||||
}, err => {
|
||||
|
||||
@@ -319,11 +319,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
|
||||
const strikeThrough = r.decorations && !!r.decorations.strikeThrough;
|
||||
const faded = r.decorations && !!r.decorations.faded;
|
||||
|
||||
const source = r.decorations && r.decorations.source || undefined;
|
||||
const letter = r.decorations && r.decorations.letter || undefined;
|
||||
const color = r.decorations && r.decorations.color || undefined;
|
||||
|
||||
const rawResource = [handle, <UriComponents>sourceUri, icons, tooltip, strikeThrough, faded, source, letter, color] as SCMRawResource;
|
||||
const rawResource = [handle, <UriComponents>sourceUri, icons, tooltip, strikeThrough, faded] as SCMRawResource;
|
||||
|
||||
return { rawResource, handle };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user