We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b88fc47 commit 8557b99Copy full SHA for 8557b99
1 file changed
packages/web-console/src/scenes/Editor/Monaco/utils.ts
@@ -267,6 +267,17 @@ export const getErrorRange = (
267
request: Request,
268
errorPosition: number,
269
): IRange | null => {
270
+ const isErrorAtEnd = errorPosition === request.query.length
271
+ if (isErrorAtEnd) {
272
+ const lastPosition = request.query.trimEnd().length
273
+ const position = toTextPosition(request, lastPosition)
274
+ return {
275
+ startColumn: position.column,
276
+ endColumn: position.column,
277
+ startLineNumber: position.lineNumber,
278
+ endLineNumber: position.lineNumber,
279
+ }
280
281
const position = toTextPosition(request, errorPosition)
282
const model = editor.getModel()
283
if (model) {
0 commit comments