Skip to content

Commit

Permalink
Put "uri.includes(".ts")" back in
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Dec 27, 2024
1 parent 5cdc3a9 commit baf628a
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions server/src/lfortran-accessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,15 @@ export class LFortranCLIAccessor implements LFortranAccessor {
const range: Range = location.range;

const start: Position = range.start;
start.line--;
if (!uri.includes(".ts")) {
start.line--;
}
start.character--;

const end: Position = range.end;
end.line--;
if (!uri.includes(".ts")) {
end.line--;
}
end.character--;
}
}
Expand Down Expand Up @@ -432,11 +436,15 @@ export class LFortranCLIAccessor implements LFortranAccessor {
const range: Range = location.range;

const start: Position = range.start;
start.line--;
if (!uri.includes(".ts")) {
start.line--;
}
start.character--;

const end: Position = range.end;
end.line--;
if (!uri.includes(".ts")) {
end.line--;
}
end.character--;

definitions.push({
Expand Down Expand Up @@ -512,11 +520,15 @@ export class LFortranCLIAccessor implements LFortranAccessor {
const range: Range = diagnostic.range;

const start: Position = range.start;
start.line--;
if (!uri.includes(".ts")) {
start.line--;
}
start.character--;

const end: Position = range.end;
end.line--;
if (!uri.includes(".ts")) {
end.line--;
}

diagnostics.push(diagnostic);
}
Expand Down

0 comments on commit baf628a

Please sign in to comment.