Compare commits

..

9 Commits

Author SHA1 Message Date
Dustin L. Howett
1441a53b23 chore: upgrade gsl to 4.2.1 2026-05-15 18:00:25 -05:00
Dustin L. Howett
d53fbafe13 Fix a dependent template name 2026-05-15 18:00:25 -05:00
Dustin L. Howett
62468c97b2 vs26: suppress new gsl warning, lol
see microsoft/gsl#1242
2026-05-14 11:04:00 -05:00
Dustin L. Howett
720dfc99fe vcpkg: make sure we only query one VS installation... 2026-05-13 19:43:38 -05:00
Dustin L. Howett
75b6cefb9a build: use the VS18 agents even more 2026-05-13 19:37:42 -05:00
Dustin L. Howett
fddc80c98c build: use the VS18 agents 2026-05-13 19:31:19 -05:00
Dustin L. Howett
1507cf55f6 DEBUG:FASTLINK is not supported in VS 2026 2026-05-01 21:44:31 -05:00
Dustin L. Howett
48c935df99 Move all vcpkg triplets to v145 2026-05-01 21:41:26 -05:00
Dustin L. Howett
f5ea864a05 Move to VS 2026 and SDK 26100 2026-05-01 21:39:49 -05:00
47 changed files with 177 additions and 476 deletions

View File

@@ -860,17 +860,6 @@
<Folder Name="/_Dependencies/Console/">
<File Path="dep/Console/winconp.h" />
</Folder>
<Folder Name="/_Dependencies/gsl/">
<File Path="dep/gsl/include/gsl/gsl" />
<File Path="dep/gsl/include/gsl/gsl_algorithm" />
<File Path="dep/gsl/include/gsl/gsl_assert" />
<File Path="dep/gsl/include/gsl/gsl_byte" />
<File Path="dep/gsl/include/gsl/gsl_util" />
<File Path="dep/gsl/include/gsl/multi_span" />
<File Path="dep/gsl/include/gsl/pointers" />
<File Path="dep/gsl/include/gsl/span" />
<File Path="dep/gsl/include/gsl/string_span" />
</Folder>
<Folder Name="/_Dependencies/wil/">
<File Path="dep/wil/include/wil/common.h" />
<File Path="dep/wil/include/wil/filesystem.h" />

View File

@@ -59,6 +59,7 @@ stages:
name: SHINE-INT-L
${{ else }}:
name: SHINE-OSS-L
demands: ImageOverride -equals SHINE-VS18-Latest
buildPlatforms: [x64]
buildConfigurations: [AuditMode]
buildEverything: true
@@ -82,6 +83,7 @@ stages:
name: SHINE-INT-L
${{ else }}:
name: SHINE-OSS-L
demands: ImageOverride -equals SHINE-VS18-Latest
buildPlatforms:
- ${{ platform }}
buildConfigurations: [Release]

View File

@@ -58,7 +58,7 @@ parameters:
type: object
default:
name: SHINE-INT-S # By default, send jobs to the small agent pool.
demands: ImageOverride -equals SHINE-VS17-Latest
demands: ImageOverride -equals SHINE-VS18-Latest
variables:
- template: variables-nuget-package-version.yml
@@ -81,7 +81,7 @@ stages:
parameters:
pool:
name: SHINE-INT-L # Run the compilation on the large agent pool, rather than the default small one.
demands: ImageOverride -equals SHINE-VS17-Latest
demands: ImageOverride -equals SHINE-VS18-Latest
branding: ${{ parameters.branding }}
buildTerminal: ${{ parameters.buildTerminal }}
buildConPTY: ${{ parameters.buildConPTY }}

View File

@@ -1,6 +1,6 @@
steps:
- pwsh: |-
$VsInstallRoot = & 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -requires Microsoft.VisualStudio.Component.Vcpkg -property installationPath
$VsInstallRoot = & 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -requires Microsoft.VisualStudio.Component.Vcpkg -property installationPath -latest
If ([String]::IsNullOrEmpty($VsInstallRoot)) {
Remove-Item -Recurse -Force dep/vcpkg -ErrorAction:Ignore
git clone https://github.com/microsoft/vcpkg dep/vcpkg

View File

@@ -5,4 +5,4 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)

View File

@@ -5,7 +5,7 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -5,7 +5,7 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -5,7 +5,7 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -5,4 +5,4 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)

View File

@@ -5,4 +5,4 @@ set(VCPKG_LIBRARY_LINKAGE static)
# ...but with explicit platform toolset, so that future toolsets
# aren't automatically picked up (it defaults to the latest one).
set(VCPKG_PLATFORM_TOOLSET v143)
set(VCPKG_PLATFORM_TOOLSET v145)

View File

@@ -350,7 +350,7 @@ void ROW::_init() noexcept
std::iota(_charOffsets.begin(), _charOffsets.end(), uint16_t{ 0 });
#endif
#pragma warning(pop)
#pragma warning(push)
}
void ROW::CopyFrom(const ROW& source)

View File

