Skip to content

Commit 7d5b436

Browse files
authored
Fix highlighting issues (#1219)
1 parent aade33f commit 7d5b436

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

extensions/ql-vscode/src/remote-queries/view/FileCodeSnippet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const Message = ({
8888
borderColor: string,
8989
children: React.ReactNode
9090
}) => {
91-
if (!highlightedRegion || highlightedRegion.startLine !== currentLineNumber) {
91+
if (!highlightedRegion || highlightedRegion.endLine !== currentLineNumber) {
9292
return <></>;
9393
}
9494

@@ -157,7 +157,7 @@ const CodeLine = ({
157157
? highlightedRegion.endColumn
158158
: isLastHighlightedLine
159159
? highlightedRegion.endColumn
160-
: line.length;
160+
: line.length + 1;
161161

162162
const section1 = line.substring(0, highlightStartColumn - 1);
163163
const section2 = line.substring(highlightStartColumn - 1, highlightEndColumn - 1);

0 commit comments

Comments
 (0)