Conversation
Refactor ViewManipulator to update view geometry by setting the Frame property with C# with-expressions, ensuring atomic position and size changes. Also, defer enabling scrollbars in Dialog<TResult> until after initialization to avoid premature creation.
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses #4970 by adjusting how dialogs/views are resized during arrange operations to prevent runaway growth/scrolling behavior.
Changes:
- Updates
ViewManipulatorresize paths to setView.Frameatomically (instead of separate X/Y/Width/Height updates) for top/left/right and keyboard resize-from-edge operations. - Wraps Dialog scrollbar enabling in
Dialog<TResult>.EndInit()with aDIALOG_SCROLLBARSpreprocessor guard.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Terminal.Gui/Views/DialogTResult.cs | Changes when/if dialog scrollbars are enabled after initialization. |
| Terminal.Gui/ViewBase/Layout/ViewManipulator.cs | Adjusts arrange-mode resize logic to update Frame in one operation for certain resize paths. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/02a2ce0c-6c9e-450f-b010-c37d3e5a1334 Co-authored-by: tig <585482+tig@users.noreply.github.com>
YourRobotOverlord
approved these changes
Apr 21, 2026
BDisp
pushed a commit
to BDisp/Terminal.Gui
that referenced
this pull request
Apr 21, 2026
* Refactor view geometry updates to use Frame with-expr Refactor ViewManipulator to update view geometry by setting the Frame property with C# with-expressions, ensuring atomic position and size changes. Also, defer enabling scrollbars in Dialog<TResult> until after initialization to avoid premature creation. * Update Terminal.Gui/ViewBase/Layout/ViewManipulator.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix redundant unary + in ResizeFromTop Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/02a2ce0c-6c9e-450f-b010-c37d3e5a1334 Co-authored-by: tig <585482+tig@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com>
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Dialogis broken #4970Pull request overview
Addresses #4970 by adjusting how dialogs/views are resized during arrange operations to prevent runaway growth/scrolling behavior.
Changes:
ViewManipulatorresize paths to setView.Frameatomically (instead of separate X/Y/Width/Height updates) for top/left/right and keyboard resize-from-edge operations.Dialog<TResult>.EndInit()with aDIALOG_SCROLLBARSpreprocessor guard.