Add skeleton code for bracketed paste mode#8840
Conversation
|
I think I should add a TODO in the comment, but I don't really know where is the best place. Also maybe filing another issue to actually implement "bracketed paste mode"? |
|
We can continue using 395. 😄 |
I'm totally OK with it. So this is just another trivial PR. Don't know if it can make it to the 1.6 release train, but here it is. |
| case DispatchTypes::ModeParams::ASB_AlternateScreenBuffer: | ||
| fSuccess = fEnable ? UseAlternateScreenBuffer() : UseMainScreenBuffer(); | ||
| break; | ||
| case DispatchTypes::ModeParams::XTERM_BracketedPasteMode: |
There was a problem hiding this comment.
I see no test case for like Win32InputMode. So I didn't add one for BracketedPasteMode. Adding one would be trivial, though.
zadjii-msft
left a comment
There was a problem hiding this comment.
Meh this looks fine to me. We're not really adding anything too interesting here, so the rest is pretty straightforward. I'll make sure that @DHowett gets his eyes on this, since he's the bracketed-paste expert
DHowett
left a comment
There was a problem hiding this comment.
Minor comments, but it's a small PR so I'll block for now 😄
| // - enabled - true to enable, false to disable. | ||
| // Return value: | ||
| // True if handled successfully. False otherwise. | ||
| bool TerminalDispatch::EnableBracketedPasteMode(const bool enabled) noexcept |
There was a problem hiding this comment.
I'd prefer this be called EnableXtermBracketedPasteMode, just to add more "namespacing". Thoughts?
There was a problem hiding this comment.
I mean, I'm OK with changing this. But is there any other BracketedPasteMode that't not Xterm-licensed?
There was a problem hiding this comment.
Honestly, I thought I had a stronger case. It looks like our other "Enable" methods are split 50/50 on whether they have the "origin" (where they came from) -- "[VT220]MouseMode", "[DEC]COLMSupport", "[Win32]InputMode". The others don't. Thanks for making the change anyway 😄
| return success; | ||
| } | ||
|
|
||
| //Routine Description: |
There was a problem hiding this comment.
nit: comment format should have spaces after the /
There was a problem hiding this comment.
You know I copied it from the other methods in this file. Take a look at them then you know why it looks like this.
There was a problem hiding this comment.
OH. Okay. I don't care then! I won't make you fix that 😄
|
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This adds the skeleton code for "bracketed paste mode" to the Windows Terminal. No actual functionality is implemented yet, just the wiring for handling DECSET/DECRST 2004. References microsoft#395 Supersedes microsoft#7508
This adds the skeleton code for "bracketed paste mode" to the Windows
Terminal. No actual functionality is implemented yet, just the wiring
for handling DECSET/DECRST 2004.
References #395
Supersedes #7508