Skip to content

Replace text unescapes escape sequences - #1315

Open
JoltedJon wants to merge 1 commit into
Redot-Engine:masterfrom
JoltedJon:replace_escape
Open

Replace text unescapes escape sequences#1315
JoltedJon wants to merge 1 commit into
Redot-Engine:masterfrom
JoltedJon:replace_escape

Conversation

@JoltedJon

@JoltedJon JoltedJon commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Currently in the find and replace for the editor if you were to try to do something like '\t in the replace section it will keep it escaped. This PR makes it so that it will instead replace it with the unescaped version of an actual tab character. Useful for cases where you copy from one editor that uses spaces and you want to replace those spaces with tab characters.

Summary by CodeRabbit

  • Bug Fixes
    • Replacement text in the find-and-replace tool now correctly interprets C-style escape sequences before applying replacements.

@JoltedJon
JoltedJon requested review from a team July 19, 2026 23:03
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ee536659-4efb-4a06-a40f-83f376fd7e4d

📥 Commits

Reviewing files that changed from the base of the PR and between d890d7d and 7a311a3.

📒 Files selected for processing (1)
  • editor/gui/code_editor.cpp

Walkthrough

FindReplaceBar::get_replace_text() now returns the replacement field contents after C-style unescaping.

Changes

Replacement Text Handling

Layer / File(s) Summary
Unescape replacement input
editor/gui/code_editor.cpp
FindReplaceBar::get_replace_text() applies c_unescape() before returning replacement text.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 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 matches the main change: replacement text now unescapes escape sequences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PR with unit tests

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.

@Shakai-Dev Shakai-Dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants