Skip to content

Switch from crossterm to tuinix for terminal handling#7

Merged
sile merged 16 commits intomainfrom
tuinix
Apr 29, 2025
Merged

Switch from crossterm to tuinix for terminal handling#7
sile merged 16 commits intomainfrom
tuinix

Conversation

@sile
Copy link
Copy Markdown
Owner

@sile sile commented Apr 29, 2025

No description provided.

@sile sile requested a review from Copilot April 29, 2025 06:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR switches the terminal handling from the crossterm library to tuinix. The key changes include:

  • Updating widget modules (search result, legend, command editor) to use tuinix types and functions.
  • Removing the legacy terminal module and associated crossterm dependencies.
  • Refactoring the canvas module to replace TokenStyle/TokenPosition with TerminalStyle/TerminalPosition and providing a new API for converting canvas frames.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/widget_search_result.rs Updated terminal API usage from crossterm to tuinix.
src/widget_legend.rs Replaced styling and position types with their tuinix equivalents.
src/widget_command_editor.rs Adapted key input handling and styling to use tuinix API.
src/terminal.rs Entirely removed as terminal handling shifts to tuinix.
src/lib.rs Removed reference to the removed terminal module.
src/canvas.rs Refactored to use tuinix types; removed dirty_lines and TokenPosition.
src/app.rs Adjusted event handling and key input management to reflect new APIs.
Cargo.toml Removed crossterm dependency and added tuinix.
.cargo/config.toml Added a development alias.
Comments suppressed due to low confidence (2)

src/canvas.rs:278

  • The usage of 'TokenPosition' in the tests still remains even though it has been replaced by 'TerminalPosition'. Please update the test code accordingly.
canvas.draw_at(TokenPosition::row(0), Token::new("hello"));

src/canvas.rs:284

  • The tests are referencing the removed 'dirty_lines' function on the frame. Please update the tests to use the new 'into_terminal_frame' API or adjust the test logic.
assert_eq!(frame2.dirty_lines(&frame1).count(), 2);

@sile sile merged commit f2c4a5a into main Apr 29, 2025
9 checks passed
@sile sile deleted the tuinix branch April 29, 2025 06:21
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