Skip to content

Commit 02ccb3b

Browse files
committed
update line number as splits index
1 parent 6b97ffe commit 02ccb3b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/editor/json-records-validation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export function setupJsonRecordsValidation(monaco: typeof MonacoTypes) {
2222
errors.forEach((err) => {
2323
markers.push({
2424
severity: monaco.MarkerSeverity.Error,
25-
startLineNumber: 0,
26-
startColumn: offset, // +1 for the separator
27-
endLineNumber: 0,
25+
startLineNumber: i,
26+
startColumn: offset,
27+
endLineNumber: i,
2828
endColumn: offset + err.length,
2929
message: err.error.toString(),
3030
})

src/model/events/body-formatting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const Formatters: { [key in ViewableContentType]: Formatter } = {
146146
}
147147
});
148148

149-
return records.join('');
149+
return records.join('\n');
150150
// ^ Same logic as in UI-worker-formatter
151151
} catch (e) {
152152
// Fallback to showing the raw un-formatted:

src/services/ui-worker-formatters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const WorkerFormatters = {
9393
}
9494
});
9595

96-
return records.join('');
96+
return records.join('\n');
9797
} catch (e) {
9898
return content.toString('utf8');
9999
}

0 commit comments

Comments
 (0)