[WIP] Rewrite paste and drag/drop broadcasting#20165
Conversation
| co_return; | ||
| } | ||
|
|
||
| // TODO(DH) the fuckin' delimiter from DragDropDelimiter |
| return profileMenuItemFlyout; | ||
| } | ||
|
|
||
| static void _translatePathInPlace(std::wstring& fullPath, PathTranslationStyle translationStyle) |
There was a problem hiding this comment.
Move this to a helper somewhere, not into the nearly 9000-line TerminalPage
This comment has been minimized.
This comment has been minimized.
| SetForegroundWindow(*_hostingHwnd); | ||
| } | ||
|
|
||
| if (e.DataView().Contains(StandardDataFormats::ApplicationLink())) |
There was a problem hiding this comment.
per an internal PR on another feature, just like the clipboard, ENUMERATE the formats and then pick the first one we support. It lets the source app order them in its preferred manner
| } | ||
|
|
||
| // TODO(DH) the fuckin' delimiter from DragDropDelimiter | ||
| std::unordered_map<PathTranslationStyle, winrt::hstring> translatedPaths; |
There was a problem hiding this comment.
the cache is too over-engineered anyway. just eat the cost of enumerating the list of filenames more than once.
| return _control.CharacterDimensions(); | ||
| } | ||
|
|
||
| TerminalApp::TerminalPaneContent TerminalPaneContent::ContentFromControl(const winrt::Microsoft::Terminal::Control::TermControl& control) |
There was a problem hiding this comment.
okay the REAL reason that we need to use TerminalPaneContent instead of TermControl as the broadcast medium is that TPC knows the Profile (app layer) and Control doesn't (control layer)
There was a problem hiding this comment.
the two ways I've figured out how to go from Control to Profile are:
- this weak mapping you see here
- enumerate every pane to find the pane whose content's control is the current control (which sounds frankly stupid)
if you have a better way to do this than either of those... plz holler
in my asciicast work, i needed to associate a third thing with each control: the Recorder instance.
4ebafba to
f42146f
Compare
This comment has been minimized.
This comment has been minimized.
Add the broadcast group helpers Port paste to the broadcast helpers
f42146f to
b9e56de
Compare
Targets #20155.
I'm opening this to leave some notes.