Skip to content

Conversation

@bryanchen-d
Copy link
Contributor

@bryanchen-d bryanchen-d commented Jan 12, 2026

Fixes #284539

Copilot AI review requested due to automatic review settings January 12, 2026 23:23
@bryanchen-d bryanchen-d self-assigned this Jan 12, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +771 to +774
if (this._lines.getViewLineCount() === 0) {
// No visible lines to set viewport on
return;
}
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard condition correctly prevents the error, but there's no test coverage for this edge case. Consider adding a test that verifies setViewport behaves correctly when called on a view model with all lines hidden (getViewLineCount() === 0), similar to the existing tests in viewModelImpl.test.ts for hidden areas.

Copilot uses AI. Check for mistakes.
@bpasero bpasero requested a review from hediet January 13, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Unhandled Error] Cannot read properties of undefined (reading 'getViewLineMinColumn')

3 participants