@@ -669,15 +669,9 @@
<data name="UnsupportedSchemeText" xml:space="preserve">
<value>This link type is currently not supported:</value>
</data>
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="UnsafeUrlConfirmText" xml:space="preserve">
<value>This link may lead to an unsafe location. Hyperlinks can be harmful to your computer and data. To protect your computer, only click links from trusted sources.</value>
</data>
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
<value>Open anyway</value>
</data>
<data name="SettingsTab" xml:space="preserve">
<value>Settings</value>
</data>

View File

@@ -3085,42 +3085,18 @@ namespace winrt::TerminalApp::implementation
}
CATCH_LOG();
safe_void_coroutine TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
void TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
{
try
{
auto uriString{ eventArgs.Uri() };
auto parsed = winrt::Windows::Foundation::Uri(uriString);
auto parsed = winrt::Windows::Foundation::Uri(eventArgs.Uri());
if (_IsUriSupported(parsed))
{
bool shouldLaunch{ _IsUriConsideredSomewhatSafe(parsed) };
if (!shouldLaunch)
{
if (auto presenter{ _dialogPresenter.get() })
{
// FindName needs to be called first to actually load the xaml object
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
// Insert the reason and the URI
unopenedUriDialog.SecondaryButtonText(RS_(L"UnsafeUrlConfirmAllowAction"));
CouldNotOpenUriReason().Text(RS_(L"UnsafeUrlConfirmText"));
UnopenedUri().Text(uriString);
// Show the dialog
auto result = co_await presenter.ShowDialog(unopenedUriDialog);
shouldLaunch = result == ContentDialogResult::Secondary;
}
}
if (shouldLaunch)
{
ShellExecuteW(nullptr, L"open", uriString.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
}
ShellExecute(nullptr, L"open", eventArgs.Uri().c_str(), nullptr, nullptr, SW_SHOWNORMAL);
}
else
{
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), uriString);
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), eventArgs.Uri());
}
}
catch (...)
@@ -3140,10 +3116,9 @@ namespace winrt::TerminalApp::implementation
if (auto presenter{ _dialogPresenter.get() })
{
// FindName needs to be called first to actually load the xaml object
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
auto unopenedUriDialog = FindName(L"CouldNotOpenUriDialog").try_as<WUX::Controls::ContentDialog>();
// Insert the reason and the URI
unopenedUriDialog.SecondaryButtonText({});
CouldNotOpenUriReason().Text(reason);
UnopenedUri().Text(uri);
@@ -3196,30 +3171,6 @@ namespace winrt::TerminalApp::implementation
return true;
}
bool TerminalPage::_IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri)
{
if (parsedUri.SchemeName() == L"http" || parsedUri.SchemeName() == L"https")
{
return true;
}
if (parsedUri.SchemeName() == L"file")
{
static const auto pathext{ wil::TryGetEnvironmentVariableW<std::wstring>(L"PATHEXT") };
const auto filename = parsedUri.Path();
for (const auto& e : til::split_iterator{ std::wstring_view{ pathext }, L';' })
{
if (til::ends_with_insensitive_ascii(filename, e))
{
return false;
}
}
return true;
}
return false;
}
// Important! Don't take this eventArgs by reference, we need to extend the
// lifetime of it to the other side of the co_await!
safe_void_coroutine TerminalPage::_ControlNoticeRaisedHandler(const IInspectable /*sender*/,

View File

@@ -422,9 +422,8 @@ namespace winrt::TerminalApp::implementation
safe_void_coroutine _PasteFromClipboardHandler(const IInspectable sender,
const Microsoft::Terminal::Control::PasteFromClipboardEventArgs eventArgs);
safe_void_coroutine _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
static bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
static bool _IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri);
void _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
void _ShowCouldNotOpenDialog(winrt::hstring reason, winrt::hstring uri);
bool _CopyText(bool dismissSelection, bool singleLine, bool withControlSequences, Microsoft::Terminal::Control::CopyFormat formats);

View File

@@ -144,17 +144,17 @@
</TextBlock>
</ContentDialog>
<ContentDialog x:Name="UriErrorDialog"
x:Uid="UriErrorDialog"
<ContentDialog x:Name="CouldNotOpenUriDialog"
x:Uid="CouldNotOpenUriDialog"
Grid.Row="2"
x:Load="False"
DefaultButton="Close">
DefaultButton="Primary">
<TextBlock IsTextSelectionEnabled="True"
TextWrapping="WrapWholeWords">
<TextBlock.ContextFlyout>
<mtu:TextMenuFlyout />
</TextBlock.ContextFlyout>
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak /> <LineBreak />
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak />
<Run x:Name="UnopenedUri"
FontFamily="Cascadia Mono" />
</TextBlock>

View File

