-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Convert Pasted Line Endings and then send to compty #2390
Conversation
cc: @zadjii-msft, I would like to get your input, as conpty does no such thing. |
* We can now connect to the Azure cloud shell #1235
…suitable to send to connection
@DHowett May I please get your opinion on this too? |
Hey, so, I just had a look at a bunch of other terminal emulators. It looks like they all (unconfigurably!) transform Here's why I think that: Windows Terminal wants to be a standards-compliant--or, as compliant as it can be--terminal emulator. It should act in every way like every other terminal emulator. If that means that it only ever sends an enter keypress as By making Windows Terminal compliant with specified standard (search for Also, unrelatedly, it is very hard for us to accept pull requests that also make unrelated code style and formatting changes. Please try to refrain from doing that! |
So we should put this functionality in Conpty? got it. |
Wait no! Conpty handles this correctly (translating \r to Enter), so Terminal should always translate \r\n to \r. We don’t need a configuration option for it :) |
Ok, got it. so no need to do this here, right? |
Right, we just need to make |
I did mean “endings” 😄 |
oh wow, we need this! 😱 |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
So should I go and do those changes? Or is there work being done already |
@pi1024e we’d love that! No work is ongoing here. |
I'm going to close this one out -- please let me know if you still want to work on the final iteration! If not, I might make an attempt at it myself. 😄 |
I am going to open a new PR following your advice. Thank you! |
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #1091 #1094 #2390 #3314 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1091 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Combination of the PRs #1094, #2390, and #3314, especially as discussed in #3314. In short, this changes line endings from Windows-space \r\n to the more universal \r. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Copied and pasted text into the terminal without the patch, line endings were doubled. With the patch, line endings weren't doubled. -------------------- * Replacing \r\n line endings with \r line endings * Fixing Formatting
Summary of the Pull Request
This is from a PR request by @d-bingham. However, there have been 89 commits since then, and there are merge conflicts that have not been attended to in a month, and I think converting pasted line endings is a neat idea, so this PR has the changes in PR#1094, but rebased to be current.
References
PR#1094
PR Checklist
Detailed Description of the Pull Request / Additional comments
@d-bingham said
Validation Steps Performed
I performed manual and automated testing to ensure this would not break any current code.