Skip to content

Commit af36e64

Browse files
committed
1 parent 37135cb commit af36e64

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/editor/contrib/hover/browser/contentHover.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,12 @@ class ContentHoverComputer implements IHoverComputer<IHoverPart> {
524524

525525
const model = editor.getModel();
526526
const lineNumber = anchor.range.startLineNumber;
527+
528+
if (lineNumber > model.getLineCount()) {
529+
// invalid line
530+
return [];
531+
}
532+
527533
const maxColumn = model.getLineMaxColumn(lineNumber);
528534
return editor.getLineDecorations(lineNumber).filter((d) => {
529535
if (d.options.isWholeLine) {

0 commit comments

Comments
 (0)