Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…:gui-cs/Terminal.Gui into copilot/fix-button-shadow-creation-issue
…Style + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot
AI
changed the title
Fixes #4843. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle()
Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event
Apr 20, 2026
BDisp
approved these changes
Apr 20, 2026
Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque.
…:gui-cs/Terminal.Gui into copilot/fix-button-shadow-creation-issue
…:gui-cs/Terminal.Gui into copilot/fix-button-shadow-creation-issue
Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes.
Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior.
tig
added a commit
that referenced
this pull request
Apr 20, 2026
* Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Set release label to 'rc' for v2.0.0-rc.1 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BDisp
added a commit
to BDisp/Terminal.Gui
that referenced
this pull request
Apr 20, 2026
* Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Set release label to 'rc' for v2.0.0-rc.1 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
tig
added a commit
that referenced
this pull request
Apr 21, 2026
* Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes #4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes #5008. Fix Markdown codeblock background attribute (#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tig
added a commit
that referenced
this pull request
Apr 21, 2026
* Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs * Update LayoutAndDrawComplete event summary and remarks --------- * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. --------- * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic --------- * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs * Update Terminal.Gui/Views/Button.cs * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs * Update LayoutAndDrawComplete event summary and remarks --------- * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. --------- * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic --------- --------- --------- * Adds `TreeView.GetSize` (#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes #4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 --------- * Fixes #5008. Fix Markdown codeblock background attribute (#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) * Default UseThemeBackground to true * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tig
added a commit
that referenced
this pull request
Apr 21, 2026
* Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes #4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes #5008. Fix Markdown codeblock background attribute (#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #5028. TextView still has remaining's bugs (#5029) * Fix click set insertion point row greater than lines count * Fix autocomplete popup on close not flag host control to redraw --------- Co-authored-by: Tig <tig@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tig
added a commit
that referenced
this pull request
Apr 21, 2026
* Release v2.0.0-rc.2 (#5030) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes #4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes #5008. Fix Markdown codeblock background attribute (#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Release v2.0.0-rc.3 (#5032) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (#5012) * Cleans up examples. * updated docs * Initial plan * Fixes #4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (#5021) * Release new `main` build (#5005) * Updates the sample.gif (#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (#4987) * Fixes #4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes #4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes #4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes #4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes #4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes #4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes #4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes #5008. Fix Markdown codeblock background attribute (#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes #5028. TextView still has remaining's bugs (#5029) * Fix click set insertion point row greater than lines count * Fix autocomplete popup on close not flag host control to redraw --------- Co-authored-by: Tig <tig@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
BDisp
added a commit
to BDisp/Terminal.Gui
that referenced
this pull request
Apr 21, 2026
* Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs * Update LayoutAndDrawComplete event summary and remarks --------- * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. --------- * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic --------- * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs * Update Terminal.Gui/Views/Button.cs * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs * Update LayoutAndDrawComplete event summary and remarks --------- * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. --------- * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic --------- --------- --------- * Adds `TreeView.GetSize` (gui-cs#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (gui-cs#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes gui-cs#4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (gui-cs#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 --------- * Fixes gui-cs#5008. Fix Markdown codeblock background attribute (gui-cs#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) * Default UseThemeBackground to true * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
BDisp
added a commit
to BDisp/Terminal.Gui
that referenced
this pull request
Apr 21, 2026
* Release v2.0.0-rc.2 (gui-cs#5030) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (gui-cs#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (gui-cs#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes gui-cs#4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (gui-cs#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes gui-cs#5008. Fix Markdown codeblock background attribute (gui-cs#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Release v2.0.0-rc.3 (gui-cs#5032) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (gui-cs#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (gui-cs#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes gui-cs#4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (gui-cs#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes gui-cs#5008. Fix Markdown codeblock background attribute (gui-cs#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#5028. TextView still has remaining's bugs (gui-cs#5029) * Fix click set insertion point row greater than lines count * Fix autocomplete popup on close not flag host control to redraw --------- Co-authored-by: Tig <tig@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
BDisp
added a commit
to BDisp/Terminal.Gui
that referenced
this pull request
Apr 21, 2026
* Release v2.0.0-rc.2 (gui-cs#5030) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (gui-cs#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (gui-cs#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes gui-cs#4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (gui-cs#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes gui-cs#5008. Fix Markdown codeblock background attribute (gui-cs#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Release v2.0.0-rc.3 (gui-cs#5032) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#4843. Button: avoid create-then-destroy shadow allocation via CWP InitializingShadowStyle event (gui-cs#5012) * Cleans up examples. * updated docs * Initial plan * Fixes gui-cs#4885. Button: avoid create-then-destroy shadow allocation via GetDefaultShadowStyle() Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/4c164de3-c266-4539-996f-a3b941b0a367 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update Terminal.Gui/Views/ScrollBar/ScrollButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/ViewBase/Adornment/ArrangerButton.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Tests/UnitTestsParallelizable/Views/ButtonTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Views/Button.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Redesign shadow initialization to use CWP event (OnInitializingShadowStyle + InitializingShadowStyle) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14508ce0-b4f0-4534-8270-4c61d75880c9 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Darken shadow effect in ShadowView for non-opaque style Increased the dimming factor for shadow colors in ShadowView by updating GetDimmerColor parameters from 0.05/0.25 to 0.9. This results in a much darker shadow appearance when ShadowStyle is not Opaque. * Refactor docs and style in Button and ArrangerButton Reformat XML docs for readability and line wrapping. Convert OnHotKeyCommand to an expression-bodied member. Apply minor whitespace and style fixes to align with project conventions. No functional changes. * Update ShadowTests expected ANSI output for background Changed the expected ANSI color code in ShadowTests.cs from bright white (\x1b[107m) to black (\x1b[40m) for the second cell in the driver output assertion, aligning the test with the updated rendering behavior. --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Markdig from 1.1.2 to 1.1.3 (gui-cs#5017) --- updated-dependencies: - dependency-name: Markdig dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Back-merge v2.0.0-beta.218 from main into develop (gui-cs#5022) * Cleans up examples. * updated docs * Release v2.0.0-beta.218 (gui-cs#5021) * Release new `main` build (gui-cs#5005) * Updates the sample.gif (gui-cs#5007) * Cleans up examples. * updated docs * new sample.gif * reverted * Fix remaining TextView issues (gui-cs#4987) * Fixes gui-cs#4986. Navigating with Viewport.Y greater than zero will cause scrolling to increase, even if the current line fits within the available height. * Fixes gui-cs#4990. Navigating with Viewport.X greater than zero will cause scrolling left, even if the current column isn't at the right of the viewport * Fixes gui-cs#4994 - Navigating left and right while holding down the Ctrl key does not cause edge scrolling. * Fixes gui-cs#4998. TextView.UpdateContentSize isn't working correctly on insert and delete text * Fixes gui-cs#4999. TextView with hidden cursor due scrolling pressing any CursorRight/Left/Down/Up keys doesn't adjust to make the cursor visible * Update Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes gui-cs#4891. DoDrawComplete should ignore scrolled Viewport.Location when excluding opaque view area * Clarify comment related to deleted * Fix MoveUp() and add more unit tests * Test that proves despite does not change viewport position but does set NeedsDraw. * Fix MoveLeft method and add a test * Fix MoveWordLeft and add unit test * Fix MoveWordRight and add unit test * Simplify MoveRight code * Fix DeleteCharLeft invoke ContentChanged twice * Fix ShouldInvalidateMaxWidthCache to use full size * Remove unnecessary LINQ in _cachedMaxWidthPerLine * Move ShouldInvalidateMaxWidthCache tests * Fix ArgumentOutOfRangeException on DeleteTextLeft --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes UICatalog --version, adds release workflows and maintainer docs (gui-cs#5009) * Fixes `AppModel.Inline` issues needed for `Output-ConsoleGridView` to work well (gui-cs#5010) * Cleans up examples. * updated docs * Add LayoutAndDrawComplete event, improve shutdown/reset - Adds LayoutAndDrawComplete event to IApplication and ApplicationImpl, raised after layout/draw completes - Refactors ApplicationMainLoop to track first layout/draw with _firstLayoutAndDrawComplete - Removes UnsubscribeDriverEvents and inlines DeviceAttributesStartupQueryTimeout - Uses Lock for _sessionStackLock for better thread safety - Ensures terminal attributes are reset (ESC[0m) and cursor shown on shutdown in AnsiOutput - Adds CSI_ResetAttributes to EscSeqUtils - Skips IterationImpl_Inline_FullTimeline_TraceDump test (tracing not for test results) * Update Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update LayoutAndDrawComplete event summary and remarks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixes prepare release workflow (gui-cs#5015) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags (gui-cs#5018) The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix/prepare release (gui-cs#5019) * Cleans up examples. * updated docs * Use RELEASE_PAT for release workflows to allow PR creation GITHUB_TOKEN is not permitted to create pull requests in this repo. Switch prepare-release and finalize-release workflows to use the RELEASE_PAT secret for checkout, PR creation, and release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix version numbering: auto-increment pre-release from existing tags The workflow was manually constructing versions like '2.0.0-beta' without the incrementing number suffix. Now it scans existing git tags to find the latest matching tag (e.g., v2.0.0-beta.217) and increments to produce the next version (e.g., 2.0.0-beta.218). Also adds: - Concurrency group to prevent race conditions between runs - Remote branch conflict detection before creating release branch - Simplified GitVersion.yml label update logic Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Adds `TreeView.GetSize` (gui-cs#5025) * Refactor driver param, MinUI, and Terminal.Gui integration - Rename ForceDriver to Driver across all cmdlets and ApplicationData for consistency; update help text - Switch to ProjectReference for Terminal.Gui, update solution and project files for local dev - Refactor MinUI handling and help text; clarify that only title/status bar are hidden, filter shown if specified - Use FrameView.DefaultBorderStyle and modularize filter/status bar logic in OutGridViewWindow, OutTableViewWindow, and ShowObjectTreeWindow - Add FullScreen param to ShowObjectTreeCmdletCommand; set AppModel accordingly in ShowObjectView - Ensure explicit disposal of windows and apps in all entry points - Expose TreeView<T>.GetSize() for accurate sizing - Update launchSettings.json and tests for new Driver param and MinUI usage - Improve null-safety, event handling, and consistency throughout UI code * Revert "Refactor driver param, MinUI, and Terminal.Gui integration" This reverts commit 10821a1. * Refactor tree size calculation into GetSize() method Extracted content size logic to a new public GetSize() method in TreeView<T>. This method computes the logical size based on expanded branches and is now used for content size updates. Added XML documentation for GetSize(). * Ensures `CollectionNavigator` does not repond to alt or ctrl keys (gui-cs#5014) * Cleans up examples. * updated docs * Update IsCompatibleKey to reject Alt/Ctrl; improve tests IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code. * Fixes gui-cs#4865. Add v1→v2 corrections table and expand agent-facing files for all AI tools (gui-cs#5027) * Initial plan * Add v1→v2 corrections table and expand agent-facing files for all AI tools - Create ai-v2-primer.md: canonical v1→v2 reference for all agents - Expand llms.txt from 115 to ~330 lines with corrections table, snippets, gotchas - Flesh out .cursorrules from 5-line stub to full agent config - Create .windsurfrules for Windsurf AI support - Create .aider.md for Aider AI support - Update AGENTS.md with v1→v2 corrections table - Update CLAUDE.md to reference v2 primer - Update .github/copilot-instructions.md with v1→v2 corrections and updated lifecycle Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review feedback: clarify Pos.At docs, improve copilot-instructions readability Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ac004541-cd96-4c44-b6e7-ac21c60aad0b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix C# version to 14/net10.0 and clarify style rules are for library contributors only Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e034da10-7544-4fa9-8186-53d7e5011eee Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use Accepted (post-event) instead of Accepting as the v1 Clicked replacement Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/15e8840e-cec8-4098-8272-fb78a1516eb4 Co-authored-by: tig <585482+tig@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> * Fixes gui-cs#5008. Fix Markdown codeblock background attribute (gui-cs#5011) * Initial plan * Fix MarkdownCodeBlock rendering codeblocks with incorrect background attribute - Remove ThemeBackground assignment on embedded code blocks in SyncCodeBlockViews() so code blocks always use the distinct Code role background instead of blending with the main content background when UseThemeBackground=true. - Pass resolved code block background to GetAttributeForSegment in MarkdownCodeBlock.OnDrawingContent() so text segments use the same background as the fill, fixing the mismatch when UseThemeBackground=false. - Add two tests verifying both scenarios. Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/fd4d1cad-1f64-4890-b1a7-74df3f9a2ab7 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix Markdown code block background and highlighter logic Markdown code blocks now use the SyntaxHighlighter's DefaultBackground for their ThemeBackground, ensuring correct theming for both light and dark themes. The SyntaxHighlighter is passed to MarkdownCodeBlock SubViews. The "Theme BG" CheckBox in Deepdives and MarkdownTester reflects the current UseThemeBackground state. Added and updated tests to verify code block background and highlighter assignment. Minor formatting and style improvements included. * fixed gitversion yml bug * Fix SyntaxHighlighter/UseThemeBackground setters to invalidate layout SyntaxHighlighter and UseThemeBackground were auto-properties, so changing them after Text was set had no effect until Text was re-assigned. This required a hack (Text=""; Text=text) in Deepdives, MarkdownTester, and mdv. - Make both setters call InvalidateParsedAndLayout() on change - Fix GetAttributeForSegment to override bg on explicit-attribute segments when themeBackground is provided (covers real TextMate tokenization) - Remove Text re-assignment hacks from Deepdives, MarkdownTester, and mdv - Add tests: explicit-attribute fill/text bg match, SyntaxHighlighter invalidation, UseThemeBackground invalidation (all verified to fail when their corresponding fixes are reverted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default UseThemeBackground to true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ThemeName property to ISyntaxHighlighter interface Replaces CurrentThemeName with ThemeName in TextMateSyntaxHighlighter and updates all usages. Adapts scenario constructors, theme selection logic, and test/mocks to use the new property. Updates unit tests to check ThemeName and renames test methods accordingly. * Auto-select syntax theme based on terminal background Add DefaultAttributeChanged event to IDriver and DriverImpl, allowing detection of terminal background color changes. Update Markdown views in Deepdives, MarkdownTester, and Program to auto-switch syntax highlighting themes (light/dark) based on the terminal's background, ensuring better visual consistency and accessibility. * Fix code block dimmer direction for light themes Invert isDark when calling GetDimmerColor so code block bg shifts *away* from the body bg: dark themes get slightly lighter code blocks, light themes get slightly darker ones. The intuitive direction caused light-theme code blocks to wash out to medium gray (L>=90 fallback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Tig <tig@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> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixes gui-cs#5028. TextView still has remaining's bugs (gui-cs#5029) * Fix click set insertion point row greater than lines count * Fix autocomplete popup on close not flag host control to redraw --------- Co-authored-by: Tig <tig@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: BDisp <bd.bdisp@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.
Buttonunconditionally allocated shadow infrastructure (MarginView + 2 ShadowViews, ~23KB) in its constructor, then subclasses likeScrollButtonandArrangerButtonimmediately nulled the shadow — destroying the ShadowViews but leaking the MarginView (~7KB) and generating ~69KB of transient GC pressure per instance.Proposed Changes/Todos
Button.cs— addsprotected virtual void OnInitializingShadowStyle(ValueChangingEventArgs<ShadowStyles?> args)(empty in base) andpublic event EventHandler<ValueChangingEventArgs<ShadowStyles?>>? InitializingShadowStyle, following the Cancellable Work Pattern (CWP). The privateRaiseInitializingShadowStyle()method orchestrates the CWP flow: creates args withNewValue = DefaultShadow, calls the virtual, raises the event, then appliesargs.NewValue(unlessargs.Handled). This allows subclasses and external subscribers to change or suppress shadow allocation before any infrastructure is created.ScrollButton.cs— overridesOnInitializingShadowStyleto setargs.NewValue = null; removes the now-redundantbase.ShadowStyle = nullfrom its constructor. The base constructor then callsbase.ShadowStyle = null, which is a no-op — no MarginView or ShadowViews are ever created.ArrangerButton.cs— same pattern asScrollButton.Memory impact
ScrollButtonArrangerButtonScrollBar(2 buttons)Pull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)