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 13, 2025
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