@@ -1935,6 +1935,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - args: event data
void TermControl::_TappedHandler(const IInspectable& /*sender*/, const TappedRoutedEventArgs& e)
{
Focus(FocusState::Pointer);
if (e.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Touch)
{
// Normally TSF would be responsible for showing the touch keyboard, but it's buggy for us:

View File

@@ -78,7 +78,6 @@
<Grid Padding="16,0">
<!-- Wrapping the BreadcrumbBar in a Grid to avoid the title to drift (and no longer being aligned with the content of the page) when resizing the window. It's weird, I know. I believe it has to do with https://github.com/microsoft/microsoft-ui-xaml/issues/3842 doing funky things when setting a MaxWidth -->
<muxc:BreadcrumbBar x:Name="NavigationBreadcrumbBar"
HorizontalAlignment="Left"
MaxWidth="1000"
ItemClicked="BreadcrumbBar_ItemClicked"
ItemsSource="{x:Bind Breadcrumbs}">

View File

@@ -36,42 +36,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
Automation::AutomationProperties::SetName(AddFolderButton(), RS_(L"NewTabMenu_AddFolderButton/[using:Windows.UI.Xaml.Controls]ToolTipService/ToolTip"));
Automation::AutomationProperties::SetName(AddMatchProfilesButton(), RS_(L"NewTabMenu_AddMatchProfilesTextBlock/Text"));
Automation::AutomationProperties::SetName(AddRemainingProfilesButton(), RS_(L"NewTabMenu_AddRemainingProfilesButton/[using:Windows.UI.Xaml.Controls]ToolTipService/ToolTip"));
// Constrain the page to the parent ScrollViewer's viewport so the preview
// stays fixed while only the left column scrolls internally.
Loaded([this](auto&&, auto&&) {
auto parent = Media::VisualTreeHelper::GetParent(*this);
while (parent)
{
if (const auto sv = parent.try_as<Controls::ScrollViewer>())
{
_parentScrollViewer = sv;
// Set the layout grid height to fill the viewport exactly
const auto updateHeight = [this]() {
if (_parentScrollViewer)
{
// Account for the Frame's bottom padding (48px) that reduces available space
const auto availableHeight = _parentScrollViewer.ViewportHeight() - 48;
if (availableHeight > 0)
{
MainLayoutGrid().Height(availableHeight);
}
}
};
updateHeight();
_sizeChangedRevoker = sv.SizeChanged(winrt::auto_revoke, [updateHeight](auto&&, auto&&) {
updateHeight();
});
break;
}
parent = Media::VisualTreeHelper::GetParent(parent);
}
});
Unloaded([this](auto&&, auto&&) {
_sizeChangedRevoker.revoke();
_parentScrollViewer = nullptr;
});
}
void NewTabMenu::OnNavigatedTo(const NavigationEventArgs& e)

View File

@@ -45,8 +45,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
private:
Editor::NewTabMenuEntryViewModel _draggedEntry{ nullptr };
winrt::weak_ref<Editor::IHostedInWindow> _weakWindowRoot;
winrt::Windows::UI::Xaml::Controls::ScrollViewer _parentScrollViewer{ nullptr };
winrt::Windows::UI::Xaml::FrameworkElement::SizeChanged_revoker _sizeChangedRevoker;
void _ScrollToEntry(const Editor::NewTabMenuEntryViewModel& entry);
};

View File

