mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Refactored the `LayoutAndDraw` method in `ApplicationImpl.Screen.cs` to improve clarity, naming consistency, and redraw logic. Enhanced handling of the `Driver` object to optimize redraws. Simplified `IterationImpl` in `ApplicationMainLoop.cs` by commenting out redundant checks. Fixed a bug in `SetCursor` to ensure null safety and improve cursor positioning logic. Modified `ClearNeedsDraw` in `View.Drawing.cs` to prevent premature clearing of the `SuperView`'s `SubViewNeedsDraw` flag. Added explanatory comments to clarify the behavior. Introduced new unit tests in `NeedsDrawTests.cs` to verify the correctness of `ClearNeedsDraw`: - Ensured sibling views do not prematurely clear `SuperView`'s flags. - Verified proper clearing of flags for views, adornments, and descendants. Improved test coverage and added detailed comments to document expected behavior.