Skip to content

Commit cc30882

Browse files
committed
collapse line/ch, work some on sorting
1 parent 3cc8654 commit cc30882

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/jupyterlab-lsp/src/adapters/codemirror/features/diagnostics_listing.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,14 @@ export class DiagnosticsListing extends VDomRenderer<DiagnosticsListing.Model> {
239239
new Column({
240240
name: 'Cell',
241241
render_cell: row => <td key={5}>{row.cell_number}</td>,
242-
sort: (a, b) => (a.cell_number > b.cell_number ? 1 : -1),
242+
sort: (a, b) =>
243+
a.cell_number > b.cell_number
244+
? 1
245+
: a.data.range.start.line > b.data.range.start.line
246+
? 1
247+
: a.data.range.start.ch > b.data.range.start.ch
248+
? 1
249+
: -1,
243250
is_available: context => context.editor.has_cells
244251
}),
245252
new Column({

0 commit comments

Comments
 (0)