compiler-explorer / compiler-explorer/compiler-explorer
[REQUEST]: Add option for duplicating the code in the current source editor to new source editor
- Dominant language
- TypeScript
- Stars
- 19.1k
- Forks
- 2.1k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 67
Description
### Is your feature request related to a problem? Please describe
Sometimes we want to maintain and try out (almost) same source except for very few modifications to see what happens. This can be for perf comparison purposes, to try out a new feature from a different standard (say C++23 -> C++26) in the same code, or it can be simply just for learning purposes.
Currently, we have to manually copy the current code, do `Add New` `->` `Source Editor` and modify.
### Describe the solution you'd like
It would be great to have an option that does this in one or two clicks - like `Add New` `->` `Duplicate Source` or even `Add New` `->` `Duplicate Source+`. The former one just creates a new Source Editor with the source code in focus whereas the latter duplicates all the panes that are active w.r.t. to the current source code in focus (source editor, execution, compiler, conformance).
### Describe alternatives you've considered
Currently, I create a new Source Editor through `Add New` `->` `Source Editor` and manually copy paste and modify.
### Additional context
Not applicable
Contributor guide
Assessment
This issue has not been assessed yet.