Skip to content

docs: terminal.rs#20

Merged
ynqa merged 7 commits into
v0.3.0/devfrom
sophisticate-terminal
Feb 28, 2026
Merged

docs: terminal.rs#20
ynqa merged 7 commits into
v0.3.0/devfrom
sophisticate-terminal

Conversation

@ynqa
Copy link
Copy Markdown
Owner

@ynqa ynqa commented Feb 28, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 28, 2026 02:33
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

Improves clarity and maintainability of the terminal rendering code by documenting scroll-region behavior, encapsulating ANSI escape generation, and making the fallible constructor naming more explicit.

Changes:

  • Introduce helpers for generating scroll-region CSI sequences and use them when applying/resetting the scroll region.
  • Rename Terminal::new to Terminal::try_new and update the call site.
  • Inline pane redraw logic into draw_pane and expand documentation/comments around rendering behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/terminal.rs Adds scroll-region sequence helpers, renames constructor, and expands/clarifies rendering logic and documentation.
src/sig.rs Updates terminal initialization to use Terminal::try_new.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/terminal.rs
Comment on lines +25 to 27
/// Create a new Terminal instance and apply the initial scroll region.
pub fn try_new(size: (u16, u16), pane: &Pane) -> anyhow::Result<Self> {
let term = Self {
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The PR title indicates this is a documentation-only change, but this hunk also renames the constructor from new to try_new (and updates call sites), which is a functional/API change. Consider updating the PR title (and/or description) to reflect that it includes a small refactor, so release notes/changelogs and reviewer expectations stay accurate.

Copilot uses AI. Check for mistakes.
@ynqa ynqa merged commit 31cf503 into v0.3.0/dev Feb 28, 2026
7 checks passed
@ynqa ynqa deleted the sophisticate-terminal branch February 28, 2026 03:20
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