Skip to content

Conversation

@belucha
Copy link
Contributor

@belucha belucha commented Jun 12, 2025

#703

When resizing Live views e.g. tables this was working only when the size increased. This patch fixes that by detecting size decreases and forcing the IRenderable to forget it's old shape.

fixes #703

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes


Please upvote 👍 this pull request if you are interested in it.

@belucha
Copy link
Contributor Author

belucha commented Jun 12, 2025

@microsoft-github-policy-service agree company="Intronik"

@tpill90
Copy link
Contributor

tpill90 commented Jun 16, 2025

@belucha I tested your changes in steam-lancache-prefill and they work as expected. Thanks for the good work!

@patriksvensson patriksvensson merged commit f32f80d into spectreconsole:main Jun 21, 2025
3 checks passed
@patriksvensson
Copy link
Contributor

Merged! Thank you for your contribution. Much appreciated! 👍

@belucha
Copy link
Contributor Author

belucha commented Jun 21, 2025

I also tried an approach where LiveRenderable did not have PositionCursor and RestoreCursor methods, nor caching it's shape, but the LiveDisplayRenderer - Hook was using DECSC() and DECRC() Ansi sequences to store/restore the cursor positions.

But I do not know if that is available on all platforms and thought that would be a too large change, from the working solution.
Was that not considered at all - because not all terminals support that?

I admire the work done with SpectreConsole ... gives me great joy, building console applications now!

Regards

This was referenced Oct 27, 2025
jas88 pushed a commit to jas88/RDMP that referenced this pull request Nov 3, 2025
Updated
[Spectre.Console](https://github.com/spectreconsole/spectre.console)
from 0.50.0 to 0.53.0.

<details>
<summary>Release notes</summary>

_Sourced from [Spectre.Console's
releases](https://github.com/spectreconsole/spectre.console/releases)._

## 0.52.0

## What's Changed

* Add OpenCLI integration to Spectre.Console.Cli by
[@​patriksvensson](https://github.com/patriksvensson) in
[#​1909](spectreconsole/spectre.console#1909)
* Fix OPENCLI_VISIBILITY_INTERNAL to DefineConstants concat by
[@​devlead](https://github.com/devlead) in
[#​1912](spectreconsole/spectre.console#1912)

**Full Changelog**:
spectreconsole/spectre.console@0.51.1...0.52.0

## 0.51.1

## What's Changed

* Fix IndexOutOfRangeException in ExceptionFormatter by
[@​martincostello](https://github.com/martincostello) in
[#​1800](spectreconsole/spectre.console#1800)
* TestConsole can now be configured and accessed in CommandAppTester by
[@​magiino](https://github.com/magiino) in
[#​1803](spectreconsole/spectre.console#1803)
* Add ShowRowSeparators in Table Widget docs by
[@​bartoginski](https://github.com/bartoginski) in
[#​1807](spectreconsole/spectre.console#1807)
* Add support for required options by
[@​patriksvensson](https://github.com/patriksvensson) in
[#​1825](spectreconsole/spectre.console#1825)
* Added documentation for align widget by
[@​Elementttto](https://github.com/Elementttto) in
[#​1746](spectreconsole/spectre.console#1746)
* Fixed link not displayed in markup in Style.cs and added unit test
cases by [@​Elementttto](https://github.com/Elementttto) in
[#​1750](spectreconsole/spectre.console#1750)
* Update System.Memory dependency by
[@​WeihanLi](https://github.com/WeihanLi) in
[#​1832](spectreconsole/spectre.console#1832)
* Reduce memory usage for rune width cache. by
[@​Pannoniae](https://github.com/Pannoniae) in
[#​1756](spectreconsole/spectre.console#1756)
* Fix resizing of Live views with reduced size. by
[@​belucha](https://github.com/belucha) in
[#​1840](spectreconsole/spectre.console#1840)
* Corrects comment for optional text prompt by
[@​aljanabim](https://github.com/aljanabim) in
[#​1857](spectreconsole/spectre.console#1857)
* Update spinners by [@​FroggieFrog](https://github.com/FroggieFrog) in
[#​1873](spectreconsole/spectre.console#1873)
* Support J and K for navigating list prompts by
[@​tobias-tengler](https://github.com/tobias-tengler) in
[#​1877](spectreconsole/spectre.console#1877)
* Fix space triggering selection when items in the selection list have a
space. by [@​mitchdenny](https://github.com/mitchdenny) in
[#​1881](spectreconsole/spectre.console#1881)
* Fix bug setting Header by
[@​mattfennerom](https://github.com/mattfennerom) in
[#​1890](spectreconsole/spectre.console#1890)

## New Contributors
* [@​magiino](https://github.com/magiino) made their first contribution
in [#​1803](spectreconsole/spectre.console#1803)
* [@​bartoginski](https://github.com/bartoginski) made their first
contribution in
[#​1807](spectreconsole/spectre.console#1807)
* [@​Elementttto](https://github.com/Elementttto) made their first
contribution in
[#​1746](spectreconsole/spectre.console#1746)
* [@​WeihanLi](https://github.com/WeihanLi) made their first
contribution in
[#​1832](spectreconsole/spectre.console#1832)
* [@​Pannoniae](https://github.com/Pannoniae) made their first
contribution in
[#​1756](spectreconsole/spectre.console#1756)
* [@​belucha](https://github.com/belucha) made their first contribution
in [#​1840](spectreconsole/spectre.console#1840)
* [@​aljanabim](https://github.com/aljanabim) made their first
contribution in
[#​1857](spectreconsole/spectre.console#1857)
* [@​FroggieFrog](https://github.com/FroggieFrog) made their first
contribution in
[#​1873](spectreconsole/spectre.console#1873)
* [@​tobias-tengler](https://github.com/tobias-tengler) made their first
contribution in
[#​1877](spectreconsole/spectre.console#1877)
* [@​mitchdenny](https://github.com/mitchdenny) made their first
contribution in
[#​1881](spectreconsole/spectre.console#1881)
* [@​mattfennerom](https://github.com/mattfennerom) made their first
contribution in
[#​1890](spectreconsole/spectre.console#1890)

**Full Changelog**:
spectreconsole/spectre.console@0.50.0...0.51.1

Commits viewable in [compare
view](https://github.com/spectreconsole/spectre.console/commits).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Spectre.Console&package-manager=nuget&previous-version=0.50.0&new-version=0.53.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

<!-- RECURSEML_SUMMARY:START -->
## High-level PR Summary
This PR updates the `Spectre.Console` dependency from version 0.50.0 to
0.53.0, bringing in bug fixes, new features like required options
support, improved memory usage, and better list prompt navigation (J/K
keys support).

⏱️ Estimated Review Time: 5-15 minutes

<details>
<summary>💡 Review Order Suggestion</summary>

| Order | File Path |
|-------|-----------|
| 1 | `Directory.Packages.props` |
</details>



[![Need help? Join our
Discord](https://img.shields.io/badge/Need%20help%3F%20Join%20our%20Discord-5865F2?style=plastic&logo=discord&logoColor=white)](https://discord.gg/n3SsVDAW6U)

<!-- RECURSEML_SUMMARY:END -->

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing To Render On Windows Terminal

3 participants