@@ -227,7 +227,13 @@
</ResourceDictionary>
</Page.Resources>
<Grid>
<Grid RowSpacing="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Folder Picker Dialog: used to select a folder to move entries to -->
<ContentDialog x:Name="FolderPickerDialog"
x:Uid="NewTabMenu_FolderPickerDialog"
@@ -261,100 +267,113 @@
</muxc:TreeView>
</ContentDialog>
<!--
Main layout Grid: supports both side-by-side (wide) and stacked (narrow) modes.
In wide mode: left column = controls, right column = preview (always visible).
In narrow mode: single column, preview on top (current behavior).
-->
<Grid x:Name="MainLayoutGrid"
ColumnSpacing="16">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ControlsColumn" Width="*" MaxWidth="600" />
<ColumnDefinition x:Name="PreviewColumn" Width="*" MaxWidth="600" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- New Tab Menu Content -->
<StackPanel Grid.Row="0"
MaxWidth="{StaticResource StandardControlMaxWidth}"
Spacing="8">
<Border Height="300"
MaxWidth="{StaticResource StandardControlMaxWidth}"
Margin="0,12,0,0"
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
BorderThickness="1"
CornerRadius="{ThemeResource ControlCornerRadius}">
<ListView x:Name="NewTabMenuListView"
AllowDrop="True"
CanDragItems="True"
CanReorderItems="True"
ItemTemplateSelector="{StaticResource NewTabMenuEntryTemplateSelector}"
ItemsSource="{x:Bind ViewModel.CurrentView, Mode=OneWay}"
SelectionMode="Multiple" />
</Border>
<!-- Left column: all controls -->
<ScrollViewer x:Name="ControlsScrollViewer"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="0"
VerticalScrollBarVisibility="Auto">
<StackPanel Spacing="0">
<!-- Current Folder Properties header -->
<TextBlock x:Name="FolderControlsHeader"
Margin="0,0,0,0"
x:Uid="NewTabMenu_CurrentFolderTextBlock"
Style="{StaticResource TextBlockSubHeaderStyle}"
Visibility="{x:Bind ViewModel.IsFolderView, Mode=OneWay}" />
<!-- Folder View Controls -->
<StackPanel x:Name="FolderControlsPanel"
MaxWidth="{StaticResource StandardControlMaxWidth}"
Visibility="{x:Bind ViewModel.IsFolderView, Mode=OneWay}">
<!-- Name -->
<local:SettingContainer x:Name="CurrentFolderName"
x:Uid="NewTabMenu_CurrentFolderName"
CurrentValue="{x:Bind ViewModel.CurrentFolderName, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind ViewModel.CurrentFolderName, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Icon -->
<local:SettingContainer x:Name="CurrentFolderIcon"
x:Uid="NewTabMenu_CurrentFolderIcon"
CurrentValueAccessibleName="{x:Bind ViewModel.CurrentFolderLocalizedIcon, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyleWithComplexPreview}">
<local:SettingContainer.CurrentValue>
<Grid>
<ContentControl Width="16"
Height="16"
Content="{x:Bind ViewModel.CurrentFolderIconPreview, Mode=OneWay}"
IsTabStop="False"
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(ViewModel.CurrentFolderUsingNoIcon), Mode=OneWay}" />
<TextBlock Margin="0,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
Style="{StaticResource SettingsPageItemDescriptionStyle}"
Text="{x:Bind ViewModel.CurrentFolderLocalizedIcon, Mode=OneWay}"
Visibility="{x:Bind ViewModel.CurrentFolderUsingNoIcon, Mode=OneWay}" />
</Grid>
</local:SettingContainer.CurrentValue>
<local:SettingContainer.Content>
<local:IconPicker CurrentIconPath="{x:Bind ViewModel.CurrentFolderIconPath, Mode=TwoWay}"
WindowRoot="{x:Bind WindowRoot, Mode=OneWay}" />
</local:SettingContainer.Content>
</local:SettingContainer>
<!-- Inlining -->
<local:SettingContainer x:Name="CurrentFolderInlining"
x:Uid="NewTabMenu_CurrentFolderInlining">
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderInlining, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Allow Empty -->
<local:SettingContainer x:Name="CurrentFolderAllowEmpty"
x:Uid="NewTabMenu_CurrentFolderAllowEmpty">
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderAllowEmpty, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- General Controls -->
<StackPanel Orientation="Horizontal"
Spacing="10">
<Button x:Name="MoveToFolderButton"
Click="MoveMultiple_Click"
IsEnabled="False">
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="{StaticResource StandardIconSize}"
Glyph="&#xE8DE;" />
<TextBlock x:Uid="NewTabMenu_MoveToFolderTextBlock"
Margin="8,0,0,0" />
</StackPanel>
</Button>
<Button x:Name="DeleteMultipleButton"
Click="DeleteMultiple_Click"
IsEnabled="False"
Style="{StaticResource DeleteButtonStyle}">
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="{StaticResource StandardIconSize}"
Glyph="&#xE74D;" />
<TextBlock x:Uid="NewTabMenu_DeleteMultipleTextBlock"
Margin="8,0,0,0" />
</StackPanel>
</Button>
</StackPanel>
</StackPanel>
<!-- Add Entries header -->
<TextBlock x:Name="AddEntriesHeader"
Margin="0,0,0,0"
x:Uid="NewTabMenu_AddEntriesTextBlock"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Folder View Controls -->
<StackPanel Grid.Row="1"
MaxWidth="{StaticResource StandardControlMaxWidth}"
Visibility="{x:Bind ViewModel.IsFolderView, Mode=OneWay}">
<TextBlock x:Uid="NewTabMenu_CurrentFolderTextBlock"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Name -->
<local:SettingContainer x:Name="CurrentFolderName"
x:Uid="NewTabMenu_CurrentFolderName"
CurrentValue="{x:Bind ViewModel.CurrentFolderName, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind ViewModel.CurrentFolderName, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Add Entries -->
<StackPanel x:Name="AddEntriesPanel">
<!-- Icon -->
<local:SettingContainer x:Name="CurrentFolderIcon"
x:Uid="NewTabMenu_CurrentFolderIcon"
CurrentValueAccessibleName="{x:Bind ViewModel.CurrentFolderLocalizedIcon, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyleWithComplexPreview}">
<local:SettingContainer.CurrentValue>
<Grid>
<ContentControl Width="16"
Height="16"
Content="{x:Bind ViewModel.CurrentFolderIconPreview, Mode=OneWay}"
IsTabStop="False"
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(ViewModel.CurrentFolderUsingNoIcon), Mode=OneWay}" />
<TextBlock Margin="0,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
Style="{StaticResource SettingsPageItemDescriptionStyle}"
Text="{x:Bind ViewModel.CurrentFolderLocalizedIcon, Mode=OneWay}"
Visibility="{x:Bind ViewModel.CurrentFolderUsingNoIcon, Mode=OneWay}" />
</Grid>
</local:SettingContainer.CurrentValue>
<local:SettingContainer.Content>
<local:IconPicker CurrentIconPath="{x:Bind ViewModel.CurrentFolderIconPath, Mode=TwoWay}"
WindowRoot="{x:Bind WindowRoot, Mode=OneWay}" />
</local:SettingContainer.Content>
</local:SettingContainer>
<!-- Inlining -->
<local:SettingContainer x:Name="CurrentFolderInlining"
x:Uid="NewTabMenu_CurrentFolderInlining">
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderInlining, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Allow Empty -->
<local:SettingContainer x:Name="CurrentFolderAllowEmpty"
x:Uid="NewTabMenu_CurrentFolderAllowEmpty">
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderAllowEmpty, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
<!-- Add Entries -->
<StackPanel Grid.Row="2">
<TextBlock x:Uid="NewTabMenu_AddEntriesTextBlock"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Add Profile -->
<local:SettingContainer x:Name="AddProfile"
@@ -496,102 +515,5 @@
</Button>
</local:SettingContainer>
</StackPanel>
</StackPanel>
</ScrollViewer>
<!-- Dropdown Menu Content (Preview) -->
<StackPanel x:Name="PreviewPanel"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1">
<!-- Spacer matching left column header height so preview aligns with first setting card -->
<Border x:Name="PreviewSpacer"
Height="24" />
<Border x:Name="PreviewBorder"
Height="300"
VerticalAlignment="Top"
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
BorderThickness="1"
CornerRadius="{ThemeResource ControlCornerRadius}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView x:Name="NewTabMenuListView"
Grid.Row="0"
AllowDrop="True"
CanDragItems="True"
CanReorderItems="True"
ItemTemplateSelector="{StaticResource NewTabMenuEntryTemplateSelector}"
ItemsSource="{x:Bind ViewModel.CurrentView, Mode=OneWay}"
SelectionMode="Multiple" />
<!-- General Controls -->
<StackPanel Grid.Row="1"
Padding="8"
Orientation="Horizontal"
Spacing="10">
<Button x:Name="MoveToFolderButton"
Click="MoveMultiple_Click"
IsEnabled="False">
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="{StaticResource StandardIconSize}"
Glyph="&#xE8DE;" />
<TextBlock x:Uid="NewTabMenu_MoveToFolderTextBlock"
Margin="8,0,0,0" />
</StackPanel>
</Button>
<Button x:Name="DeleteMultipleButton"
Click="DeleteMultiple_Click"
IsEnabled="False"
Style="{StaticResource DeleteButtonStyle}">
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="{StaticResource StandardIconSize}"
Glyph="&#xE74D;" />
<TextBlock x:Uid="NewTabMenu_DeleteMultipleTextBlock"
Margin="8,0,0,0" />
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Border>
</StackPanel>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<!-- Narrow: single column, stacked vertically -->
<VisualState x:Name="Narrow">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="ControlsColumn.Width" Value="0" />
<Setter Target="ControlsColumn.MaxWidth" Value="0" />
<Setter Target="PreviewColumn.Width" Value="*" />
<Setter Target="PreviewColumn.MaxWidth" Value="Infinity" />
<Setter Target="MainLayoutGrid.ColumnSpacing" Value="0" />
<Setter Target="PreviewPanel.(Grid.Column)" Value="1" />
<Setter Target="PreviewPanel.(Grid.Row)" Value="0" />
<Setter Target="PreviewBorder.MaxWidth" Value="{StaticResource StandardControlMaxWidth}" />
<Setter Target="PreviewBorder.Height" Value="300" />
<Setter Target="PreviewSpacer.Height" Value="0" />
<Setter Target="ControlsScrollViewer.(Grid.Column)" Value="1" />
<Setter Target="ControlsScrollViewer.(Grid.Row)" Value="1" />
</VisualState.Setters>
</VisualState>
<!-- Wide: two columns, preview on the right -->
<VisualState x:Name="Wide">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="900" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="PreviewBorder.Height" Value="NaN" />
<Setter Target="PreviewBorder.MinHeight" Value="300" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</Grid>
</Page>

