mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-23 08:39:54 +01:00
sort language status by sev, source, than id
This commit is contained in:
@@ -60,11 +60,14 @@ class LanguageStatusServiceImpl implements ILanguageStatusService {
|
||||
|
||||
getLanguageStatus(model: ITextModel): ILanguageStatus[] {
|
||||
return this._provider.ordered(model).sort((a, b) => {
|
||||
if (a.severity !== b.severity) {
|
||||
return b.severity - a.severity;
|
||||
} else {
|
||||
return compare(a.id, b.id);
|
||||
let res = b.severity - a.severity;
|
||||
if (res === 0) {
|
||||
res = compare(a.source, b.source);
|
||||
}
|
||||
if (res === 0) {
|
||||
res = compare(a.id, b.id);
|
||||
}
|
||||
return res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user