Skip to content

[DRAFT] Handle text_viewer '^' characters - #433

Draft
networkfusion wants to merge 1 commit into
n64brew:developfrom
networkfusion:improve-textviewer
Draft

networkfusion wants to merge 1 commit into
n64brew:developfrom
networkfusion:improve-textviewer

Conversation

@networkfusion

@networkfusion networkfusion commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

handle escape sequences (first attempt).
Works towards #420

Description

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that adds a new feature)
  • Bug fix (fixes an issue)
  • Breaking change (breaking change)
  • Documentation Improvement
  • Config and build (change in the configuration and build system, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

You agree with the license terms and that other license types may be granted with permission of the original N64FlashcartMenu project license holders.

Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>

Summary by CodeRabbit

  • Bug Fixes
    • Caret (^) characters in text files now display as written instead of being interpreted as formatting escapes, so the viewer preserves the original text. This improves readability for files that contain carets and prevents their surrounding content from being unintentionally formatted.

handle escape sequences (first attempt).
Works towards n64brew#420
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7dad3aaf-8854-4588-84b7-48d47b2fcdde

📥 Commits

Reviewing files that changed from the base of the PR and between 7093d3f and 6ff13d6.

📒 Files selected for processing (1)
  • src/menu/views/text_viewer.c

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The text viewer now doubles literal carets in file contents before passing them to the renderer. It checks the file position and reports errors if position lookup or expanded-buffer allocation fails.

Changes

Text viewer content handling

Layer / File(s) Summary
Count and escape literal carets
src/menu/views/text_viewer.c
The viewer defines TEXT_VIEWER_ESCAPE_CHAR, counts carets, and doubles each caret in an expanded buffer. It updates the stored length and reports errors if file-position lookup or buffer allocation fails.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6ff13

The change preserves literal carets in displayed files without interpreting them as formatting. No merge-blocking issue was identified; merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: handling '^' characters in text_viewer. It is concise and directly related to the implementation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

1 participant