View File

@@ -2744,12 +2744,4 @@
<value>Tippen, um Symbole zu filtern</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Trennzeichen per Drag &amp;amp; Drop</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Dieser Text wird zwischen den Pfaden mehrerer in das Terminal gezogener Dateien eingefügt.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2374,8 +2374,8 @@
<comment>Accessible name for a control allowing the user to select the icon from a list of built in icons.</comment>
</data>
<data name="Nav_NewTabMenu.Content" xml:space="preserve">
<value>Dropdown Menu</value>
<comment>Header for the "dropdown menu" menu item. This navigates to a page that lets you see and modify settings related to the app's dropdown menu (i.e. profile ordering, nested folders, dividers, etc.)</comment>
<value>New Tab Menu</value>
<comment>Header for the "new tab menu" menu item. This navigates to a page that lets you see and modify settings related to the app's new tab menu (i.e. profile ordering, nested folders, dividers, etc.)</comment>
</data>
<data name="NewTabMenuEntry_Separator.Text" xml:space="preserve">
<value>&lt;Separator&gt;</value>
@@ -2610,19 +2610,19 @@
<comment>An option to choose from for the "path translation" setting.</comment>
</data>
<data name="Profile_PathTranslationStyleWsl.Content" xml:space="preserve">
<value>WSL (C:\ 🡒 /mnt/c)</value>
<value>WSL (C:\ -&gt; /mnt/c)</value>
<comment>{Locked="WSL","C:\","/mnt/c"} An option to choose from for the "path translation" setting.</comment>
</data>
<data name="Profile_PathTranslationStyleCygwin.Content" xml:space="preserve">
<value>Cygwin (C:\ 🡒 /cygdrive/c)</value>
<value>Cygwin (C:\ -&gt; /cygdrive/c)</value>
<comment>{Locked="Cygwin","C:\","/cygdrive/c"} An option to choose from for the "path translation" setting.</comment>
</data>
<data name="Profile_PathTranslationStyleMsys2.Content" xml:space="preserve">
<value>MSYS2 (C:\ 🡒 /c)</value>
<value>MSYS2 (C:\ -&gt; /c)</value>
<comment>{Locked="MSYS2","C:\","/c"} An option to choose from for the "path translation" setting.</comment>
</data>
<data name="Profile_PathTranslationStyleMinGW.Content" xml:space="preserve">
<value>MinGW (C:\ 🡒 C:/)</value>
<value>MinGW (C:\ -&gt; C:/)</value>
<comment>{Locked="MinGW","C:\","C:/"} An option to choose from for the "path translation" setting.</comment>
</data>
<data name="Profile_Delete_Orphaned.Header" xml:space="preserve">

View File

@@ -2744,12 +2744,4 @@
<value>Escriba para filtrar iconos</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Delimitador de arrastrar y colocar</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Este texto se insertará entre las rutas de acceso de varios archivos colocados en el terminal.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>Taper pour filtrer les icônes</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Glisser-déplacer le délimiteur</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Ce texte sera inséré entre les chemins daccès de plusieurs fichiers déposés dans le terminal.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>Digita per filtrare icone</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Trascina e rilascia il delimitatore</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Questo testo verrà inserito tra i percorsi di più file trascinati nel terminale.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>入力してアイコンをフィルター処理します</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>ドラッグ アンド ドロップ区切り記号</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>このテキストは、ターミナルにドロップされた複数のファイルのパスの間に挿入されます。</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>입력하여 아이콘 필터링</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>끌어서 놓기 구분 기호</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>이 텍스트는 터미널에 놓인 여러 파일의 경로 사이에 삽입됩니다.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>Digite para filtrar ícones</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Delimitador de Arrastar e soltar</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Este texto será inserido entre os caminhos de vários arquivos descartados no terminal.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2748,12 +2748,4 @@
<value>Тÿρě ţθ ƒíŀŧēŗ īçōйš !!! !!!</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Đґâġ ąńð δŗορ ďèŀιмïţ℮я !!! !!! </value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Тĥїś ťэхť ẃĭŀł вё îⁿŝέŗŧеď вēťщ℮ěπ τĥę ρªτħѕ óƒ мџĺţīрℓé ƒĭļèś đяǿρрεδ ιйţθ ţħê ţèřмĭлªŀ. !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>
</root>

View File

@@ -2748,12 +2748,4 @@
<value>Тÿρě ţθ ƒíŀŧēŗ īçōйš !!! !!!</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Đґâġ ąńð δŗορ ďèŀιмïţ℮я !!! !!! </value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Тĥїś ťэхť ẃĭŀł вё îⁿŝέŗŧеď вēťщ℮ěπ τĥę ρªτħѕ óƒ мџĺţīрℓé ƒĭļèś đяǿρрεδ ιйţθ ţħê ţèřмĭлªŀ. !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>
</root>

View File

@@ -2748,12 +2748,4 @@
<value>Тÿρě ţθ ƒíŀŧēŗ īçōйš !!! !!!</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Đґâġ ąńð δŗορ ďèŀιмïţ℮я !!! !!! </value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Тĥїś ťэхť ẃĭŀł вё îⁿŝέŗŧеď вēťщ℮ěπ τĥę ρªτħѕ óƒ мџĺţīрℓé ƒĭļèś đяǿρрεδ ιйţθ ţħê ţèřмĭлªŀ. !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>Введите текст для фильтрации значков</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Перетащите разделитель</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>Этот текст будет вставлен между путями нескольких файлов, перетащенных в терминал.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>键入以筛选图标</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>拖放分隔符</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>此文本将在放置到终端的多个文件的路径之间插入。</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -2744,12 +2744,4 @@
<value>輸入以篩選圖示</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>拖放分隔符號</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>這些文字會插入多個丟入終端機的檔案路徑之間。</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>

View File

@@ -176,9 +176,9 @@ namespace SettingsModelUnitTests
auto hashFromKey = [&](auto& kc) {
auto actionAndArgs = ::TestUtils::GetActionAndArgs(*actionMap, kc);
VERIFY_ARE_EQUAL(ShortcutAction::NewTab, actionAndArgs.Action());
const auto& realArgs = actionAndArgs.Args().as<NewTabArgs>();
const auto& realArgs = actionAndArgs.Args().template as<NewTabArgs>();
VERIFY_IS_NOT_NULL(realArgs.ContentArgs());
const auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
const auto terminalArgs{ realArgs.ContentArgs().template try_as<NewTerminalArgs>() };
return terminalArgs.Hash();
};

View File

@@ -75,7 +75,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">10.0.26100.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)' == ''">10.0.18362.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
@@ -95,7 +95,8 @@
<!-- For ALL build types-->
<PropertyGroup Label="Configuration">
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' &gt;= '18.0'">v145</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' == ''">v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<LinkIncremental>false</LinkIncremental>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
@@ -124,6 +125,8 @@
Conhost code converts DWORDs to HANDLEs for instance.
C4467: usage of ATL attributes is deprecated
Conhost code still uses ATL.
C4875: a non-string literal argument to [[gsl::suppress]] is deprecated ...
This diagnostic will be fixed in a newer version of GSL.
C26445: Do not assign std::span or std::string_view to a reference. They are cheap to construct and are not owners of the underlying data. (gsl.view).
Even for MSVC v19.32 this is actually far from true. Copying (as opposed to referencing) larger
than register-sized structures is fairly expensive. Example: https://godbolt.org/z/oPco88PaP
@@ -136,7 +139,7 @@
C26494: Variable 'index' is uninitialized. Always initialize an object (type. 5).
This diagnostic is broken in VS 17.7 which our CI currently uses. It's fixed in 17.8.
-->
<DisableSpecificWarnings>4201;4312;4467;5105;26434;26445;26456;26478;26494;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4201;4312;4467;4875;5105;26434;26445;26456;26478;26494;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>_WINDOWS;EXTERNAL_BUILD;_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
@@ -198,7 +201,6 @@
</ClCompile>
<Link>
<SetChecksum>false</SetChecksum>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>

View File

@@ -67,7 +67,7 @@ void FontTests::TestCurrentFontAPIsInvalid()
}
else
{
hConsoleOutput = ULongToHandle(dwConsoleOutput);
hConsoleOutput = (HANDLE)dwConsoleOutput;
}
if (strOperation == L"Get")
@@ -107,7 +107,7 @@ void FontTests::TestGetFontSizeInvalid()
// Need to make sure that last error is cleared so that we can verify that lasterror was set by GetConsoleFontSize
SetLastError(0);
auto coordFontSize = OneCoreDelay::GetConsoleFontSize(ULongToHandle(dwConsoleOutput), 0);
auto coordFontSize = OneCoreDelay::GetConsoleFontSize((HANDLE)dwConsoleOutput, 0);
VERIFY_ARE_EQUAL(coordFontSize, c_coordZero, L"Ensure (0,0) coord returned to indicate failure");
VERIFY_ARE_EQUAL(GetLastError(), (DWORD)ERROR_INVALID_HANDLE, L"Ensure last error was set appropriately");
}

View File

@@ -36,7 +36,7 @@ void ConhostInternalGetSet::UnknownSequence() noexcept
// us from using a more conservative solution (e.g. always fetching the cursor position).
if (gci.IsInVtIoMode())
{
gci.GetActiveOutputBuffer().GetActiveBuffer().SetConptyCursorPositionMayBeWrong();
gci.GetActiveOutputBuffer().SetConptyCursorPositionMayBeWrong();
}
}

View File

@@ -63,9 +63,8 @@
#include <wil/nt_result_macros.h>
// GSL
// Block GSL Multi Span include because it both has C++17 deprecated iterators
// and uses the C-namespaced "max" which conflicts with Windows definitions.
#include <gsl/gsl_util>
#include <gsl/narrow>
#include <gsl/util>
#include <gsl/pointers>
// CppCoreCheck

View File

@@ -241,7 +241,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
constexpr bool ends_with_insensitive_ascii(const std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& suffix) noexcept
{
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
return str.size() >= suffix.size() && equals_insensitive_ascii<>({ str.data() + str.size() - suffix.size(), suffix.size() }, suffix);
return str.size() >= suffix.size() && equals_insensitive_ascii<>({ str.data() - suffix.size(), suffix.size() }, suffix);
}
constexpr bool ends_with_insensitive_ascii(const std::string_view& str, const std::string_view& prefix) noexcept
@@ -251,7 +251,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
constexpr bool ends_with_insensitive_ascii(const std::wstring_view& str, const std::wstring_view& prefix) noexcept
{
return ends_with_insensitive_ascii<>(str, prefix);
return ends_with<>(str, prefix);
}
template<typename T, typename Traits>

View File

@@ -6,3 +6,8 @@
TARGETNAME = ConInteractivityOneCoreLib
TARGETTYPE = LIBRARY
# VSTS 14847240: Locally suppress individual -Wv:17 compiler warnings.
# For more information, visit https://osgwiki.com/wiki/Windows_C%2B%2B_Toolset_Status.
USER_C_FLAGS=$(USER_C_FLAGS) /wd4302 # 'conversion': truncation from 'type1' to 'type2'
USER_C_FLAGS=$(USER_C_FLAGS) /wd4311 # 'variable': pointer truncation from 'type 1' to 'type 2'

View File

@@ -30,7 +30,8 @@
#include <VersionHelpers.h>
#include <wincodec.h>
#include <gsl/gsl_util>
#include <gsl/narrow>
#include <gsl/util>
#include <gsl/pointers>
#include <wil/com.h>
#include <wil/filesystem.h>

View File

@@ -119,15 +119,12 @@ DWORD WINAPI Renderer::s_renderThread(void* param) noexcept
DWORD Renderer::_renderThread() noexcept
{
while (_threadKeepRunning.load(std::memory_order_relaxed))
while (true)
{
_enable.wait();
_waitUntilCanRender();
_waitUntilTimerOrRedraw();
// We just completed what could have been a long wait;
// eagerly check again to prevent rendering if we don't
// need to.
if (!_threadKeepRunning.load(std::memory_order_relaxed))
{
break;

View File

@@ -595,12 +595,9 @@ constexpr T saturate(auto val)
RETURN_IF_FAILED(pObjectHandle->GetScreenBuffer(GENERIC_READ, &pObj));
// See ConptyCursorPositionMayBeWrong() for details.
auto& activeBuffer = pObj->GetActiveBuffer();
// GetConsoleScreenBufferInfoExImpl uses GetActiveBuffer internally, but
// under the console lock.
if (activeBuffer.ConptyCursorPositionMayBeWrong())
if (pObj->ConptyCursorPositionMayBeWrong())
{
activeBuffer.WaitForConptyCursorPositionToBeSynchronized();
pObj->WaitForConptyCursorPositionToBeSynchronized();
}
m->_pApiRoutines->GetConsoleScreenBufferInfoExImpl(*pObj, ex);

View File

@@ -166,7 +166,7 @@ void InteractDispatch::MoveCursor(const VTInt row, const VTInt col)
// Unblock any callers inside SCREEN_INFORMATION::WaitForConptyCursorPositionToBeSynchronized().
// The cursor position has now been updated to the terminal's.
info.GetActiveBuffer().ResetConptyCursorPositionMayBeWrong();
info.ResetConptyCursorPositionMayBeWrong();
}
// Routine Description:

View File

@@ -31,7 +31,6 @@ Enum AssetType {
ApplicationBundle
PreinstallKit
GroupPolicy
NugetPackage
Zip
}
@@ -88,9 +87,6 @@ Class Asset {
} ElseIf (".zip" -eq $local:ext -and $local:filename -like 'GroupPolicy*') {
$this.Type = [AssetType]::GroupPolicy
$this.Architecture = "all"
} ElseIf (".nupkg" -eq $local:ext) {
$this.Type = [AssetType]::NugetPackage
$this.Architecture = "all"
} ElseIf (".zip" -eq $local:ext) {
$this.Type = [AssetType]::Zip
} ElseIf (".msixbundle" -eq $local:ext) {
@@ -112,13 +108,6 @@ Class Asset {
Write-Verbose "Parsing AppxManifest.xml"
$local:Manifest = [xml](Get-Content (Join-Path $local:directory AppxManifest.xml))
$this.ParseManifest($local:Manifest)
} ElseIf ($this.Type -Eq [AssetType]::NugetPackage) {
Write-Verbose "Cracking nuget package $($local:filename)"
& $script:tar -x -f $local:bundlePath -C $local:directory *.nuspec
$local:nuspec = Get-ChildItem $local:directory *.nuspec -Recurse | Select-Object -First 1
Write-Verbose "Parsing $($local:nuspec.Name)"
$local:Manifest = [xml](Get-Content $local:nuspec)
$this.ParseNuspec($local:Manifest)
} Else {
If ($this.Type -Ne [AssetType]::GroupPolicy) {
& $script:tar -x -f $this.Path -C $local:directory --strip-components=1 '*/wt.exe'
@@ -146,12 +135,6 @@ Class Asset {
$this.Version = $Manifest.Package.Identity.Version
}
[void]ParseNuspec([xml]$Nuspec) {
$this.Name = $Nuspec.package.metadata.id
$this.Version = ($Nuspec.package.metadata.version -split '-')[0]
$this.ExpandedVersion = $Nuspec.package.metadata.version
}
[void]ParseFilename([string]$filename) {
$parts = [IO.Path]::GetFileNameWithoutExtension($filename).Split("_")
$this.Name = $parts[0]
@@ -177,9 +160,6 @@ Class Asset {
GroupPolicy {
"{0}_{1}.zip" -f ($this.Name, $this.Version)
}
NugetPackage {
"{0}.{1}.nupkg" -f ($this.Name, $this.ExpandedVersion)
}
Default {
Throw "Unknown type $($_.Type)"
}
@@ -273,11 +253,15 @@ Function New-ReleaseBody([Release]$Release) {
If (-Not [String]::IsNullOrEmpty($zipAssetVersion)) {
$body += "_Binary files inside the unpackaged distribution archive bear the version number ``$zipAssetVersion``._`n`n"
}
$body += "### Asset Hashes`n`n";
ForEach($a in $Release.Assets) {
$body += "- {0}`n - SHA256 ``{1}```n" -f ($a.IdealFilename(), (Get-FileHash $a.Path -Algorithm SHA256 | Select-Object -Expand Hash))
}
Return $body
}
# Collect Assets from $Directory, figure out what those assets are
$Assets = Get-ChildItem $Directory -Recurse -Include *.msixbundle, *.zip, *.nupkg -Exclude *.Wpf.*,*.symbols.nupkg | ForEach-Object {
$Assets = Get-ChildItem $Directory -Recurse -Include *.msixbundle, *.zip | ForEach-Object {
[Asset]::CreateFromFile($_.FullName)
}

View File

@@ -21,7 +21,7 @@
},
{
"name": "ms-gsl",
"version": "3.1.0"
"version": "4.2.1"
},
{
"name": "jsoncpp",