Skip to content

Commit

Permalink
fixed crash in rendering diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Mar 17, 2024
1 parent 33af937 commit 38d0090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/widget_builder_text_document.nim
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ proc renderLine*(
if sizeToContentX:
flagsInner.incl SizeToContentX

let hasDiagnostic = self.diagnosticsPerLine.contains(lineNumber)
let hasDiagnostic = self.diagnosticsPerLine.contains(lineNumber) and self.diagnosticsPerLine[lineNumber][0] < self.document.currentDiagnostics.len
let diagnosticIndices = if hasDiagnostic:
self.diagnosticsPerLine[lineNumber]
else:
Expand Down

0 comments on commit 38d0090

Please sign in to comment.