-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Enable Copy As Path/Paste with Path Translation in *nix profiles #19037
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ static Microsoft::Console::TSF::Handle& GetTSFHandle() | |
|
||
namespace winrt::Microsoft::Terminal::Control::implementation | ||
{ | ||
static void _translatePathInPlace(std::wstring& fullPath, PathTranslationStyle translationStyle) | ||
void TermControl::_translatePathInPlace(std::wstring& fullPath, PathTranslationStyle translationStyle) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding your question in the issue, you can put helpers here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you want me to move this or is what I did here ok? |
||
{ | ||
static constexpr wil::zwstring_view s_pathPrefixes[] = { | ||
{}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wrap it in a
path
first?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I didn't want to blindly send all text to the translation routine. If we don't have a path, it doesnt make sense to even try to translate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading your code correctly, if you replace all mentions of the
path
variable withfiltered
, the code will do the exact same it does now. But it would avoid making a redundant copy of the string.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove the path piece
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the translation routine does do some checks that it is looking at a path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was being over cautious I suppose.