add OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT #4996
Merged
+6
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Perfect! I've successfully implemented the feature. Here's a summary of the changes:
Changes Made
1. Added flag to
flag.ts(line 20):OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTflag that reads from theOPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTenvironment variable"true"or"1", it will disable the copy-on-select behavior2. Updated
app.tsx(lines 464-467):FlagnamespaceonMouseUphandler to check ifFlag.OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTis enabledHow to Use
Users can now disable copy-on-select by setting the environment variable:
export OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT=true opencodeOr with value
"1":This will allow users to highlight text without automatically polluting their clipboard, addressing the issue raised in #2845.
Closes #4751
opencode session | github run