-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix copy button not working for REPL error output #40669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix copy button not working for REPL error output #40669
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Henry Michaelson.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
You'll need to sign the CLA for us to merge this. |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Henry Michaelson.
|
|
The cla-bot has been summoned, and re-checked this pull request! |
8f8a74a to
e0f7f2d
Compare
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Henry Michaelson.
|
e0f7f2d to
7c43d84
Compare
|
@Veykril Done! Thank you. |
- Fixed copy button functionality in REPL error output section - Ensured both stdout/stderr and error sections have working copy buttons Fixes zed-industries#40207
05b1492 to
0384fc4
Compare
Description
Fixes the copy button functionality in REPL interactive mode error output sections.
When executing Python code that produces errors in the REPL (e.g.,
NameError), the copy button in the error output section was unresponsive. The stdout/stderr copy button worked correctly, but the error traceback section copy button had no effect when clicked.Fixes #40207
Changes
Modified the following:
src/outputs.rs: Fixed context issues in render_output_controls by replacing cx.listener() with simple closures, and added custom button implementation for ErrorOutput that copies/opens the complete error (name + message + traceback)
src/outputs/plain.rs: Made full_text() method public to allow access from button handlers
src/outputs/user_error.rs: Added Clone derive to ErrorView struct and removed a couple pieces of commented code
Why This Matters
The copy button was clearly broken and it is useful to have for REPL workflows. Users could potentially need to copy error messages for a variety of reasons.
Testing
See attached demo for proof that the fix is working as intended. (this is my first ever commit, if there are additional test cases I need to write or run, please let me know!)
Screen.Recording.2025-10-19.at.10.15.06.PM.mov
Release Notes: