docs: terminal.rs#20
Conversation
There was a problem hiding this comment.
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::newtoTerminal::try_newand update the call site. - Inline pane redraw logic into
draw_paneand 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.
| /// 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 { |
There was a problem hiding this comment.
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.
No description provided.