-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 #2009
Conversation
Could someone please review this PR. Thank you! |
@pi1024e I appreciate your excitement, but it’s the weekend here in Redmond where most of the team works. We try not to work too much outside normal working hours. |
Ok, is this good, or are there any requested changes? |
It looks like @zadjii-msft and @DHowett-MSFT had outstanding concerns with #1094 and whether it was even being solved in the right place. As such, I'm deferring to them to review this and decide how to proceed. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
fixed |
Rebased to be current. I hope these changes are appropriate! |
So for the record, @DHowett-MSFT mentioned in #1094
And I concur that's a good hypothesis to investigate. So I don't really want to merge this without first investigating if conpty can just make this happen automatically. |
Conpty does not, and I checked. The question now is: should I change this so the functionality is moved to conpty, or is this good as is? |
I would definitely want to make sure the conpty option is investigated first. I don't really have an idea of where to investigate that at the moment - I'd think we'd need to be smarter in the InteractDispatch/InputBuffer area about text that's input from conpty. We'd probably want to take into account the input mode that's set by the client app (if we're not already). I'd want to know what input records the InputStateMachineEngine is generating for pasted text with newline/carriage returns, and how the input buffer processes that text (compared to a normal conhost window). |
@pi1024e I'm going to close this PR for the time being. If you do investigate the conpty copy-paste and find a suitable solution, feel free to open another, or if you find that the conpty route is a dead end, I'd love to see an update on this thread. In the latter case, we'll be happy to re-open this PR. |
Looking at the conpty, I found it does nothing of the sort. That being written, I don't know if I should start over and add this functionality to conpty or keep it here. |
Pasted line endings only really happen when being pasted as input, so I do not think conpty should do that. |
This appears to be the best solution I can come up with |
No, conpty does not fix the line endings |
cc @zadjii-msft |
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 a manual test, ensuring this would not break any current code.