Skip to content

perf: skip UpdateLayout if invisible - #65

Draft
mstv wants to merge 1 commit into
masterfrom
fix/layout_crash
Draft

mstv wants to merge 1 commit into
masterfrom
fix/layout_crash

Conversation

@mstv

@mstv mstv commented Sep 20, 2026

Copy link
Copy Markdown
Member

see also #64 (comment)

@mstv mstv self-assigned this Sep 20, 2026
@mstv
mstv requested a lite review from Copilot September 20, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Layout is not retried when the control becomes visible, potentially leaving stale bounds and scrollbar state.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Skips layout recalculation for invisible text areas to reduce unnecessary work.

Changes:

  • Adds a visibility guard to UpdateLayout().
File Description
Project/​Src/​Gui/​TextAreaControl.cs Avoids layout updates when invisible.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +172 to 173
if (TextArea == null || !Visible)
return;
@mstv
mstv marked this pull request as draft September 20, 2026 15:44
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.

2 participants