Skip to content

Commit 3cc8654

Browse files
committed
collapse Row/Ch columns
1 parent df4dba2 commit 3cc8654

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,18 @@ export class DiagnosticsListing extends VDomRenderer<DiagnosticsListing.Model> {
243243
is_available: context => context.editor.has_cells
244244
}),
245245
new Column({
246-
name: 'Line',
247-
render_cell: row => <td key={6}>{row.data.range.start.line}</td>,
246+
name: 'Line:Ch',
247+
render_cell: row => (
248+
<td key={6}>
249+
{row.data.range.start.line}:{row.data.range.start.ch}
250+
</td>
251+
),
248252
sort: (a, b) =>
249-
a.data.range.start.line > b.data.range.start.line ? 1 : -1
250-
}),
251-
new Column({
252-
name: 'Ch',
253-
render_cell: row => <td key={7}>{row.data.range.start.line}</td>,
254-
sort: (a, b) => (a.data.range.start.ch > b.data.range.start.ch ? 1 : -1)
253+
a.data.range.start.line > b.data.range.start.line
254+
? 1
255+
: a.data.range.start.ch > b.data.range.start.ch
256+
? 1
257+
: -1
255258
})
256259
];
257260

0 commit comments

Comments
 (0)