Skip to content

Fix ratatui 0.30 compatibility issues#49

Merged
Byron merged 2 commits intoupdatesfrom
copilot/sub-pr-48
Jan 8, 2026
Merged

Fix ratatui 0.30 compatibility issues#49
Byron merged 2 commits intoupdatesfrom
copilot/sub-pr-48

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Ratatui 0.30 introduced breaking API changes that caused compilation failures and deprecation warnings.

Changes

  • AnsiString width calculation: Use .as_str() to access underlying string content before calling .width()

    // Before
    strings.iter().map(|s| s.width() as u16).sum()
    
    // After
    strings.iter().map(|s| s.as_str().width() as u16).sum()
  • Buffer indexing: Replace deprecated get_mut(x, y) with indexing syntax [(x, y)]

    // Before
    buf.get_mut(x, y).set_symbol("─")
    
    // After
    buf[(x, y)].set_symbol("─")
  • Rect::area() return type: Changed from u16 to u32, updated comparisons with u32::from() conversions in example code


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade ratatui to v0.30 Fix ratatui 0.30 compatibility issues Jan 8, 2026
Copilot AI requested a review from Byron January 8, 2026 06:36
@Byron Byron marked this pull request as ready for review January 8, 2026 06:57
@Byron Byron merged commit fa4a623 into updates Jan 8, 2026
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.

2 participants