Compare commits

..

2 Commits

Author SHA1 Message Date
Leonard Hecker
0e4f03c35a wip 2024-09-25 20:22:38 +02:00
Leonard Hecker
1daa180b22 New tokenization & integer parsing helpers 2024-09-25 20:17:32 +02:00
127 changed files with 1110 additions and 2441 deletions

View File

@@ -96,7 +96,6 @@ IGraphics
IImage
IInheritable
IMap
imm
IMonarch
IObject
iosfwd

View File

@@ -10,6 +10,6 @@ jobs:
submodules: false
clean: true
- pwsh: |-
- powershell: |-
.\build\scripts\Invoke-FormattingCheck.ps1
displayName: 'Run formatters'

View File

@@ -2340,7 +2340,7 @@
"description": "When set to `true`, the terminal window will auto-center itself on the display it opens on. The terminal will use the \"initialPosition\" to determine which display to open on.",
"type": "boolean"
},
"warning.inputService": {
"inputServiceWarning": {
"default": true,
"description": "Warning if 'Touch Keyboard and Handwriting Panel Service' is disabled.",
"type": "boolean"
@@ -2355,21 +2355,11 @@
"description": "When set to true, the terminal will focus the pane on mouse hover.",
"type": "boolean"
},
"compatibility.allowHeadless": {
"default": false,
"description": "When set to true, Windows Terminal will run in the background. This allows globalSummon and quakeMode actions to work even when no windows are open.",
"type": "boolean"
},
"compatibility.isolatedMode": {
"default": false,
"description": "When set to true, Terminal windows will not be able to interact with each other (including global hotkeys, tab drag/drop, running commandlines in existing windows, etc.). This is a compatibility escape hatch for users who are running into certain windowing issues.",
"type": "boolean"
},
"compatibility.allowDECRQCRA": {
"default": false,
"description": "When set to true, the terminal will support the DECRQCRA (Request Checksum of Rectangular Area) escape sequence.",
"type": "boolean"
},
"copyFormatting": {
"default": true,
"description": "When set to `true`, the color and font formatting of selected text is also copied to your clipboard. When set to `false`, only plain text is copied to your clipboard. An array of specific formats can also be used. Supported array values include `html` and `rtf`. Plain text is always copied.",
@@ -2400,12 +2390,12 @@
"description": "When set to `true`, visual animations will be disabled across the application.",
"type": "boolean"
},
"warning.largePaste": {
"largePasteWarning": {
"default": true,
"description": "When set to true, trying to paste text with more than 5 KiB of characters will display a warning asking you whether to continue or not with the paste.",
"type": "boolean"
},
"warning.multiLinePaste": {
"multiLinePasteWarning": {
"default": true,
"description": "When set to true, trying to paste text with a \"new line\" character will display a warning asking you whether to continue or not with the paste.",
"type": "boolean"
@@ -2603,7 +2593,7 @@
"description": "Determines the delimiters used in a double click selection.",
"type": "string"
},
"warning.confirmCloseAllTabs": {
"confirmCloseAllTabs": {
"default": true,
"description": "When set to \"true\" closing a window with multiple tabs open will require confirmation. When set to \"false\", the confirmation dialog will not appear.",
"type": "boolean"

View File

@@ -154,7 +154,7 @@
<comment>{Locked=qps-ploc,qps-ploca,qps-plocm}</comment>
</data>
<data name="AppDescription" xml:space="preserve">
<value>Nový Terminál Windows</value>
<value>Nová Terminál Windows</value>
</data>
<data name="AppDescriptionPre" xml:space="preserve">
<value>Terminál Windows s náhledem připravovaných funkcí</value>
@@ -164,7 +164,7 @@
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Canary version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem_Preview" xml:space="preserve">
<value>Otevřít &amp;náhled Terminálu</value>
<value>Otevřít náhled &amp;aplikace Terminal</value>
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem" xml:space="preserve">

View File

@@ -1035,8 +1035,8 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
if (windowId == 0)
{
// Try the name as an integer ID
uint32_t temp;
if (!Utils::StringToUint(window.c_str(), temp))
const auto temp = til::parse_unsigned<uint32_t>(window.c_str());
if (!temp)
{
TraceLoggingWrite(g_hRemotingProvider,
"Monarch_MoveContent_FailedToParseId",
@@ -1045,7 +1045,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
}
else
{
windowId = temp;
windowId = *temp;
}
}

View File

@@ -162,10 +162,9 @@ winrt::com_ptr<IShellLinkW> Jumplist::_createShellLink(const std::wstring_view n
const std::wstring iconPath{ path.substr(0, commaPosition) };
// We dont want the comma included so add 1 to its position
int iconIndex = til::to_int(path.substr(commaPosition + 1));
if (iconIndex != til::to_int_error)
if (const auto iconIndex = til::parse_signed<int>(path.substr(commaPosition + 1)))
{
THROW_IF_FAILED(sh->SetIconLocation(iconPath.data(), iconIndex));
THROW_IF_FAILED(sh->SetIconLocation(iconPath.data(), *iconIndex));
}
}
else if (til::ends_with(path, L"exe") || til::ends_with(path, L"dll"))

View File

@@ -154,7 +154,7 @@
<comment>{Locked=qps-ploc,qps-ploca,qps-plocm}</comment>
</data>
<data name="AppDescription" xml:space="preserve">
<value>Nový Terminál Windows</value>
<value>Nová Terminál Windows</value>
</data>
<data name="AppDescriptionPre" xml:space="preserve">
<value>Terminál Windows s náhledem připravovaných funkcí</value>
@@ -164,7 +164,7 @@
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Canary version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem_Preview" xml:space="preserve">
<value>Otevřít &amp;náhled Terminálu</value>
<value>Otevřít náhled &amp;aplikace Terminal</value>
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem" xml:space="preserve">

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="InitialJsonParseErrorText" xml:space="preserve">
<value>파일에서 설정을 로드하지 못했습니다. 후행 쉼표를 포함여 구문 오류가 있는지 확인합니다.</value>
<value>파일에서 설정을 로드 하지 못했습니다. 후행 쉼표를 포함여 구문 오류가 있는지 확인 합니다.</value>
</data>
<data name="MissingDefaultProfileText" xml:space="preserve">
<value>첫 번째 프로필을 사용하여 프로필 목록에서 기본 프로필을 찾을 수 없습니다. "defaultProfile"이 프로필 중 하나의 GUID와 일치하는지 확인합니다.</value>
@@ -319,7 +319,7 @@
<value>상위 창의 백분율로 크기를 지정합니다. (0,1) 사이 값만 유효합니다.</value>
</data>
<data name="CmdNewTabDesc" xml:space="preserve">
<value>새 만들기</value>
<value>새 작업 만들기</value>
</data>
<data name="CmdNTDesc" xml:space="preserve">
<value>"new-tab" 하위 명령의 별칭입니다.</value>
@@ -524,7 +524,7 @@
<value>경고</value>
</data>
<data name="CloseReadOnlyDialog.Content" xml:space="preserve">
<value>읽기 전용 터미널을 닫으려고 합니다. 계속하시겠습니까?</value>
<value>읽기 전용 터미널을 닫으려고 합니다. 계속하시겠어요?</value>
</data>
<data name="LargePasteDialog.CloseButtonText" xml:space="preserve">
<value>취소</value>
@@ -616,7 +616,7 @@
<comment>{0} will be replaced with a number.</comment>
</data>
<data name="CrimsonColorButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>홍</value>
<value>홍</value>
</data>
<data name="SteelBlueColorButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>강철색</value>

View File

@@ -491,14 +491,14 @@ namespace winrt::TerminalApp::implementation
// Because this will always return -1 in this scenario unfortunately.
//
// So, what we're going to try to do is move the focus to the tab
// to the right, within the bounds of how many tabs we have.
// to the left, within the bounds of how many tabs we have.
//
// EX: we have 4 tabs: [A, B, C, D]. If we close:
// * A (tabIndex=0): We'll want to focus tab B (now in index 0)
// * B (tabIndex=1): We'll want to focus tab C (now in index 1)
// * C (tabIndex=2): We'll want to focus tab D (now in index 2)
// * B (tabIndex=1): We'll want to focus tab A (now in index 0)
// * C (tabIndex=2): We'll want to focus tab B (now in index 1)
// * D (tabIndex=3): We'll want to focus tab C (now in index 2)
const auto newSelectedIndex = std::clamp<int32_t>(tabIndex, 0, _tabs.Size() - 1);
const auto newSelectedIndex = std::clamp<int32_t>(tabIndex - 1, 0, _tabs.Size() - 1);
// _UpdatedSelectedTab will do the work of setting up the new tab as
// the focused one, and unfocusing all the others.
auto newSelectedTab{ _tabs.GetAt(newSelectedIndex) };

View File

@@ -201,17 +201,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
});
// If you rapidly show/hide Windows Terminal, something about GotFocus()/LostFocus() gets broken.
// We'll then receive easily 10+ such calls from WinUI the next time the application is shown.
shared->focusChanged = std::make_unique<til::debounced_func_trailing<bool>>(
std::chrono::milliseconds{ 25 },
[weakThis = get_weak()](const bool focused) {
if (const auto core{ weakThis.get() })
{
core->_focusChanged(focused);
}
});
// Scrollbar updates are also expensive (XAML), so we'll throttle them as well.
shared->updateScrollBar = std::make_shared<ThrottledFuncTrailing<Control::ScrollPositionChangedArgs>>(
_dispatcher,
@@ -2491,21 +2480,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - This is related to work done for GH#2988.
void ControlCore::GotFocus()
{
const auto shared = _shared.lock_shared();
if (shared->focusChanged)
{
(*shared->focusChanged)(true);
}
_focusChanged(true);
}
// See GotFocus.
void ControlCore::LostFocus()
{
const auto shared = _shared.lock_shared();
if (shared->focusChanged)
{
(*shared->focusChanged)(false);
}
_focusChanged(false);
}
void ControlCore::_focusChanged(bool focused)

View File

@@ -305,7 +305,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
struct SharedState
{
std::unique_ptr<til::debounced_func_trailing<>> outputIdle;
std::unique_ptr<til::debounced_func_trailing<bool>> focusChanged;
std::shared_ptr<ThrottledFuncTrailing<Control::ScrollPositionChangedArgs>> updateScrollBar;
};

View File

@@ -21,7 +21,6 @@ namespace Microsoft.Terminal.Core
String WordDelimiters;
Boolean ForceVTInput;
Boolean AllowVtChecksumReport;
Boolean TrimBlockSelection;
Boolean DetectURLs;

View File

@@ -90,11 +90,6 @@ void Terminal::UpdateSettings(ICoreSettings settings)
_autoMarkPrompts = settings.AutoMarkPrompts();
_rainbowSuggestions = settings.RainbowSuggestions();
if (_stateMachine)
{
SetVtChecksumReportSupport(settings.AllowVtChecksumReport());
}
_getTerminalInput().ForceDisableWin32InputMode(settings.ForceVTInput());
if (settings.TabColor() == nullptr)
@@ -217,12 +212,6 @@ void Terminal::SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle)
engine.Dispatch().SetCursorStyle(cursorStyle);
}
void Terminal::SetVtChecksumReportSupport(const bool enabled)
{
auto& engine = reinterpret_cast<OutputStateMachineEngine&>(_stateMachine->Engine());
engine.Dispatch().SetVtChecksumReportSupport(enabled);
}
bool Terminal::IsXtermBracketedPasteModeEnabled() const noexcept
{
return _systemMode.test(Mode::BracketedPaste);

View File

@@ -94,7 +94,6 @@ public:
void UpdateAppearance(const winrt::Microsoft::Terminal::Core::ICoreAppearance& appearance);
void SetFontInfo(const FontInfo& fontInfo);
void SetCursorStyle(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::CursorStyle cursorStyle);
void SetVtChecksumReportSupport(const bool enabled);
bool IsXtermBracketedPasteModeEnabled() const noexcept;
std::wstring_view GetWorkingDirectory() noexcept;
@@ -140,10 +139,8 @@ public:
void SetWindowTitle(const std::wstring_view title) override;
CursorType GetUserDefaultCursorStyle() const noexcept override;
bool ResizeWindow(const til::CoordType width, const til::CoordType height) override;
void SetCodePage(const unsigned int codepage) noexcept override;
void ResetCodePage() noexcept override;
unsigned int GetOutputCodePage() const noexcept override;
unsigned int GetInputCodePage() const noexcept override;
void SetConsoleOutputCP(const unsigned int codepage) noexcept override;
unsigned int GetConsoleOutputCP() const noexcept override;
void CopyToClipboard(wil::zwstring_view content) override;
void SetTaskbarProgress(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::TaskbarState state, const size_t progress) override;
void SetWorkingDirectory(std::wstring_view uri) override;

View File

@@ -116,25 +116,14 @@ bool Terminal::ResizeWindow(const til::CoordType width, const til::CoordType hei
return false;
}
void Terminal::SetCodePage(const unsigned int /*codepage*/) noexcept
void Terminal::SetConsoleOutputCP(const unsigned int /*codepage*/) noexcept
{
// Code pages are dealt with in ConHost, so this isn't needed.
// TODO: This will be needed to support 8-bit charsets and DOCS sequences.
}
void Terminal::ResetCodePage() noexcept
unsigned int Terminal::GetConsoleOutputCP() const noexcept
{
// There is nothing to reset, since the code page never changes.
}
unsigned int Terminal::GetOutputCodePage() const noexcept
{
// See above. The code page is always UTF-8.
return CP_UTF8;
}
unsigned int Terminal::GetInputCodePage() const noexcept
{
// See above. The code page is always UTF-8.
// TODO: See SetConsoleOutputCP above.
return CP_UTF8;
}

View File

@@ -573,9 +573,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
}
double AppearanceViewModel::_parseCellSizeValue(const hstring& val) const
double AppearanceViewModel::LineHeight() const
{
const auto str = val.c_str();
const auto fontInfo = _appearance.SourceProfile().FontInfo();
const auto cellHeight = fontInfo.CellHeight();
const auto str = cellHeight.c_str();
auto& errnoRef = errno; // Nonzero cost, pay it once.
errnoRef = 0;
@@ -586,49 +588,29 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
return str == end || errnoRef == ERANGE ? NAN : value;
}
double AppearanceViewModel::LineHeight() const
{
const auto cellHeight = _appearance.SourceProfile().FontInfo().CellHeight();
return _parseCellSizeValue(cellHeight);
}
double AppearanceViewModel::CellWidth() const
{
const auto cellWidth = _appearance.SourceProfile().FontInfo().CellWidth();
return _parseCellSizeValue(cellWidth);
}
#define CELL_SIZE_SETTER(modelName, viewModelName) \
std::wstring str; \
\
if (value >= 0.1 && value <= 10.0) \
{ \
str = fmt::format(FMT_COMPILE(L"{:.6g}"), value); \
} \
\
const auto fontInfo = _appearance.SourceProfile().FontInfo(); \
\
if (fontInfo.modelName() != str) \
{ \
if (str.empty()) \
{ \
fontInfo.Clear##modelName(); \
} \
else \
{ \
fontInfo.modelName(str); \
} \
_NotifyChanges(L"Has" #viewModelName, L## #viewModelName); \
}
void AppearanceViewModel::LineHeight(const double value)
{
CELL_SIZE_SETTER(CellHeight, LineHeight);
}
std::wstring str;
void AppearanceViewModel::CellWidth(const double value)
{
CELL_SIZE_SETTER(CellWidth, CellWidth);
if (value >= 0.1 && value <= 10.0)
{
str = fmt::format(FMT_STRING(L"{:.6g}"), value);
}
const auto fontInfo = _appearance.SourceProfile().FontInfo();
if (fontInfo.CellHeight() != str)
{
if (str.empty())
{
fontInfo.ClearCellHeight();
}
else
{
fontInfo.CellHeight(str);
}
_NotifyChanges(L"HasLineHeight", L"LineHeight");
}
}
bool AppearanceViewModel::HasLineHeight() const
@@ -637,34 +619,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
return fontInfo.HasCellHeight();
}
bool AppearanceViewModel::HasCellWidth() const
{
const auto fontInfo = _appearance.SourceProfile().FontInfo();
return fontInfo.HasCellWidth();
}
void AppearanceViewModel::ClearLineHeight()
{
LineHeight(NAN);
}
void AppearanceViewModel::ClearCellWidth()
{
CellWidth(NAN);
}
Model::FontConfig AppearanceViewModel::LineHeightOverrideSource() const
{
const auto fontInfo = _appearance.SourceProfile().FontInfo();
return fontInfo.CellHeightOverrideSource();
}
Model::FontConfig AppearanceViewModel::CellWidthOverrideSource() const
{
const auto fontInfo = _appearance.SourceProfile().FontInfo();
return fontInfo.CellWidthOverrideSource();
}
void AppearanceViewModel::SetFontWeightFromDouble(double fontWeight)
{
FontWeight(winrt::Microsoft::Terminal::UI::Converters::DoubleToFontWeight(fontWeight));

View File

@@ -92,12 +92,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void ClearLineHeight();
Model::FontConfig LineHeightOverrideSource() const;
double CellWidth() const;
void CellWidth(const double value);
bool HasCellWidth() const;
void ClearCellWidth();
Model::FontConfig CellWidthOverrideSource() const;
void SetFontWeightFromDouble(double fontWeight);
const FontFaceDependentsData& FontFaceDependents();
@@ -167,8 +161,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void _deleteAllFontKeyValuePairs(FontSettingIndex index);
void _addMenuFlyoutItemToUnused(FontSettingIndex index, Windows::UI::Xaml::Controls::MenuFlyoutItemBase item);
double _parseCellSizeValue(const hstring& val) const;
Model::AppearanceConfig _appearance;
winrt::hstring _lastBgImagePath;
std::optional<FontFaceDependentsData> _fontFaceDependents;

View File

@@ -62,7 +62,6 @@ namespace Microsoft.Terminal.Settings.Editor
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(String, FontFace);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Single, FontSize);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Double, LineHeight);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Double, CellWidth);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Windows.UI.Text.FontWeight, FontWeight);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Boolean, EnableBuiltinGlyphs);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Boolean, EnableColorGlyphs);

View File

@@ -264,22 +264,6 @@
Value="{x:Bind Appearance.LineHeight, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Cell Width -->
<local:SettingContainer x:Uid="Profile_CellWidth"
ClearSettingValue="{x:Bind Appearance.ClearCellWidth}"
HasSettingValue="{x:Bind Appearance.HasCellWidth, Mode=OneWay}"
SettingOverrideSource="{x:Bind Appearance.CellWidthOverrideSource, Mode=OneWay}"
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
<muxc:NumberBox x:Name="_cellWidthBox"
x:Uid="Profile_CellWidthBox"
LargeChange="0.1"
Maximum="10"
Minimum="0.1"
SmallChange="0.1"
Style="{StaticResource NumberBoxSettingStyle}"
Value="{x:Bind Appearance.CellWidth, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Font Weight -->
<local:SettingContainer x:Uid="Profile_FontWeight"
ClearSettingValue="{x:Bind Appearance.ClearFontWeight}"

View File

@@ -1,35 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "Compatibility.h"
#include "EnumEntry.h"
#include "Compatibility.g.cpp"
#include "CompatibilityViewModel.g.cpp"
using namespace winrt::Windows::UI::Xaml::Navigation;
using namespace winrt::Microsoft::Terminal::Settings::Model;
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
CompatibilityViewModel::CompatibilityViewModel(Model::GlobalAppSettings globalSettings) :
_GlobalSettings{ globalSettings }
{
INITIALIZE_BINDABLE_ENUM_SETTING(TextMeasurement, TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, L"Globals_TextMeasurement_", L"Text");
}
bool CompatibilityViewModel::DebugFeaturesAvailable() const noexcept
{
return Feature_DebugModeUI::IsEnabled();
}
Compatibility::Compatibility()
{
InitializeComponent();
}
void Compatibility::OnNavigatedTo(const NavigationEventArgs& e)
{
_ViewModel = e.Parameter().as<Editor::CompatibilityViewModel>();
}
}

View File

@@ -1,47 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#include "Compatibility.g.h"
#include "CompatibilityViewModel.g.h"
#include "ViewModelHelpers.h"
#include "Utils.h"
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct CompatibilityViewModel : CompatibilityViewModelT<CompatibilityViewModel>, ViewModelHelper<CompatibilityViewModel>
{
public:
CompatibilityViewModel(Model::GlobalAppSettings globalSettings);
bool DebugFeaturesAvailable() const noexcept;
// DON'T YOU DARE ADD A `WINRT_CALLBACK(PropertyChanged` TO A CLASS DERIVED FROM ViewModelHelper. Do this instead:
using ViewModelHelper<CompatibilityViewModel>::PropertyChanged;
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, AllowHeadless);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, IsolatedMode);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, DebugFeaturesEnabled);
GETSET_BINDABLE_ENUM_SETTING(TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, _GlobalSettings.TextMeasurement);
private:
Model::GlobalAppSettings _GlobalSettings;
};
struct Compatibility : public HasScrollViewer<Compatibility>, CompatibilityT<Compatibility>
{
Compatibility();
void OnNavigatedTo(const winrt::Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
til::property_changed_event PropertyChanged;
WINRT_OBSERVABLE_PROPERTY(Editor::CompatibilityViewModel, ViewModel, PropertyChanged.raise, nullptr);
};
}
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(Compatibility);
BASIC_FACTORY(CompatibilityViewModel);
}

View File

@@ -1,29 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "EnumEntry.idl";
#include "ViewModelHelpers.idl.h"
namespace Microsoft.Terminal.Settings.Editor
{
runtimeclass CompatibilityViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
{
CompatibilityViewModel(Microsoft.Terminal.Settings.Model.GlobalAppSettings globalSettings);
Boolean DebugFeaturesAvailable { get; };
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, AllowHeadless);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, IsolatedMode);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, DebugFeaturesEnabled);
IInspectable CurrentTextMeasurement;
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> TextMeasurementList { get; };
}
[default_interface] runtimeclass Compatibility : Windows.UI.Xaml.Controls.Page
{
Compatibility();
CompatibilityViewModel ViewModel { get; };
}
}

View File

@@ -1,56 +0,0 @@
<!--
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
the MIT License. See LICENSE in the project root for license information.
-->
<Page x:Class="Microsoft.Terminal.Settings.Editor.Compatibility"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="EnumComboBoxTemplate"
x:DataType="local:EnumEntry">
<TextBlock Text="{x:Bind EnumName}" />
</DataTemplate>
</ResourceDictionary>
</Page.Resources>
<StackPanel Style="{StaticResource SettingsStackStyle}">
<!-- Allow Headless -->
<local:SettingContainer x:Uid="Globals_AllowHeadless">
<ToggleSwitch IsOn="{x:Bind ViewModel.AllowHeadless, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Isolated Mode -->
<local:SettingContainer x:Uid="Globals_IsolatedMode">
<ToggleSwitch IsOn="{x:Bind ViewModel.IsolatedMode, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Text Measurement -->
<local:SettingContainer x:Uid="Globals_TextMeasurement">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.TextMeasurementList}"
SelectedItem="{x:Bind ViewModel.CurrentTextMeasurement, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Debug Features -->
<local:SettingContainer x:Uid="Globals_DebugFeaturesEnabled"
Visibility="{x:Bind ViewModel.DebugFeaturesAvailable}">
<ToggleSwitch IsOn="{x:Bind ViewModel.DebugFeaturesEnabled, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
</Page>

View File

@@ -115,17 +115,5 @@
<ToggleSwitch IsOn="{x:Bind ViewModel.AutoHideWindow, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Show Admin Shield -->
<local:SettingContainer x:Uid="Globals_ShowAdminShield">
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowAdminShield, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Enable Unfocused Acrylic -->
<local:SettingContainer x:Uid="Globals_EnableUnfocusedAcrylic">
<ToggleSwitch IsOn="{x:Bind ViewModel.EnableUnfocusedAcrylic, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
</Page>

View File

@@ -39,8 +39,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, AutoHideWindow);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, AlwaysShowNotificationIcon);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, MinimizeToNotificationArea);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, ShowAdminShield);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, EnableUnfocusedAcrylic);
private:
Model::GlobalAppSettings _GlobalSettings;

View File

@@ -33,7 +33,5 @@ namespace Microsoft.Terminal.Settings.Editor
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, AutoHideWindow);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, AlwaysShowNotificationIcon);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, MinimizeToNotificationArea);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ShowAdminShield);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, EnableUnfocusedAcrylic);
}
}

View File

@@ -24,116 +24,73 @@
</ResourceDictionary>
</Page.Resources>
<StackPanel>
<StackPanel Style="{StaticResource SettingsStackStyle}">
<!-- Copy On Select -->
<local:SettingContainer x:Uid="Globals_CopyOnSelect">
<ToggleSwitch IsOn="{x:Bind ViewModel.CopyOnSelect, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<StackPanel Style="{StaticResource SettingsStackStyle}">
<!-- Copy On Select -->
<local:SettingContainer x:Uid="Globals_CopyOnSelect">
<ToggleSwitch IsOn="{x:Bind ViewModel.CopyOnSelect, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Copy Format -->
<local:SettingContainer x:Uid="Globals_CopyFormat">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.CopyFormatList, Mode=OneWay}"
SelectedItem="{x:Bind ViewModel.CurrentCopyFormat, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Copy Format -->
<local:SettingContainer x:Uid="Globals_CopyFormat">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.CopyFormatList, Mode=OneWay}"
SelectedItem="{x:Bind ViewModel.CurrentCopyFormat, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Trim Block Selection -->
<local:SettingContainer x:Uid="Globals_TrimBlockSelection">
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimBlockSelection, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Trim Block Selection -->
<local:SettingContainer x:Uid="Globals_TrimBlockSelection">
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimBlockSelection, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Trim Paste -->
<local:SettingContainer x:Uid="Globals_TrimPaste">
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimPaste, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Trim Paste -->
<local:SettingContainer x:Uid="Globals_TrimPaste">
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimPaste, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Word Delimiters -->
<local:SettingContainer x:Uid="Globals_WordDelimiters"
CurrentValue="{x:Bind ViewModel.WordDelimiters, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox IsSpellCheckEnabled="False"
Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind ViewModel.WordDelimiters, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Word Delimiters -->
<local:SettingContainer x:Uid="Globals_WordDelimiters"
CurrentValue="{x:Bind ViewModel.WordDelimiters, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox IsSpellCheckEnabled="False"
Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind ViewModel.WordDelimiters, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Snap On Resize -->
<local:SettingContainer x:Uid="Globals_SnapToGridOnResize">
<ToggleSwitch IsOn="{x:Bind ViewModel.SnapToGridOnResize, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Snap On Resize -->
<local:SettingContainer x:Uid="Globals_SnapToGridOnResize">
<ToggleSwitch IsOn="{x:Bind ViewModel.SnapToGridOnResize, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Tab Switcher Mode -->
<local:SettingContainer x:Uid="Globals_TabSwitcherMode">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.TabSwitcherModeList}"
SelectedItem="{x:Bind ViewModel.CurrentTabSwitcherMode, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Tab Switcher Mode -->
<local:SettingContainer x:Uid="Globals_TabSwitcherMode">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.TabSwitcherModeList}"
SelectedItem="{x:Bind ViewModel.CurrentTabSwitcherMode, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Focus Follow Mouse Mode -->
<local:SettingContainer x:Uid="Globals_FocusFollowMouse">
<ToggleSwitch IsOn="{x:Bind ViewModel.FocusFollowMouse, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Focus Follow Mouse Mode -->
<local:SettingContainer x:Uid="Globals_FocusFollowMouse">
<ToggleSwitch IsOn="{x:Bind ViewModel.FocusFollowMouse, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Detect URLs -->
<local:SettingContainer x:Uid="Globals_DetectURLs">
<ToggleSwitch IsOn="{x:Bind ViewModel.DetectURLs, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Detect URLs -->
<local:SettingContainer x:Uid="Globals_DetectURLs">
<ToggleSwitch IsOn="{x:Bind ViewModel.DetectURLs, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Search Web Default Query URL -->
<local:SettingContainer x:Uid="Globals_SearchWebDefaultQueryUrl"
CurrentValue="{x:Bind ViewModel.SearchWebDefaultQueryUrl, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox IsSpellCheckEnabled="False"
Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind ViewModel.SearchWebDefaultQueryUrl, Mode=TwoWay}" />
</local:SettingContainer>
<!-- Enable Color Selection -->
<local:SettingContainer x:Uid="Globals_EnableColorSelection">
<ToggleSwitch IsOn="{x:Bind ViewModel.EnableColorSelection, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
<StackPanel Style="{StaticResource SettingsStackStyle}">
<!-- Grouping: Warnings -->
<TextBlock x:Uid="Globals_WarningsHeader"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Close All Tabs Warning -->
<local:SettingContainer x:Uid="Globals_ConfirmCloseAllTabs">
<ToggleSwitch IsOn="{x:Bind ViewModel.ConfirmCloseAllTabs, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Input Service Warning -->
<local:SettingContainer x:Uid="Globals_InputServiceWarning">
<ToggleSwitch IsOn="{x:Bind ViewModel.InputServiceWarning, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Large Paste Warning -->
<local:SettingContainer x:Uid="Globals_WarnAboutLargePaste">
<ToggleSwitch IsOn="{x:Bind ViewModel.WarnAboutLargePaste, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Multi Line Paste Warning -->
<local:SettingContainer x:Uid="Globals_WarnAboutMultiLinePaste">
<ToggleSwitch IsOn="{x:Bind ViewModel.WarnAboutMultiLinePaste, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
<local:SettingContainer x:Uid="Globals_ConfirmCloseAllTabs">
<ToggleSwitch IsOn="{x:Bind ViewModel.ConfirmCloseAllTabs, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
</Page>

View File

@@ -26,13 +26,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, SnapToGridOnResize);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, FocusFollowMouse);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, DetectURLs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, SearchWebDefaultQueryUrl);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WordDelimiters);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, ConfirmCloseAllTabs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, InputServiceWarning);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WarnAboutLargePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WarnAboutMultiLinePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, EnableColorSelection);
private:
Model::GlobalAppSettings _GlobalSettings;

View File

@@ -23,12 +23,7 @@ namespace Microsoft.Terminal.Settings.Editor
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, SnapToGridOnResize);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, FocusFollowMouse);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, DetectURLs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(String, SearchWebDefaultQueryUrl);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(String, WordDelimiters);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ConfirmCloseAllTabs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, InputServiceWarning);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, WarnAboutLargePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, WarnAboutMultiLinePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, EnableColorSelection);
}
}

View File

@@ -6,7 +6,6 @@
#include "MainPage.g.cpp"
#include "Launch.h"
#include "Interaction.h"
#include "Compatibility.h"
#include "Rendering.h"
#include "RenderingViewModel.h"
#include "Actions.h"
@@ -40,7 +39,6 @@ using namespace winrt::Windows::Foundation::Collections;
static const std::wstring_view launchTag{ L"Launch_Nav" };
static const std::wstring_view interactionTag{ L"Interaction_Nav" };
static const std::wstring_view renderingTag{ L"Rendering_Nav" };
static const std::wstring_view compatibilityTag{ L"Compatibility_Nav" };
static const std::wstring_view actionsTag{ L"Actions_Nav" };
static const std::wstring_view globalProfileTag{ L"GlobalProfile_Nav" };
static const std::wstring_view addProfileTag{ L"AddProfile" };
@@ -341,13 +339,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_breadcrumbs.Append(crumb);
SettingsMainPage_ScrollViewer().ScrollToVerticalOffset(0);
}
else if (currentPage == ProfileSubPage::Terminal)
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Terminal>(), profile);
const auto crumb = winrt::make<Breadcrumb>(breadcrumbTag, RS_(L"Profile_Terminal/Header"), BreadcrumbSubPage::Profile_Terminal);
_breadcrumbs.Append(crumb);
SettingsMainPage_ScrollViewer().ScrollToVerticalOffset(0);
}
else if (currentPage == ProfileSubPage::Advanced)
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Advanced>(), profile);
@@ -381,12 +372,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
const auto crumb = winrt::make<Breadcrumb>(box_value(clickedItemTag), RS_(L"Nav_Rendering/Content"), BreadcrumbSubPage::None);
_breadcrumbs.Append(crumb);
}
else if (clickedItemTag == compatibilityTag)
{
contentFrame().Navigate(xaml_typename<Editor::Compatibility>(), winrt::make<CompatibilityViewModel>(_settingsClone.GlobalSettings()));
const auto crumb = winrt::make<Breadcrumb>(box_value(clickedItemTag), RS_(L"Nav_Compatibility/Content"), BreadcrumbSubPage::None);
_breadcrumbs.Append(crumb);
}
else if (clickedItemTag == actionsTag)
{
contentFrame().Navigate(xaml_typename<Editor::Actions>(), winrt::make<ActionsViewModel>(_settingsClone));
@@ -410,10 +395,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
profileVM.CurrentPage(ProfileSubPage::Appearance);
}
else if (subPage == BreadcrumbSubPage::Profile_Terminal)
{
profileVM.CurrentPage(ProfileSubPage::Terminal);
}
else if (subPage == BreadcrumbSubPage::Profile_Advanced)
{
profileVM.CurrentPage(ProfileSubPage::Advanced);
@@ -471,10 +452,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
profile.CurrentPage(ProfileSubPage::Appearance);
}
else if (subPage == BreadcrumbSubPage::Profile_Terminal)
{
profile.CurrentPage(ProfileSubPage::Terminal);
}
else if (subPage == BreadcrumbSubPage::Profile_Advanced)
{
profile.CurrentPage(ProfileSubPage::Advanced);

View File

@@ -17,7 +17,6 @@ namespace Microsoft.Terminal.Settings.Editor
{
None = 0,
Profile_Appearance,
Profile_Terminal,
Profile_Advanced,
ColorSchemes_Edit
};

View File

@@ -135,13 +135,6 @@
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Nav_Compatibility"
Tag="Compatibility_Nav">
<muxc:NavigationViewItem.Icon>
<FontIcon Glyph="&#xEC7A;" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Nav_Actions"
Tag="Actions_Nav">
<muxc:NavigationViewItem.Icon>

View File

@@ -64,9 +64,6 @@
<ClInclude Include="Interaction.h">
<DependentUpon>Interaction.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="Compatibility.h">
<DependentUpon>Compatibility.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="KeyChordListener.h">
<DependentUpon>KeyChordListener.xaml</DependentUpon>
</ClInclude>
@@ -121,10 +118,6 @@
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="Profiles_Terminal.h">
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="Appearances.h">
<DependentUpon>Appearances.xaml</DependentUpon>
<SubType>Code</SubType>
@@ -161,9 +154,6 @@
<Page Include="Interaction.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Compatibility.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="KeyChordListener.xaml">
<SubType>Designer</SubType>
</Page>
@@ -182,9 +172,6 @@
<Page Include="Profiles_Appearance.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Profiles_Terminal.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Appearances.xaml">
<SubType>Designer</SubType>
</Page>
@@ -217,9 +204,6 @@
<ClCompile Include="Interaction.cpp">
<DependentUpon>Interaction.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="Compatibility.cpp">
<DependentUpon>Compatibility.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="KeyChordListener.cpp">
<DependentUpon>KeyChordListener.xaml</DependentUpon>
</ClCompile>
@@ -277,10 +261,6 @@
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="Profiles_Terminal.cpp">
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="Appearances.cpp">
<DependentUpon>Appearances.xaml</DependentUpon>
<SubType>Code</SubType>
@@ -331,10 +311,6 @@
<DependentUpon>Interaction.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="Compatibility.idl">
<DependentUpon>Compatibility.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="Rendering.idl">
<DependentUpon>Rendering.xaml</DependentUpon>
<SubType>Code</SubType>
@@ -362,10 +338,6 @@
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="Profiles_Terminal.idl">
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="Appearances.idl">
<DependentUpon>Appearances.xaml</DependentUpon>
<SubType>Code</SubType>

View File

@@ -120,10 +120,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
OBSERVABLE_PROJECTED_SETTING(_profile, ShowMarks);
OBSERVABLE_PROJECTED_SETTING(_profile, AutoMarkPrompts);
OBSERVABLE_PROJECTED_SETTING(_profile, RepositionCursorWithMouse);
OBSERVABLE_PROJECTED_SETTING(_profile, ForceVTInput);
OBSERVABLE_PROJECTED_SETTING(_profile, AllowVtChecksumReport);
OBSERVABLE_PROJECTED_SETTING(_profile, AnswerbackMessage);
OBSERVABLE_PROJECTED_SETTING(_profile, RainbowSuggestions);
WINRT_PROPERTY(bool, IsBaseLayer, false);
WINRT_PROPERTY(bool, FocusDeleteButton, false);

View File

@@ -29,8 +29,7 @@ namespace Microsoft.Terminal.Settings.Editor
{
Base = 0,
Appearance = 1,
Terminal = 2,
Advanced = 3
Advanced = 2
};
runtimeclass ProfileViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
@@ -112,9 +111,5 @@ namespace Microsoft.Terminal.Settings.Editor
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ShowMarks);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AutoMarkPrompts);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RepositionCursorWithMouse);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ForceVTInput);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AllowVtChecksumReport);
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, AnswerbackMessage);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RainbowSuggestions);
}
}

View File

@@ -37,6 +37,15 @@
Visibility="{x:Bind Profile.IsBaseLayer}" />
<StackPanel Grid.Row="1"
Style="{StaticResource SettingsStackStyle}">
<!-- Suppress Application Title -->
<local:SettingContainer x:Uid="Profile_SuppressApplicationTitle"
ClearSettingValue="{x:Bind Profile.ClearSuppressApplicationTitle}"
HasSettingValue="{x:Bind Profile.HasSuppressApplicationTitle, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.SuppressApplicationTitle, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Antialiasing Mode -->
<local:SettingContainer x:Uid="Profile_AntialiasingMode"
ClearSettingValue="{x:Bind Profile.ClearAntialiasingMode}"
@@ -156,14 +165,6 @@
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- RainbowSuggestions -->
<local:SettingContainer x:Uid="Profile_RainbowSuggestions"
ClearSettingValue="{x:Bind Profile.ClearRainbowSuggestions}"
HasSettingValue="{x:Bind Profile.HasRainbowSuggestions, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.RainbowSuggestionsOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.RainbowSuggestions, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>
</Grid>
</Page>

View File

@@ -24,7 +24,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
Automation::AutomationProperties::SetName(DeleteButton(), RS_(L"Profile_DeleteButton/Text"));
AppearanceNavigator().Content(box_value(RS_(L"Profile_Appearance/Header")));
TerminalNavigator().Content(box_value(RS_(L"Profile_Terminal/Header")));
AdvancedNavigator().Content(box_value(RS_(L"Profile_Advanced/Header")));
}
@@ -67,11 +66,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_Profile.CurrentPage(ProfileSubPage::Appearance);
}
void Profiles_Base::Terminal_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
_Profile.CurrentPage(ProfileSubPage::Terminal);
}
void Profiles_Base::Advanced_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
_Profile.CurrentPage(ProfileSubPage::Advanced);

View File

@@ -21,7 +21,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
safe_void_coroutine Icon_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
safe_void_coroutine Commandline_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
void Appearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
void Terminal_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
void Advanced_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
void DeleteConfirmation_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);

View File

@@ -159,13 +159,16 @@
<Button x:Name="AppearanceNavigator"
Click="Appearance_Click"
Style="{StaticResource NavigatorButtonStyle}" />
<Button x:Name="TerminalNavigator"
Click="Terminal_Click"
Style="{StaticResource NavigatorButtonStyle}" />
Style="{StaticResource NavigatorButtonStyle}">
Appearance
</Button>
<Button x:Name="AdvancedNavigator"
Click="Advanced_Click"
Style="{StaticResource NavigatorButtonStyle}" />
Style="{StaticResource NavigatorButtonStyle}">
<TextBlock HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="Advanced" />
</Button>
<!-- Delete Button -->
<Border MaxWidth="{StaticResource StandardControlMaxWidth}">
<Button x:Name="DeleteButton"

View File

@@ -1,31 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "Profiles_Terminal.h"
#include "Profiles_Terminal.g.cpp"
#include "ProfileViewModel.h"
#include "EnumEntry.h"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::UI::Xaml::Navigation;
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
Profiles_Terminal::Profiles_Terminal()
{
InitializeComponent();
}
void Profiles_Terminal::OnNavigatedTo(const NavigationEventArgs& e)
{
_Profile = e.Parameter().as<Editor::ProfileViewModel>();
}
void Profiles_Terminal::OnNavigatedFrom(const NavigationEventArgs& /*e*/)
{
_ViewModelChangedRevoker.revoke();
}
}

View File

@@ -1,31 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#include "Profiles_Terminal.g.h"
#include "ViewModelHelpers.h"
#include "Utils.h"
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct Profiles_Terminal : public HasScrollViewer<Profiles_Terminal>, Profiles_TerminalT<Profiles_Terminal>
{
public:
Profiles_Terminal();
void OnNavigatedTo(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
void OnNavigatedFrom(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
til::property_changed_event PropertyChanged;
WINRT_PROPERTY(Editor::ProfileViewModel, Profile, nullptr);
private:
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _ViewModelChangedRevoker;
};
};
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(Profiles_Terminal);
}

View File

@@ -1,13 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "ProfileViewModel.idl";
namespace Microsoft.Terminal.Settings.Editor
{
[default_interface] runtimeclass Profiles_Terminal : Windows.UI.Xaml.Controls.Page, Windows.UI.Xaml.Data.INotifyPropertyChanged
{
Profiles_Terminal();
ProfileViewModel Profile { get; };
}
}

View File

@@ -1,75 +0,0 @@
<!--
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
the MIT License. See LICENSE in the project root for license information.
-->
<Page x:Class="Microsoft.Terminal.Settings.Editor.Profiles_Terminal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:model="using:Microsoft.Terminal.Settings.Model"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock x:Uid="Profile_BaseLayerDisclaimer"
Grid.Row="0"
Margin="{StaticResource StandardIndentMargin}"
Style="{StaticResource DisclaimerStyle}"
Visibility="{x:Bind Profile.IsBaseLayer}" />
<StackPanel Grid.Row="1"
Style="{StaticResource SettingsStackStyle}">
<!-- Suppress Application Title -->
<local:SettingContainer x:Uid="Profile_SuppressApplicationTitle"
ClearSettingValue="{x:Bind Profile.ClearSuppressApplicationTitle}"
HasSettingValue="{x:Bind Profile.HasSuppressApplicationTitle, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.SuppressApplicationTitle, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Force VT Input -->
<local:SettingContainer x:Uid="Profile_ForceVTInput"
ClearSettingValue="{x:Bind Profile.ClearForceVTInput}"
HasSettingValue="{x:Bind Profile.HasForceVTInput, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.ForceVTInputOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.ForceVTInput, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Allow VT Checksum Report -->
<local:SettingContainer x:Uid="Profile_AllowVtChecksumReport"
ClearSettingValue="{x:Bind Profile.ClearAllowVtChecksumReport}"
HasSettingValue="{x:Bind Profile.HasAllowVtChecksumReport, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.AllowVtChecksumReportOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.AllowVtChecksumReport, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<!-- Answerback Message -->
<local:SettingContainer x:Uid="Profile_AnswerbackMessage"
ClearSettingValue="{x:Bind Profile.ClearAnswerbackMessage}"
CurrentValue="{x:Bind Profile.AnswerbackMessage, Mode=OneWay}"
HasSettingValue="{x:Bind Profile.HasAnswerbackMessage, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.AnswerbackMessageOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<TextBox Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind Profile.AnswerbackMessage, Mode=TwoWay}" />
</local:SettingContainer>
</StackPanel>
</Grid>
</Page>

View File

@@ -41,5 +41,13 @@
<ToggleSwitch IsOn="{x:Bind ViewModel.SoftwareRendering, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
<local:SettingContainer x:Uid="Globals_TextMeasurement">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.TextMeasurementList}"
SelectedItem="{x:Bind ViewModel.CurrentTextMeasurement, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
</StackPanel>
</Page>

View File

@@ -17,5 +17,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_settings{ std::move(settings) }
{
INITIALIZE_BINDABLE_ENUM_SETTING(GraphicsAPI, GraphicsAPI, winrt::Microsoft::Terminal::Control::GraphicsAPI, L"Globals_GraphicsAPI_", L"Text");
INITIALIZE_BINDABLE_ENUM_SETTING(TextMeasurement, TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, L"Globals_TextMeasurement_", L"Text");
}
}

View File

@@ -16,6 +16,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
GETSET_BINDABLE_ENUM_SETTING(GraphicsAPI, winrt::Microsoft::Terminal::Control::GraphicsAPI, _settings.GlobalSettings().GraphicsAPI);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), DisablePartialInvalidation);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), SoftwareRendering);
GETSET_BINDABLE_ENUM_SETTING(TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, _settings.GlobalSettings().TextMeasurement);
private:
Model::CascadiaSettings _settings{ nullptr };

View File

@@ -15,5 +15,7 @@ namespace Microsoft.Terminal.Settings.Editor
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> GraphicsAPIList { get; };
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, DisablePartialInvalidation);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, SoftwareRendering);
IInspectable CurrentTextMeasurement;
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> TextMeasurementList { get; };
}
}

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Standard</value>
<value>Systemstandard verwenden</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Standard-IME-Eingabemodus</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Informiert den IME, welche Sprache standardmäßig verwendet werden soll. Für Sprachen, die auf einem IME basieren und standardmäßig keine lateinischen Zeichen verwenden, kann diese Einstellung verwendet werden, um beim Start die Eingabe in Englisch zu erzwingen.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Standard</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Alphanumerische Halbbreite (Englisch)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Registerkarten immer anzeigen</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Text</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Warnungen</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Fenster</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Warnen, wenn mehrere Registerkarten geschlossen werden</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Warnen, wenn „Dienst für Bildschirmtastatur und Handschrifteingabefeld“ deaktiviert ist</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Warnung beim Versuch, mehr als 5 KiB Zeichen einzufügen</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Warnung beim Versuch, ein „Zeilenumbruch“-Zeichen einzufügen</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows-Terminal wird im portablen Modus ausgeführt.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -294,14 +294,6 @@
<value>Automatically detect URLs and make them clickable</value>
<comment>Header for a control to toggle whether the terminal should automatically detect URLs and make them clickable, or not.</comment>
</data>
<data name="Globals_SearchWebDefaultQueryUrl.Header" xml:space="preserve">
<value>Default URL to use for the "Search web" action</value>
<comment>Header for a control to set the query URL when using the "search web" action.</comment>
</data>
<data name="Globals_SearchWebDefaultQueryUrl.HelpText" xml:space="preserve">
<value>The placeholder "%s" will replaced with the search query.</value>
<comment>{Locked="%s"} Additional text presented near "Globals_SearchWebDefaultQueryUrl.Header".</comment>
</data>
<data name="Globals_TrimBlockSelection.Header" xml:space="preserve">
<value>Remove trailing white-space in rectangular selection</value>
<comment>Header for a control to toggle whether a text selected with block selection should be trimmed of white spaces when copied to the clipboard, or not.</comment>
@@ -560,42 +552,10 @@
<value>Always on top</value>
<comment>Header for a control to toggle if the app will always be presented on top of other windows, or is treated normally (when disabled).</comment>
</data>
<data name="Profile_ForceVTInput.Header" xml:space="preserve">
<value>Use the legacy input encoding</value>
<comment>Header for a control to toggle legacy input encoding for the terminal.</comment>
</data>
<data name="Profile_AllowVtChecksumReport.Header" xml:space="preserve">
<value>Allow DECRQCRA (Request Checksum of Rectangular Area)</value>
<comment>{Locked="DECRQCRA"}{Locked="Request Checksum of Rectangular Area"}Header for a control to toggle support for the DECRQCRA control sequence.</comment>
</data>
<data name="Globals_AllowHeadless.Header" xml:space="preserve">
<value>Allow Windows Terminal to run in the background</value>
<comment>Header for a control to toggle support for Windows Terminal to run in the background.</comment>
</data>
<data name="Globals_IsolatedMode.Header" xml:space="preserve">
<value>Force each window to run in its own process</value>
<comment>Header for a control to toggle making each window be its own process.</comment>
</data>
<data name="Globals_DebugFeaturesEnabled.Header" xml:space="preserve">
<value>Enable debugging features</value>
<comment>Header for a control to toggle debug features.</comment>
</data>
<data name="Globals_AlwaysOnTop.HelpText" xml:space="preserve">
<value>Terminal will always be the topmost window on the desktop.</value>
<comment>A description for what the "always on top" setting does. Presented near "Globals_AlwaysOnTop.Header".</comment>
</data>
<data name="Profile_ForceVTInput.HelpText" xml:space="preserve">
<value>Certain keyboard input in some applications may stop working properly when this setting is enabled.</value>
<comment>Additional description for what the "force vt input" setting does. Presented near "Globals_ForceVTInput.Header".</comment>
</data>
<data name="Globals_AllowHeadless.HelpText" xml:space="preserve">
<value>This allows actions such as Global Summon and Quake Mode actions to work even when no windows are open.</value>
<comment>Additional description for what the "allow headless" setting does. Presented near "Globals_AllowHeadless.Header".</comment>
</data>
<data name="Globals_IsolatedMode.HelpText" xml:space="preserve">
<value>Certain features will not work properly, including—but not limited to—global hotkeys, tab drag and drop, and wt.exe window targeting.</value>
<comment>{Locked="wt.exe"} Additional description for what the "isolated mode" setting does. Presented near "Globals_IsolatedMode.Header".</comment>
</data>
<data name="Globals_TabWidthMode.Header" xml:space="preserve">
<value>Tab width mode</value>
<comment>Header for a control to choose how wide the tabs are.</comment>
@@ -664,10 +624,6 @@
<value>Interaction</value>
<comment>Header for the "interaction" menu item. This navigates to a page that lets you see and modify settings related to the user's mouse and touch interactions with the app.</comment>
</data>
<data name="Nav_Compatibility.Content" xml:space="preserve">
<value>Compatibility</value>
<comment>Header for the "compatibility" menu item. This navigates to a page that lets you see and modify settings related to compatibility with command line scenarios.</comment>
</data>
<data name="Nav_Launch.Content" xml:space="preserve">
<value>Startup</value>
<comment>Header for the "startup" menu item. This navigates to a page that lets you see and modify settings related to the app's launch experience (i.e. screen position, mode, etc.)</comment>
@@ -704,10 +660,6 @@
<value>Advanced</value>
<comment>Header for a sub-page of profile settings focused on more advanced scenarios.</comment>
</data>
<data name="Profile_Terminal.Header" xml:space="preserve">
<value>Terminal Emulation</value>
<comment>Header for a sub-page of profile settings focused on customizing the capabilities of the terminal.</comment>
</data>
<data name="Profile_AltGrAliasing.Header" xml:space="preserve">
<value>AltGr aliasing</value>
<comment>Header for a control to toggle whether the app treats ctrl+alt as the AltGr (also known as the Alt Graph) modifier key found on keyboards. {Locked="AltGr"}</comment>
@@ -993,34 +945,18 @@
<value>Line height</value>
<comment>Header for a control that sets the text line height.</comment>
</data>
<data name="Profile_CellWidth.Header" xml:space="preserve">
<value>Cell width</value>
<comment>Header for a control that sets the text character width.</comment>
</data>
<data name="Profile_LineHeightBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Line height</value>
<comment>Header for a control that sets the text line height.</comment>
</data>
<data name="Profile_CellWidthBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Cell width</value>
<comment>Header for a control that sets the text character width.</comment>
</data>
<data name="Profile_LineHeight.HelpText" xml:space="preserve">
<value>Override the line height of the terminal. Measured as a multiple of the font size. The default value depends on your font and is usually around 1.2.</value>
<comment>A description for what the "line height" setting does. Presented near "Profile_LineHeight".</comment>
</data>
<data name="Profile_CellWidth.HelpText" xml:space="preserve">
<value>Override the cell width of the terminal. Measured as a multiple of the font size. The default value depends on your font and is usually around 0.6.</value>
<comment>A description for what the "cell width" setting does. Presented near "Profile_CellWidth".</comment>
</data>
<data name="Profile_LineHeightBox.PlaceholderText" xml:space="preserve">
<value>1.2</value>
<comment>"1.2" is a decimal number.</comment>
</data>
<data name="Profile_CellWidthBox.PlaceholderText" xml:space="preserve">
<value>0.6</value>
<comment>"0.6" is a decimal number.</comment>
</data>
<data name="Profile_EnableBuiltinGlyphs.Header" xml:space="preserve">
<value>Builtin Glyphs</value>
<comment>The main label of a toggle. When enabled, certain characters (glyphs) are replaced with better looking ones.</comment>
@@ -1616,10 +1552,6 @@
<value>Text</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Warnings</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Window</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1900,15 +1832,6 @@
<value>Warn when closing more than one tab</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Warn when "Touch Keyboard and Handwriting Panel Service" is disabled</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Warn when trying to paste more than 5 KiB of characters</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Warn when trying to paste a "new line" character</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows Terminal is running in portable mode.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>
@@ -1929,36 +1852,4 @@
<value>Non-monospace fonts:</value>
<comment>This is a label that is followed by a list of proportional fonts.</comment>
</data>
<data name="Profile_AnswerbackMessage.Header" xml:space="preserve">
<value>ENQ (Request Terminal Status) response</value>
<comment>{Locked=ENQ}{Locked="Request Terminal Status"} Header for a control to determine the response to the ENQ escape sequence. This is represented using a text box.</comment>
</data>
<data name="Profile_AnswerbackMessage.HelpText" xml:space="preserve">
<value>The response that is sent when an ENQ control sequence is received.</value>
<comment>{Locked=ENQ} A description for what the "ENQ response" setting does. Presented near "Profile_AnswerbackMessage".</comment>
</data>
<data name="Globals_DebugFeaturesEnabled.HelpText" xml:space="preserve">
<value>Useful for troubleshooting or developing Terminal.</value>
<comment>Additional description for what the "debug features enabled" setting does. Presented near "Globals_DebugFeaturesEnabled.Header".</comment>
</data>
<data name="Profile_RainbowSuggestions.Header" xml:space="preserve">
<value>Experimental: Display suggested input in rainbow colors</value>
<comment>This is a label for a setting that, when enabled, applies a rainbow coloring to the preview text from the suggestions UI.</comment>
</data>
<data name="Globals_EnableColorSelection.Header" xml:space="preserve">
<value>Experimental: Add key bindings to color selected text</value>
<comment>Header for a control to toggle adding a set of key bindings that can be used to apply coloring to selected text in a terminal session.</comment>
</data>
<data name="Globals_EnableColorSelection.HelpText" xml:space="preserve">
<value>These key bindings can highlight the selected text or all instances of the selected text with a specified color.</value>
<comment>Additional text for a control to toggle adding a set of key bindings that can be used to apply coloring to selected text in a terminal session. Presented near "Globals_EnableColorSelection.Header".</comment>
</data>
<data name="Globals_EnableUnfocusedAcrylic.Header" xml:space="preserve">
<value>Allow acrylic material in unfocused windows</value>
<comment>Header for a control to toggle allowing unfocused windows to have an acrylic background.</comment>
</data>
<data name="Globals_ShowAdminShield.Header" xml:space="preserve">
<value>Display a shield in the title bar when Windows Terminal is running as Administrator</value>
<comment>Header for a control to toggle displaying a shield in the title bar of the app. "Admin" refers to elevated sessions like "run as Admin"</comment>
</data>
</root>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Predeterminado</value>
<value>Usar los valores predeterminados del sistema</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Modo de entrada IME predeterminado</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Informa al IME qué idioma usar de forma predeterminada. Para los idiomas que dependen de un IME y no usan caracteres latinos de forma predeterminada, esta configuración se puede usar para forzar la entrada de inglés al iniciar.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Predeterminado</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Ancho medio alfanumérico (inglés)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Mostrar pestañas siempre</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Texto</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Advertencias</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Ventana</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Advertir al cerrar más de una pestaña</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Advertir cuando el servicio "Panel de escritura a mano y teclado táctil" está deshabilitado</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Advertir al intentar pegar más de 5 KiB de caracteres</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Advertir al intentar pegar un carácter de "nueva línea"</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Terminal Windows se ejecuta en modo portátil.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Par défaut</value>
<value>Utiliser la valeur par défaut du système</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Mode dentrée IME par défaut</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Indique à IME la langue à utiliser par défaut. Pour les langues qui s'appuient sur un IME et qui n'utilisent pas les caractères latins par défaut, ce paramètre peut être utilisé pour forcer la saisie de l'anglais au démarrage.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Par défaut</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Demi-largeur alphanumérique (anglais)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Toujours afficher les onglets</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Texte</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Avertissements</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Fenêtre</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>M'avertir lorsque je ferme plusieurs onglets</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avertir lorsque le « service clavier tactile et volet décriture manuscrite » est désactivé</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Avertissement lors de la tentative de collage de plus de 5 Kio de caractères</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Avertir lors de la tentative de collage dun caractère « nouvelle ligne »</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Terminal Windows sexécute en mode portable.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Impostazione predefinita</value>
<value>Usa impostazioni predefinite di sistema</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Modalità di input IME predefinita</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Informa l'IME della lingua da usare per impostazione predefinita. Per le lingue che si affidano a un IME e che non usano i caratteri latini per impostazione predefinita, questa impostazione può essere usata per forzare l'inserimento dell'inglese all'avvio.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Impostazione predefinita</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Mezza larghezza alfanumerica (inglese)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Mostra sempre le schede</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Testo</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Avvisi</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Finestra</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Avvisa in caso di chiusura di più schede</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avvisa quando il servizio "Tastiera virtuale e pannello per la grafia" è disabilitato</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Avvisa quando si tenta di incollare più di 5 KiB di caratteri</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Avvisa quando si prova a incollare un carattere "nuova riga"</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Terminale Windows è in esecuzione in modalità portatile.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>既定値</value>
<value>システムの既定値を使用</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>既定の IME 入力モード</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>既定で使用する言語を IME に通知します。IME に依存し、既定ではラテン文字を使用しない言語では、スタートアップ時に英語入力を強制するためにこの設定を使用できます。</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>既定値</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>半角英数字 (英語)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>常にタブを表示する</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>テキスト</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>警告</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>ウィンドウ</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>複数のタブを閉じるときに警告する</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>[タッチ キーボードと手書きパネル サービス] が無効になっている場合に警告する</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>5 KiB を超える文字を貼り付けようとしたときに警告する</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>"改行" 文字を貼り付けようとしたときに警告する</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows ターミナルはポータブル モードで実行されています。</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>기본값</value>
<value>시스템 기본값 사용</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>기본 IME 입력 모드</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>기본적으로 사용할 언어를 IME에 알릴 수 있습니다. IME를 사용하고 기본적으로 라틴 문자를 사용하지 않는 언어의 경우 이 설정을 사용하여 시작할 때 영어 입력을 강제 적용할 수 있습니다.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>기본값</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>영숫자 반자(영어)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>항상 탭 표시</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>텍스트</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>경고</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>창</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>두 개 이상의 탭을 닫을 때 경고</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>"터치 키보드 및 필기 패널 서비스"를 사용할 수 없는 경우 경고</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>5KiB가 넘는 문자를 붙여넣으려고 할 때 경고</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>"줄 바꾸기" 문자를 붙여넣을 때 경고</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows 터미널이 이식 가능 모드에서 실행되고 있습니다.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Padrão</value>
<value>Usar o padrão do sistema</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Modo de entrada padrão do IME</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Informa ao IME qual idioma usar por padrão. Para idiomas que dependem de um IME e não utilizam caracteres latinos por padrão, essa configuração pode forçar a entrada em inglês na inicialização.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Padrão</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Alfanumérico Meia-Largura (Inglês)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Sempre mostrar as guias</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Texto</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Avisos</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Janela</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Avisar ao fechar mais de uma guia</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avisar quando o "Serviço de Teclado Virtual e Painel de Manuscrito" estiver desabilitado</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Avisar ao tentar colar mais de 5 KiB de caracteres</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Avisar ao tentar colar um caractere de "nova linha"</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>O terminal do Windows está em execução no modo portátil.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Ďėƒąūļτ !!</value>
<value>Ůŝê ѕŷŝτėм đєƒāùľŧ !!! !!</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Đέƒàųŀт ĨΜЗ ΐήрũŧ mоδę !!! !!! </value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Íŋƒбгмş ţђе ÎМЕ ẁћдŧ ļàņĝŭªġé ŧб üśе ьý ðěƒαűľŧ. ₣òѓ ļάņģųαģєś ţћáŧ ґ℮ŀу öŋ àи ĪΜÊ ǻйð δŏй'т цѕέ £âтĩŋ çħãѓâćтèřš ъγ ðėƒāџľŧ, ţнϊś ŝэťтĭñġ ċάń ье цѕёð τό ƒóřċε ∑ήģĺîѕħ îήρüт οŋ şŧªřťúр. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Ðеƒãϋĺţ !!</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Дĺρħăпυмегїç Ηâŀƒ-Щιδτĥ (Ęñģℓîšĥ) !!! !!! !!! </value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Άľώāŷš şђǿŵ тãвŝ !!! !</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Ţέхţ !</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Ẅåŕⁿįņğѕ !!</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Щіňďош !</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Ẃăґи ẅнěπ тґўіήĝ τø рáŝťё mοřé ţħäή 5 ΚĩВ òƒ ĉħāґąćτєґѕ !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Щāřπ ẃĥєи ťгýīлğ ţõ ρäşŧè ª "пėщ ľїл℮" ςћářǻ¢ţēř !!! !!! !!! !!! !!</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Ẅїηðσшѕ Ţеřmíńăľ īѕ ґϋййïʼnģ ĭņ рόѓťáъℓė mōďе. !!! !!! !!! !!! !</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Ďėƒąūļτ !!</value>
<value>Ůŝê ѕŷŝτėм đєƒāùľŧ !!! !!</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Đέƒàųŀт ĨΜЗ ΐήрũŧ mоδę !!! !!! </value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Íŋƒбгмş ţђе ÎМЕ ẁћдŧ ļàņĝŭªġé ŧб üśе ьý ðěƒαűľŧ. ₣òѓ ļάņģųαģєś ţћáŧ ґ℮ŀу öŋ àи ĪΜÊ ǻйð δŏй'т цѕέ £âтĩŋ çħãѓâćтèřš ъγ ðėƒāџľŧ, ţнϊś ŝэťтĭñġ ċάń ье цѕёð τό ƒóřċε ∑ήģĺîѕħ îήρüт οŋ şŧªřťúр. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Ðеƒãϋĺţ !!</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Дĺρħăпυмегїç Ηâŀƒ-Щιδτĥ (Ęñģℓîšĥ) !!! !!! !!! </value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Άľώāŷš şђǿŵ тãвŝ !!! !</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Ţέхţ !</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Ẅåŕⁿįņğѕ !!</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Щіňďош !</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Ẃăґи ẅнěπ тґўіήĝ τø рáŝťё mοřé ţħäή 5 ΚĩВ òƒ ĉħāґąćτєґѕ !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Щāřπ ẃĥєи ťгýīлğ ţõ ρäşŧè ª "пėщ ľїл℮" ςћářǻ¢ţēř !!! !!! !!! !!! !!</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Ẅїηðσшѕ Ţеřmíńăľ īѕ ґϋййïʼnģ ĭņ рόѓťáъℓė mōďе. !!! !!! !!! !!! !</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>Ďėƒąūļτ !!</value>
<value>Ůŝê ѕŷŝτėм đєƒāùľŧ !!! !!</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Đέƒàųŀт ĨΜЗ ΐήрũŧ mоδę !!! !!! </value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Íŋƒбгмş ţђе ÎМЕ ẁћдŧ ļàņĝŭªġé ŧб üśе ьý ðěƒαűľŧ. ₣òѓ ļάņģųαģєś ţћáŧ ґ℮ŀу öŋ àи ĪΜÊ ǻйð δŏй'т цѕέ £âтĩŋ çħãѓâćтèřš ъγ ðėƒāџľŧ, ţнϊś ŝэťтĭñġ ċάń ье цѕёð τό ƒóřċε ∑ήģĺîѕħ îήρüт οŋ şŧªřťúр. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>Ðеƒãϋĺţ !!</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Дĺρħăпυмегїç Ηâŀƒ-Щιδτĥ (Ęñģℓîšĥ) !!! !!! !!! </value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Άľώāŷš şђǿŵ тãвŝ !!! !</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Ţέхţ !</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Ẅåŕⁿįņğѕ !!</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Щіňďош !</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Ẃăґи ẅнěπ тґўіήĝ τø рáŝťё mοřé ţħäή 5 ΚĩВ òƒ ĉħāґąćτєґѕ !!! !!! !!! !!! !!! !</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Щāřπ ẃĥєи ťгýīлğ ţõ ρäşŧè ª "пėщ ľїл℮" ςћářǻ¢ţēř !!! !!! !!! !!! !!</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Ẅїηðσшѕ Ţеřmíńăľ īѕ ґϋййïʼnģ ĭņ рόѓťáъℓė mōďе. !!! !!! !!! !!! !</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>По умолчанию</value>
<value>Использовать системные параметры по умолчанию</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>Режим ввода IME по умолчанию</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>Сообщает IME, какой язык нужно использовать по умолчанию. Для языков, которые применяют IME и не используют латинские символы по умолчанию, этот параметр можно использовать для принудительного ввода на английском языке при запуске.</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>По умолчанию</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>Буквенно-цифровой полуширинный (английский)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>Всегда отображать вкладки</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>Текст</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>Предупреждения</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>Окно</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>Предупреждать при закрытии нескольких вкладок</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Предупреждать, если параметр "Служба сенсорной клавиатуры и панели рукописного ввода" отключен</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>Предупреждать при попытке вставки более 5 КиБ символов</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>Предупреждать при попытке вставки символа "новая строка"</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Терминал Windows работает в переносном режиме.</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>默认</value>
<value>使用系统默认</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>默认输入法输入模式</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>告知输入法默认使用的语言。对于依赖于输入法且默认不使用拉丁字符的语言,此设置可用于在启动时强制进行英语输入。</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>默认</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>字母数字半角(英语)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>始终显示选项卡</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1170,7 +1157,7 @@
<comment>Header for a control to determine the title of the tab. This is represented using a text box.</comment>
</data>
<data name="Profile_TabTitle.HelpText" xml:space="preserve">
<value>将配置文件名称替换为标题,以在启动时传递给 shell。</value>
<value>将配置文件名称替换为标题,以在启动时传递给外壳。</value>
<comment>A description for what the "tab title" setting does. Presented near "Profile_TabTitle".</comment>
</data>
<data name="Profile_UnfocusedAppearanceTextBlock.Text" xml:space="preserve">
@@ -1552,10 +1539,6 @@
<value>文本</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>警告</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>窗口</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>关闭多个选项卡时发出警告</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>禁用“触摸键盘和手写面板服务”时发出警告</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>尝试粘贴超过 5 KiB 字符时发出警告</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>尝试粘贴“新行”字符时发出警告</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows 终端正在便携模式下运行。</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -246,22 +246,9 @@
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
</data>
<data name="Globals_LanguageDefault" xml:space="preserve">
<value>預設</value>
<value>使用系統預設</value>
<comment>The app contains a control allowing users to choose the app's language. If this value is chosen, the language preference list of the system settings is used instead.</comment>
</data>
<data name="Globals_DefaultInputScope.Header" xml:space="preserve">
<value>預設 IME 輸入模式</value>
<comment>The "input scope" of an IME tells it what type of characters should be available for input. A Chinese IME for instance may show English letters instead of Chinese ones. It's a technical term. We're using "input mode" instead of "input scope" to make it easier to understand for users.</comment>
</data>
<data name="Globals_DefaultInputScope.HelpText" xml:space="preserve">
<value>通知 IME 預設使用的語言。對於依賴 IME 且預設不使用拉丁字元的語言,此設定可用來強制啟動英文輸入。</value>
</data>
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
<value>預設</value>
</data>
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
<value>英數字元半寬 (英文)</value>
</data>
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
<value>永遠顯示索引標籤</value>
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
@@ -1552,10 +1539,6 @@
<value>文字</value>
<comment>Header for a group of settings that control the appearance of text in the app.</comment>
</data>
<data name="Globals_WarningsHeader.Text" xml:space="preserve">
<value>警告</value>
<comment>Header for a group of settings that control the warnings in the app.</comment>
</data>
<data name="Profile_WindowHeader.Text" xml:space="preserve">
<value>視窗</value>
<comment>Header for a group of settings that control the appearance of the window frame of the app.</comment>
@@ -1836,15 +1819,6 @@
<value>關閉多個索引標籤時發出警告</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>停用「觸控式鍵盤和手寫面板服務」時發出警告</value>
</data>
<data name="Globals_WarnAboutLargePaste.Header" xml:space="preserve">
<value>嘗試貼上超過 5 個 KiB 字元時發出警告</value>
</data>
<data name="Globals_WarnAboutMultiLinePaste.Header" xml:space="preserve">
<value>嘗試貼上「新行」字元時發出警告</value>
</data>
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
<value>Windows 終端機正以可攜式模式執行。</value>
<comment>A disclaimer that indicates that Terminal is running in a mode that saves settings to a different folder.</comment>

View File

@@ -44,9 +44,6 @@
<StaticResource x:Key="SettingContainerMessageForeground"
ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
ResourceKey="SystemAccentColorDark2" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<Style x:Key="SecondaryTextBlockStyle"
@@ -76,9 +73,6 @@
ResourceKey="SystemColorWindowTextColorBrush" />
<StaticResource x:Key="SettingContainerMessageForeground"
ResourceKey="SystemColorWindowTextColorBrush" />
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
ResourceKey="SystemAccentColorLight1" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Style x:Key="SecondaryTextBlockStyle"
@@ -112,9 +106,6 @@
ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="SettingContainerMessageForeground"
ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
ResourceKey="SystemAccentColorLight2" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
@@ -145,7 +136,7 @@
<Style x:Key="SettingContainerFontIconStyle"
TargetType="FontIcon">
<Setter Property="Foreground" Value="{ThemeResource SettingContainerResetButtonIconForeground}" />
<Setter Property="Foreground" Value="{StaticResource SystemAccentColor}" />
<Setter Property="FontSize" Value="11" />
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
</Style>

View File

@@ -531,9 +531,7 @@ void CascadiaSettings::_validateMediaResources()
// Explicitly just use the Icon here, not the EvaluatedIcon. We don't
// want to blow up if we fell back to the commandline and the
// commandline _isn't an icon_.
// GH #17943: "none" is a special value interpreted as "remove the icon"
static constexpr std::wstring_view HideIconValue{ L"none" };
if (const auto icon = profile.Icon(); icon.size() > 2 && icon != HideIconValue)
if (const auto icon = profile.Icon(); icon.size() > 2)
{
const auto iconPath{ wil::ExpandEnvironmentStringsW<std::wstring>(icon.c_str()) };
try

View File

@@ -524,15 +524,6 @@ bool SettingsLoader::FixupUserSettings()
fixedUp = true;
}
// Terminal 1.23: Migrate the global
// `experimental.input.forceVT` to being a per-profile setting.
if (userSettings.globals->LegacyForceVTInput())
{
// migrate the user's opt-out to the profiles.defaults
userSettings.baseLayerProfile->ForceVTInput(true);
fixedUp = true;
}
return fixedUp;
}

View File

@@ -23,11 +23,6 @@ static constexpr std::string_view ThemeKey{ "theme" };
static constexpr std::string_view DefaultProfileKey{ "defaultProfile" };
static constexpr std::string_view LegacyUseTabSwitcherModeKey{ "useTabSwitcher" };
static constexpr std::string_view LegacyReloadEnvironmentVariablesKey{ "compatibility.reloadEnvironmentVariables" };
static constexpr std::string_view LegacyForceVTInputKey{ "experimental.input.forceVT" };
static constexpr std::string_view LegacyInputServiceWarningKey{ "inputServiceWarning" };
static constexpr std::string_view LegacyWarnAboutLargePasteKey{ "largePasteWarning" };
static constexpr std::string_view LegacyWarnAboutMultiLinePasteKey{ "multiLinePasteWarning" };
static constexpr std::string_view LegacyConfirmCloseAllTabsKey{ "confirmCloseAllTabs" };
// Method Description:
// - Copies any extraneous data from the parent before completing a CreateChild call
@@ -137,12 +132,7 @@ void GlobalAppSettings::LayerJson(const Json::Value& json, const OriginTag origi
// GH#8076 - when adding enum values to this key, we also changed it from
// "useTabSwitcher" to "tabSwitcherMode". Continue supporting
// "useTabSwitcher", but prefer "tabSwitcherMode"
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyUseTabSwitcherModeKey, _TabSwitcherMode) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyInputServiceWarningKey, _InputServiceWarning) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyWarnAboutLargePasteKey, _WarnAboutLargePaste) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyWarnAboutMultiLinePasteKey, _WarnAboutMultiLinePaste) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyConfirmCloseAllTabsKey, _ConfirmCloseAllTabs) || _fixupsAppliedDuringLoad;
JsonUtils::GetValueForKey(json, LegacyUseTabSwitcherModeKey, _TabSwitcherMode);
#define GLOBAL_SETTINGS_LAYER_JSON(type, name, jsonKey, ...) \
JsonUtils::GetValueForKey(json, jsonKey, _##name); \
@@ -164,20 +154,12 @@ void GlobalAppSettings::LayerJson(const Json::Value& json, const OriginTag origi
}
LayerActionsFrom(json, origin, true);
// No need to update _fixupsAppliedDuringLoad here.
// We already handle this in SettingsLoader::FixupUserSettings().
JsonUtils::GetValueForKey(json, LegacyReloadEnvironmentVariablesKey, _legacyReloadEnvironmentVariables);
if (json[LegacyReloadEnvironmentVariablesKey.data()])
{
_logSettingSet(LegacyReloadEnvironmentVariablesKey);
}
JsonUtils::GetValueForKey(json, LegacyForceVTInputKey, _legacyForceVTInput);
if (json[LegacyForceVTInputKey.data()])
{
_logSettingSet(LegacyForceVTInputKey);
}
// Remove settings included in userDefaults
static constexpr std::array<std::pair<std::string_view, std::string_view>, 2> userDefaultSettings{ { { "copyOnSelect", "false" },
{ "copyFormatting", "false" } } };
@@ -318,7 +300,7 @@ Json::Value GlobalAppSettings::ToJson()
bool GlobalAppSettings::FixupsAppliedDuringLoad()
{
return _fixupsAppliedDuringLoad || _actionMap->FixupsAppliedDuringLoad();
return _actionMap->FixupsAppliedDuringLoad();
}
winrt::Microsoft::Terminal::Settings::Model::Theme GlobalAppSettings::CurrentTheme() noexcept

View File

@@ -71,7 +71,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
const Windows::Foundation::Collections::IMapView<winrt::hstring, Model::ColorScheme>& schemes);
bool LegacyReloadEnvironmentVariables() const noexcept { return _legacyReloadEnvironmentVariables; }
bool LegacyForceVTInput() const noexcept { return _legacyForceVTInput; }
void LogSettingChanges(std::set<std::string>& changes, const std::string_view& context) const;
@@ -90,9 +89,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
#endif
winrt::guid _defaultProfile{};
bool _fixupsAppliedDuringLoad{ false };
bool _legacyReloadEnvironmentVariables{ true };
bool _legacyForceVTInput{ false };
winrt::com_ptr<implementation::ActionMap> _actionMap{ winrt::make_self<implementation::ActionMap>() };
std::set<std::string> _changeLog;

View File

@@ -82,6 +82,7 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_SETTING(Boolean, SoftwareRendering);
INHERITABLE_SETTING(Microsoft.Terminal.Control.TextMeasurement, TextMeasurement);
INHERITABLE_SETTING(Boolean, UseBackgroundImageForWindow);
INHERITABLE_SETTING(Boolean, ForceVTInput);
INHERITABLE_SETTING(Boolean, DebugFeaturesEnabled);
INHERITABLE_SETTING(Boolean, StartOnUserLogin);
INHERITABLE_SETTING(Boolean, AlwaysOnTop);

View File

@@ -101,10 +101,10 @@ static int32_t parseNumericCode(const std::wstring_view& str, const std::wstring
return 0;
}
const auto value = til::to_ulong({ str.data() + prefix.size(), str.size() - prefix.size() - suffix.size() });
if (value > 0 && value < 256)
const auto value = til::parse_unsigned<uint8_t>({ str.data() + prefix.size(), str.size() - prefix.size() - suffix.size() });
if (value)
{
return gsl::narrow_cast<int32_t>(value);
return gsl::narrow_cast<int32_t>(*value);
}
throw winrt::hresult_invalid_argument(L"Invalid numeric argument to vk() or sc()");
@@ -151,10 +151,8 @@ static KeyChord _fromString(std::wstring_view wstr)
auto vkey = 0;
auto scanCode = 0;
while (!wstr.empty())
for (auto&& part : til::split_iterator{ wstr, L'+' })
{
const auto part = til::prefix_split(wstr, L'+');
if (til::equals_insensitive_ascii(part, CTRL_KEY))
{
modifiers |= VirtualKeyModifiers::Control;

View File

@@ -30,21 +30,22 @@ Author(s):
X(winrt::Microsoft::Terminal::Control::TextMeasurement, TextMeasurement, "compatibility.textMeasurement") \
X(winrt::Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope, "defaultInputScope") \
X(bool, UseBackgroundImageForWindow, "experimental.useBackgroundImageForWindow", false) \
X(bool, ForceVTInput, "experimental.input.forceVT", false) \
X(bool, TrimBlockSelection, "trimBlockSelection", true) \
X(bool, DetectURLs, "experimental.detectURLs", true) \
X(bool, AlwaysShowTabs, "alwaysShowTabs", true) \
X(Model::NewTabPosition, NewTabPosition, "newTabPosition", Model::NewTabPosition::AfterLastTab) \
X(bool, ShowTitleInTitlebar, "showTerminalTitleInTitlebar", true) \
X(bool, ConfirmCloseAllTabs, "warning.confirmCloseAllTabs", true) \
X(bool, ConfirmCloseAllTabs, "confirmCloseAllTabs", true) \
X(Model::ThemePair, Theme, "theme") \
X(hstring, Language, "language") \
X(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, "tabWidthMode", winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal) \
X(bool, UseAcrylicInTabRow, "useAcrylicInTabRow", false) \
X(bool, ShowTabsInTitlebar, "showTabsInTitlebar", true) \
X(bool, InputServiceWarning, "warning.inputService", true) \
X(bool, InputServiceWarning, "inputServiceWarning", true) \
X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, "copyFormatting", 0) \
X(bool, WarnAboutLargePaste, "warning.largePaste", true) \
X(bool, WarnAboutMultiLinePaste, "warning.multiLinePaste", true) \
X(bool, WarnAboutLargePaste, "largePasteWarning", true) \
X(bool, WarnAboutMultiLinePaste, "multiLinePasteWarning", true) \
X(Model::LaunchPosition, InitialPosition, "initialPosition", nullptr, nullptr) \
X(bool, CenterOnLaunch, "centerOnLaunch", false) \
X(Model::FirstWindowPreference, FirstWindowPreference, "firstWindowPreference", FirstWindowPreference::DefaultProfile) \
@@ -92,17 +93,14 @@ Author(s):
X(hstring, TabTitle, "tabTitle") \
X(Model::BellStyle, BellStyle, "bellStyle", BellStyle::Audible) \
X(IEnvironmentVariableMap, EnvironmentVariables, "environment", nullptr) \
X(bool, RightClickContextMenu, "rightClickContextMenu", false) \
X(bool, RightClickContextMenu, "experimental.rightClickContextMenu", false) \
X(Windows::Foundation::Collections::IVector<winrt::hstring>, BellSound, "bellSound", nullptr) \
X(bool, Elevate, "elevate", false) \
X(bool, AutoMarkPrompts, "autoMarkPrompts", true) \
X(bool, ShowMarks, "showMarksOnScrollbar", false) \
X(bool, RepositionCursorWithMouse, "experimental.repositionCursorWithMouse", false) \
X(bool, ReloadEnvironmentVariables, "compatibility.reloadEnvironmentVariables", true) \
X(bool, RainbowSuggestions, "experimental.rainbowSuggestions", false) \
X(bool, ForceVTInput, "compatibility.input.forceVT", false) \
X(bool, AllowVtChecksumReport, "compatibility.allowDECRQCRA", false) \
X(bool, AllowKeypadMode, "compatibility.allowDECNKM", false)
X(bool, RainbowSuggestions, "experimental.rainbowSuggestions", false)
// Intentionally omitted Profile settings:
// * Name

View File

@@ -36,7 +36,6 @@ static constexpr std::string_view UnfocusedAppearanceKey{ "unfocusedAppearance"
static constexpr std::string_view LegacyAutoMarkPromptsKey{ "experimental.autoMarkPrompts" };
static constexpr std::string_view LegacyShowMarksKey{ "experimental.showMarksOnScrollbar" };
static constexpr std::string_view LegacyRightClickContextMenuKey{ "experimental.rightClickContextMenu" };
Profile::Profile(guid guid) noexcept :
_Guid(guid)
@@ -197,7 +196,6 @@ void Profile::LayerJson(const Json::Value& json)
// Done _before_ the MTSM_PROFILE_SETTINGS, which have the updated keys.
JsonUtils::GetValueForKey(json, LegacyShowMarksKey, _ShowMarks);
JsonUtils::GetValueForKey(json, LegacyAutoMarkPromptsKey, _AutoMarkPrompts);
JsonUtils::GetValueForKey(json, LegacyRightClickContextMenuKey, _RightClickContextMenu);
#define PROFILE_SETTINGS_LAYER_JSON(type, name, jsonKey, ...) \
JsonUtils::GetValueForKey(json, jsonKey, _##name); \

View File

@@ -89,8 +89,6 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_PROFILE_SETTING(Boolean, ReloadEnvironmentVariables);
INHERITABLE_PROFILE_SETTING(Boolean, RainbowSuggestions);
INHERITABLE_PROFILE_SETTING(Boolean, ForceVTInput);
INHERITABLE_PROFILE_SETTING(Boolean, AllowVtChecksumReport);
INHERITABLE_PROFILE_SETTING(Boolean, AllowKeypadMode);
}
}

View File

@@ -347,8 +347,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
_RepositionCursorWithMouse = profile.RepositionCursorWithMouse();
_ReloadEnvironmentVariables = profile.ReloadEnvironmentVariables();
_RainbowSuggestions = profile.RainbowSuggestions();
_ForceVTInput = profile.ForceVTInput();
_AllowVtChecksumReport = profile.AllowVtChecksumReport();
}
// Method Description:
@@ -372,6 +370,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
_TextMeasurement = globalSettings.TextMeasurement();
_DefaultInputScope = globalSettings.DefaultInputScope();
_UseBackgroundImageForWindow = globalSettings.UseBackgroundImageForWindow();
_ForceVTInput = globalSettings.ForceVTInput();
_TrimBlockSelection = globalSettings.TrimBlockSelection();
_DetectURLs = globalSettings.DetectURLs();
_EnableUnfocusedAcrylic = globalSettings.EnableUnfocusedAcrylic();

View File

@@ -94,7 +94,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
INHERITABLE_SETTING(Model::TerminalSettings, bool, CopyOnSelect, false);
INHERITABLE_SETTING(Model::TerminalSettings, Microsoft::Terminal::Control::CopyFormat, CopyFormatting, 0);
INHERITABLE_SETTING(Model::TerminalSettings, bool, FocusFollowMouse, false);
INHERITABLE_SETTING(Model::TerminalSettings, bool, AllowVtChecksumReport, false);
INHERITABLE_SETTING(Model::TerminalSettings, bool, TrimBlockSelection, true);
INHERITABLE_SETTING(Model::TerminalSettings, bool, DetectURLs, true);

View File

@@ -719,8 +719,8 @@ struct ::Microsoft::Terminal::Settings::Model::JsonUtils::ConversionTrait<::winr
if (isIndexed16)
{
const auto indexStr = string.substr(1);
const auto idx = til::to_ulong(indexStr, 16);
color.r = gsl::narrow_cast<uint8_t>(std::min(idx, 15ul));
const auto idx = til::parse_unsigned<uint8_t>(indexStr, 16);
color.r = std::min<uint8_t>(idx.value_or(255), 15);
}
else
{

View File

@@ -73,35 +73,33 @@ namespace winrt::Microsoft::Terminal::UI::implementation
double Converters::MaxValueFromPaddingString(const winrt::hstring& paddingString)
{
std::wstring_view remaining{ paddingString };
std::wstring_view input{ paddingString };
std::wstring buffer;
double maxVal = 0;
auto& errnoRef = errno; // Nonzero cost, pay it once
// Get padding values till we run out of delimiter separated values in the stream
// Non-numeral values detected will default to 0
// std::stod will throw invalid_argument exception if the input is an invalid double value
// std::stod will throw out_of_range exception if the input value is more than DBL_MAX
try
for (auto&& part : til::split_iterator{ input, L',' })
{
while (!remaining.empty())
buffer.assign(part);
// wcstod handles whitespace prefix (which is ignored) & stops the
// scan when first char outside the range of radix is encountered.
// We'll be permissive till the extent that stod function allows us to be by default
// Ex. a value like 100.3#535w2 will be read as 100.3, but ;df25 will fail
errnoRef = 0;
wchar_t* end;
const double val = wcstod(buffer.c_str(), &end);
if (end != buffer.c_str() && errnoRef != ERANGE)
{
const std::wstring token{ til::prefix_split(remaining, L',') };
// std::stod internally calls wcstod which handles whitespace prefix (which is ignored)
// & stops the scan when first char outside the range of radix is encountered
// We'll be permissive till the extent that stod function allows us to be by default
// Ex. a value like 100.3#535w2 will be read as 100.3, but ;df25 will fail
const auto curVal = std::stod(token);
if (curVal > maxVal)
{
maxVal = curVal;
}
maxVal = std::max(maxVal, val);
}
}
catch (...)
{
// If something goes wrong, even if due to a single bad padding value, we'll return default 0 padding
maxVal = 0;
LOG_CAUGHT_EXCEPTION();
}
return maxVal;
}

View File

@@ -271,12 +271,7 @@ namespace winrt::Microsoft::Terminal::UI::implementation
if (commaIndex != std::wstring::npos)
{
// Convert the string iconIndex to a signed int to support negative numbers which represent an Icon's ID.
const auto index{ til::to_int(pathView.substr(commaIndex + 1)) };
if (index == til::to_int_error)
{
return std::nullopt;
}
return static_cast<int>(index);
return til::parse_signed<int>(pathView.substr(commaIndex + 1));
}
// We had a binary path, but no index. Default to 0.

View File

@@ -107,6 +107,7 @@ namespace SettingsModelUnitTests
"initialPosition": ",",
"launchMode": "default",
"alwaysOnTop": false,
"inputServiceWarning": true,
"copyOnSelect": false,
"copyFormatting": "all",
"wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",
@@ -122,12 +123,12 @@ namespace SettingsModelUnitTests
"snapToGridOnResize": true,
"disableAnimations": false,
"confirmCloseAllTabs": true,
"largePasteWarning": true,
"multiLinePasteWarning": true,
"trimPaste": true,
"warning.confirmCloseAllTabs" : true,
"warning.inputService" : true,
"warning.largePaste" : true,
"warning.multiLinePaste" : true,
"experimental.input.forceVT": false,
"actions": [],
"keybindings": []

View File

@@ -57,7 +57,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>WindowsApp.lib;winmm.Lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WindowsApp.lib;WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->

View File

@@ -1,26 +1,22 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
constexpr std::wstring_view WtExe{ L"wt.exe" };
constexpr std::wstring_view WtdExe{ L"wtd.exe" };
constexpr std::wstring_view WindowsTerminalExe{ L"WindowsTerminal.exe" };
constexpr std::wstring_view LocalAppDataAppsPath{ L"%LOCALAPPDATA%\\Microsoft\\WindowsApps\\" };
constexpr std::wstring_view ElevateShimExe{ L"elevate-shim.exe" };
// Forward declared from appmodel.h so that we don't need to pull in that header everywhere.
extern "C" {
WINBASEAPI LONG WINAPI GetCurrentPackageId(UINT32* bufferLength, BYTE* buffer);
}
#ifdef WINRT_Windows_ApplicationModel_H
_TIL_INLINEPREFIX bool IsPackaged()
{
static const auto isPackaged = []() {
UINT32 bufferLength = 0;
const auto hr = GetCurrentPackageId(&bufferLength, nullptr);
return hr != APPMODEL_ERROR_NO_PACKAGE;
static const auto isPackaged = []() -> bool {
try
{
const auto package = winrt::Windows::ApplicationModel::Package::Current();
return true;
}
catch (...)
{
return false;
}
}();
return isPackaged;
}

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net472;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
<RootNamespace>Microsoft.Terminal.Wpf</RootNamespace>
<AssemblyName>Microsoft.Terminal.Wpf</AssemblyName>
<UseWpf>true</UseWpf>

View File

@@ -2,8 +2,8 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeFrameworkVersion>8.0.8</RuntimeFrameworkVersion>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeFrameworkVersion>6.0.9</RuntimeFrameworkVersion>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64;x86;ARM64</Platforms>
</PropertyGroup>

View File

@@ -51,8 +51,7 @@
X(bool, DetectURLs, true) \
X(bool, AutoMarkPrompts) \
X(bool, RepositionCursorWithMouse, false) \
X(bool, RainbowSuggestions) \
X(bool, AllowVtChecksumReport)
X(bool, RainbowSuggestions)
// --------------------------- Control Settings ---------------------------
// All of these settings are defined in IControlSettings.

View File

@@ -179,11 +179,4 @@
</alwaysEnabledBrandingTokens>
</feature>
<feature>
<name>Feature_DebugModeUI</name>
<description>Enables UI access to the debug mode setting</description>
<stage>AlwaysEnabled</stage>
<alwaysDisabledReleaseTokens/>
</feature>
</featureStaging>

View File

@@ -75,6 +75,8 @@ void PtySignalInputThread::ConnectConsole() noexcept
{
_DoShowHide(*_initialShowHide);
}
// We should have successfully used the _earlyReparent message in CreatePseudoWindow.
}
// Method Description:
@@ -86,7 +88,8 @@ void PtySignalInputThread::ConnectConsole() noexcept
// - Refer to GH#13066 for details.
void PtySignalInputThread::CreatePseudoWindow()
{
ServiceLocator::LocatePseudoWindow();
HWND owner = _earlyReparent.has_value() ? reinterpret_cast<HWND>((*_earlyReparent).handle) : HWND_DESKTOP;
ServiceLocator::LocatePseudoWindow(owner);
}
// Method Description:
@@ -220,7 +223,7 @@ void PtySignalInputThread::_DoShowHide(const ShowHideData& data)
return;
}
ServiceLocator::SetPseudoWindowVisibility(data.show);
_api.ShowWindow(data.show);
}
// Method Description:
@@ -237,7 +240,44 @@ void PtySignalInputThread::_DoSetWindowParent(const SetParentData& data)
LockConsole();
auto Unlock = wil::scope_exit([&] { UnlockConsole(); });
ServiceLocator::SetPseudoWindowOwner(reinterpret_cast<HWND>(data.handle));
// If the client app hasn't yet connected, stash the new owner.
// We'll later (PtySignalInputThread::ConnectConsole) use the value
// to set up the owner of the conpty window.
if (!_consoleConnected)
{
_earlyReparent = data;
return;
}
const auto owner{ reinterpret_cast<HWND>(data.handle) };
// This will initialize s_interactivityFactory for us. It will also
// conveniently return 0 when we're on OneCore.
//
// If the window hasn't been created yet, by some other call to
// LocatePseudoWindow, then this will also initialize the owner of the
// window.
if (const auto pseudoHwnd{ ServiceLocator::LocatePseudoWindow(owner) })
{
// SetWindowLongPtrW may call back into the message handler and wait for it to finish,
// similar to SendMessageW(). If the conhost message handler is already processing and
// waiting to acquire the console lock, which we're currently holding, we'd deadlock.
// --> Release the lock now.
Unlock.reset();
// DO NOT USE SetParent HERE!
//
// Calling SetParent on a window that is WS_VISIBLE will cause the OS to
// hide the window, make it a _child_ window, then call SW_SHOW on the
// window to re-show it. SW_SHOW, however, will cause the OS to also set
// that window as the _foreground_ window, which would result in the
// pty's hwnd stealing the foreground away from the owning terminal
// window. That's bad.
//
// SetWindowLongPtr seems to do the job of changing who the window owner
// is, without all the other side effects of reparenting the window.
// See #13066
::SetWindowLongPtrW(pseudoHwnd, GWLP_HWNDPARENT, reinterpret_cast<LONG_PTR>(owner));
}
}
// Method Description:

View File

@@ -75,5 +75,8 @@ namespace Microsoft::Console
std::optional<ResizeWindowData> _earlyResize;
std::optional<ShowHideData> _initialShowHide;
ConhostInternalGetSet _api;
public:
std::optional<SetParentData> _earlyReparent;
};
}

View File

@@ -19,39 +19,17 @@
using Microsoft::Console::Interactivity::ServiceLocator;
struct case_insensitive_hash
struct insensitive_less
{
using is_transparent = void;
using is_transparent = int;
std::size_t operator()(const std::wstring_view& key) const
bool operator()(const std::wstring_view& lhs, const std::wstring_view& rhs) const noexcept
{
til::hasher h;
for (const auto& ch : key)
{
h.write(::towlower(ch));
}
return h.finalize();
return til::compare_ordinal_insensitive(lhs, rhs) < 0;
}
};
struct case_insensitive_equality
{
using is_transparent = void;
bool operator()(const std::wstring_view& lhs, const std::wstring_view& rhs) const
{
return til::compare_ordinal_insensitive(lhs, rhs) == 0;
}
};
std::unordered_map<std::wstring,
std::unordered_map<std::wstring,
std::wstring,
case_insensitive_hash,
case_insensitive_equality>,
case_insensitive_hash,
case_insensitive_equality>
g_aliasData;
static std::map<std::wstring, std::map<std::wstring, std::wstring, insensitive_less>, insensitive_less> g_aliasData;
// Routine Description:
// - Adds a command line alias to the global set.
@@ -99,26 +77,26 @@ std::unordered_map<std::wstring,
try
{
std::wstring exeNameString(exeName);
std::wstring sourceString(source);
std::wstring targetString(target);
std::transform(exeNameString.begin(), exeNameString.end(), exeNameString.begin(), towlower);
std::transform(sourceString.begin(), sourceString.end(), sourceString.begin(), towlower);
if (targetString.size() == 0)
if (target.empty())
{
// Only try to dig in and erase if the exeName exists.
auto exeData = g_aliasData.find(exeNameString);
const auto exeData = g_aliasData.find(exeName);
if (exeData != g_aliasData.end())
{
g_aliasData[exeNameString].erase(sourceString);
// With C++23 this can be replaced with just a single erase() call.
const auto sourceData = exeData->second.find(source);
if (sourceData != exeData->second.end())
{
exeData->second.erase(sourceData);
}
}
}
else
{
// Map will auto-create each level as necessary
g_aliasData[exeNameString][sourceString] = targetString;
// With C++26 this can written a lot shorter with operator[].
const auto exeData = g_aliasData.emplace(std::piecewise_construct, std::forward_as_tuple(exeName), std::forward_as_tuple()).first;
const auto sourceData = exeData->second.emplace(std::piecewise_construct, std::forward_as_tuple(source), std::forward_as_tuple()).first;
sourceData->second.assign(exeName);
}
}
CATCH_RETURN();
@@ -153,18 +131,18 @@ std::unordered_map<std::wstring,
til::at(*target, 0) = UNICODE_NULL;
}
std::wstring exeNameString(exeName);
std::wstring sourceString(source);
// For compatibility, return ERROR_GEN_FAILURE for any result where the alias can't be found.
// We use .find for the iterators then dereference to search without creating entries.
const auto exeIter = g_aliasData.find(exeNameString);
// In the past a not-found resulted in a STATUS_UNSUCCESSFUL.
// This was then translated by ntdll into ERROR_GEN_FAILURE.
// Since we stopped using NTSTATUS codes, we now return ERROR_GEN_FAILURE directly.
const auto exeIter = g_aliasData.find(exeName);
RETURN_HR_IF(HRESULT_FROM_WIN32(ERROR_GEN_FAILURE), exeIter == g_aliasData.end());
const auto& exeData = exeIter->second;
const auto sourceIter = exeData.find(sourceString);
const auto sourceIter = exeData.find(source);
RETURN_HR_IF(HRESULT_FROM_WIN32(ERROR_GEN_FAILURE), sourceIter == exeData.end());
const auto& targetString = sourceIter->second;
RETURN_HR_IF(HRESULT_FROM_WIN32(ERROR_GEN_FAILURE), targetString.size() == 0);
RETURN_HR_IF(HRESULT_FROM_WIN32(ERROR_GEN_FAILURE), targetString.empty());
// TargetLength is a byte count, convert to characters.
auto targetSize = targetString.size();
@@ -337,8 +315,7 @@ static std::wstring aliasesSeparator(L"=");
auto exeIter = g_aliasData.find(exeNameString);
if (exeIter != g_aliasData.end())
{
const auto& list = exeIter->second;
for (auto& pair : list)
for (auto& pair : exeIter->second)
{
// Alias stores lengths in bytes.
auto cchSource = pair.first.size();
@@ -422,7 +399,7 @@ static std::wstring aliasesSeparator(L"=");
void Alias::s_ClearCmdExeAliases()
{
// find without creating.
auto exeIter = g_aliasData.find(L"cmd.exe");
const auto exeIter = g_aliasData.find(L"cmd.exe");
if (exeIter != g_aliasData.end())
{
exeIter->second.clear();
@@ -465,11 +442,10 @@ void Alias::s_ClearCmdExeAliases()
const size_t cchNull = 1;
// Find without creating.
auto exeIter = g_aliasData.find(exeNameString);
const auto exeIter = g_aliasData.find(exeNameString);
if (exeIter != g_aliasData.end())
{
const auto& list = exeIter->second;
for (auto& pair : list)
for (auto& pair : exeIter->second)
{
// Alias stores lengths in bytes.
const auto cchSource = pair.first.size();

View File

@@ -86,7 +86,7 @@
</ClCompile>
<Link>
<AllowIsolation>true</AllowIsolation>
<AdditionalDependencies>winmm.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->

View File

@@ -69,7 +69,7 @@
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>winmm.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +77,7 @@
<!-- In theory, we may want to build with a normal main() when Fuzzing is not enabled. -->
<!-- So, let's only add the fuzzer to the link line when we're building for Fuzzing. -->
<Link>
<AdditionalDependencies>winmm.lib;imm32.lib;clang_rt.fuzzer_MT-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WinMM.Lib;clang_rt.fuzzer_MT-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->

View File

@@ -757,38 +757,21 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
// GH#1222 and GH#9754 - Use the "virtual" viewport here, so that the
// viewport snaps back to the virtual viewport's location.
const auto currentViewport = buffer.GetVirtualViewport().ToInclusive();
til::point delta;
{
// When evaluating the X offset, we must convert the buffer position to
// equivalent screen coordinates, taking line rendition into account.
const auto lineRendition = buffer.GetTextBuffer().GetLineRendition(position.y);
const auto screenPosition = BufferToScreenLine(til::inclusive_rect{ position.x, position.y, position.x, position.y }, lineRendition);
if (currentViewport.left > screenPosition.left)
{
delta.x = screenPosition.left - currentViewport.left;
}
else if (currentViewport.right < screenPosition.right)
{
delta.x = screenPosition.right - currentViewport.right;
}
// When evaluating the X offset, we must convert the buffer position to
// equivalent screen coordinates, taking line rendition into account.
const auto lineRendition = buffer.GetTextBuffer().GetLineRendition(position.y);
const auto screenPosition = BufferToScreenLine(til::inclusive_rect{ position.x, position.y, position.x, position.y }, lineRendition);
if (currentViewport.top > position.y)
{
delta.y = position.y - currentViewport.top;
}
else if (currentViewport.bottom < position.y)
{
delta.y = position.y - currentViewport.bottom;
}
}
auto left = std::min(currentViewport.left, screenPosition.left);
left = std::max(left, screenPosition.right - currentViewport.right + currentViewport.left);
auto top = std::min(currentViewport.top, screenPosition.top);
top = std::max(top, screenPosition.bottom - currentViewport.bottom + currentViewport.top);
til::point newWindowOrigin;
newWindowOrigin.x = currentViewport.left + delta.x;
newWindowOrigin.y = currentViewport.top + delta.y;
// SetViewportOrigin will worry about clamping these values to the
// buffer for us.
RETURN_IF_NTSTATUS_FAILED(buffer.SetViewportOrigin(true, newWindowOrigin, true));
RETURN_IF_NTSTATUS_FAILED(buffer.SetViewportOrigin(true, { left, top }, true));
// SetViewportOrigin will only move the virtual bottom down, but in
// this particular case we also need to allow the virtual bottom to
@@ -1140,6 +1123,7 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
{
// Set new code page
gci.OutputCP = codepage;
SetConsoleCPInfo(TRUE);
}
@@ -1156,36 +1140,13 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
{
try
{
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
LockConsole();
auto Unlock = wil::scope_exit([&] { UnlockConsole(); });
RETURN_IF_FAILED(DoSrvSetConsoleOutputCodePage(codepage));
// Setting the code page via the API also updates the default value.
// This is how the initial code page is set to UTF-8 in a WSL shell.
gci.DefaultOutputCP = codepage;
return S_OK;
return DoSrvSetConsoleOutputCodePage(codepage);
}
CATCH_RETURN();
}
[[nodiscard]] HRESULT DoSrvSetConsoleInputCodePage(const unsigned int codepage)
{
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
// Return if it's not known as a valid codepage ID.
RETURN_HR_IF(E_INVALIDARG, !(IsValidCodePage(codepage)));
// Do nothing if no change.
if (gci.CP != codepage)
{
// Set new code page
gci.CP = codepage;
SetConsoleCPInfo(FALSE);
}
return S_OK;
}
// Routine Description:
// - Sets the codepage used for translating text when calling A versions of functions affecting the input buffer.
// Arguments:
@@ -1199,10 +1160,19 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
LockConsole();
auto Unlock = wil::scope_exit([&] { UnlockConsole(); });
RETURN_IF_FAILED(DoSrvSetConsoleInputCodePage(codepage));
// Setting the code page via the API also updates the default value.
// This is how the initial code page is set to UTF-8 in a WSL shell.
gci.DefaultCP = codepage;
// Return if it's not known as a valid codepage ID.
RETURN_HR_IF(E_INVALIDARG, !(IsValidCodePage(codepage)));
// Do nothing if no change.
if (gci.CP != codepage)
{
// Set new code page
gci.CP = codepage;
SetConsoleCPInfo(FALSE);
}
return S_OK;
}
CATCH_RETURN();

View File

@@ -19,4 +19,3 @@ Revision History:
class SCREEN_INFORMATION;
[[nodiscard]] HRESULT DoSrvSetConsoleOutputCodePage(const unsigned int codepage);
[[nodiscard]] HRESULT DoSrvSetConsoleInputCodePage(const unsigned int codepage);

View File

@@ -35,8 +35,6 @@ using namespace Microsoft::Console::Interactivity;
// codepage by console.cpl or shell32. The default codepage is OEMCP.
gci.CP = gci.GetCodePage();
gci.OutputCP = gci.GetCodePage();
gci.DefaultCP = gci.GetCodePage();
gci.DefaultOutputCP = gci.GetCodePage();
gci.Flags |= CONSOLE_USE_PRIVATE_FLAGS;

View File

@@ -208,14 +208,8 @@ CursorType ConhostInternalGetSet::GetUserDefaultCursorStyle() const
// - <none>
void ConhostInternalGetSet::ShowWindow(bool showOrHide)
{
// ConPTY is supposed to be "transparent" to the VT application. Any VT it processes is given to the terminal.
// As such, it must not react to this "CSI 1 t" or "CSI 2 t" sequence. That's the job of the terminal.
// If the terminal encounters such a sequence, it can show/hide itself and let ConPTY know via its signal API.
const auto window = ServiceLocator::LocateConsoleWindow();
if (!window)
{
return;
}
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
const auto hwnd = gci.IsInVtIoMode() ? ServiceLocator::LocatePseudoWindow() : ServiceLocator::LocateConsoleWindow()->GetWindowHandle();
// GH#13301 - When we send this ShowWindow message, if we send it to the
// conhost HWND, it's going to need to get processed by the window message
@@ -223,57 +217,31 @@ void ConhostInternalGetSet::ShowWindow(bool showOrHide)
// However, ShowWindowAsync doesn't have this problem. It'll post the
// message to the window thread, then immediately return, so we don't have
// to worry about deadlocking.
const auto hwnd = window->GetWindowHandle();
::ShowWindowAsync(hwnd, showOrHide ? SW_SHOWNOACTIVATE : SW_MINIMIZE);
}
// Routine Description:
// - Set the code page used for translating text when calling A versions of I/O functions.
// - Connects the SetConsoleOutputCP API call directly into our Driver Message servicing call inside Conhost.exe
// Arguments:
// - codepage - the new code page of the console.
// - codepage - the new output codepage of the console.
// Return Value:
// - <none>
void ConhostInternalGetSet::SetCodePage(const unsigned int codepage)
void ConhostInternalGetSet::SetConsoleOutputCP(const unsigned int codepage)
{
LOG_IF_FAILED(DoSrvSetConsoleOutputCodePage(codepage));
LOG_IF_FAILED(DoSrvSetConsoleInputCodePage(codepage));
THROW_IF_FAILED(DoSrvSetConsoleOutputCodePage(codepage));
}
// Routine Description:
// - Reset the code pages to their default values.
// - Gets the codepage used for translating text when calling A versions of functions affecting the output buffer.
// Arguments:
// - <none>
// Return Value:
// - <none>
void ConhostInternalGetSet::ResetCodePage()
{
const auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
LOG_IF_FAILED(DoSrvSetConsoleOutputCodePage(gci.DefaultOutputCP));
LOG_IF_FAILED(DoSrvSetConsoleInputCodePage(gci.DefaultCP));
}
// Routine Description:
// - Gets the code page used for translating text when calling A versions of output functions.
// Arguments:
// - <none>
// Return Value:
// - the output code page of the console.
unsigned int ConhostInternalGetSet::GetOutputCodePage() const
// - the outputCP of the console.
unsigned int ConhostInternalGetSet::GetConsoleOutputCP() const
{
return ServiceLocator::LocateGlobals().getConsoleInformation().OutputCP;
}
// Routine Description:
// - Gets the code page used for translating text when calling A versions of input functions.
// Arguments:
// - <none>
// Return Value:
// - the input code page of the console.
unsigned int ConhostInternalGetSet::GetInputCodePage() const
{
return ServiceLocator::LocateGlobals().getConsoleInformation().CP;
}
// Routine Description:
// - Copies the given content to the clipboard.
// Arguments:

View File

@@ -53,10 +53,8 @@ public:
bool ResizeWindow(const til::CoordType width, const til::CoordType height) override;
void SetCodePage(const unsigned int codepage) override;
void ResetCodePage() override;
unsigned int GetOutputCodePage() const override;
unsigned int GetInputCodePage() const override;
void SetConsoleOutputCP(const unsigned int codepage) override;
unsigned int GetConsoleOutputCP() const override;
void CopyToClipboard(const wil::zwstring_view content) override;
void SetTaskbarProgress(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::TaskbarState state, const size_t progress) override;

View File

@@ -90,9 +90,6 @@ public:
// the following fields are used for ansi-unicode translation
UINT CP = 0;
UINT OutputCP = 0;
// the VT RIS sequence uses these default values to reset the code pages
UINT DefaultCP = 0;
UINT DefaultOutputCP = 0;
ULONG CtrlFlags = 0; // indicates outstanding ctrl requests
ULONG LimitingProcessId = 0;

View File

@@ -132,7 +132,6 @@ TARGETLIBS = \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\dxgi.lib \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\d3d11.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\api-ms-win-mm-playsound-l1.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-imm-l1-1-0.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
@@ -196,7 +195,6 @@ DELAYLOAD = \
api-ms-win-core-com-l1.dll; \
api-ms-win-core-registry-l2.dll; \
api-ms-win-mm-playsound-l1.dll; \
ext-ms-win-imm-l1-1-0.lib; \
api-ms-win-shcore-obsolete-l1.dll; \
api-ms-win-shcore-scaling-l1.dll; \
api-ms-win-shell-dataobject-l1.dll; \

View File

@@ -87,7 +87,7 @@
<AdditionalIncludeDirectories>..;$(SolutionDir)src\inc;$(SolutionDir)src\inc\test;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>winmm.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->

127
src/inc/til/point_span.h Normal file
View File

@@ -0,0 +1,127 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
namespace til // Terminal Implementation Library. Also: "Today I Learned"
{
// point_span can be pictured as a "selection" range inside our text buffer. So given
// a text buffer of 10x4, a start of 4,1 and end of 7,3 the span might look like this:
// +----------+
// | |
// | xxxxxx|
// |xxxxxxxxxx|
// |xxxxxxxx |
// +----------+
// At the time of writing there's a push to make selections have an exclusive end coordinate,
// so the interpretation of end might change soon (making this comment potentially outdated).
struct point_span
{
til::point start;
til::point end;
constexpr bool operator==(const point_span& rhs) const noexcept
{
// `__builtin_memcmp` isn't an official standard, but it's the
// only way at the time of writing to get a constexpr `memcmp`.
return __builtin_memcmp(this, &rhs, sizeof(rhs)) == 0;
}
constexpr bool operator!=(const point_span& rhs) const noexcept
{
return __builtin_memcmp(this, &rhs, sizeof(rhs)) != 0;
}
// Calls func(row, begX, endX) for each row and begX and begY are inclusive coordinates,
// because point_span itself also uses inclusive coordinates.
// In other words, it turns a
// ```
// +----------------+
// | #########|
// |################|
// |#### |
// +----------------+
// ```
// into:
// ```
// func(0, 8, 15)
// func(1, 0, 15)
// func(2, 0, 4)
// ```
constexpr void iterate_rows(til::CoordType width, auto&& func) const
{
// Copy the members so that the compiler knows it doesn't
// need to re-read them on every loop iteration.
const auto w = width - 1;
const auto ax = std::clamp(start.x, 0, w);
const auto ay = start.y;
const auto bx = std::clamp(end.x, 0, w);
const auto by = end.y;
for (auto y = ay; y <= by; ++y)
{
const auto x1 = y != ay ? 0 : ax;
const auto x2 = y != by ? w : bx;
func(y, x1, x2);
}
}
til::small_vector<til::inclusive_rect, 3> split_rects(til::CoordType width) const
{
// Copy the members so that the compiler knows it doesn't
// need to re-read them on every loop iteration.
const auto w = width - 1;
const auto ax = std::clamp(start.x, 0, w);
const auto ay = start.y;
const auto bx = std::clamp(end.x, 0, w);
const auto by = end.y;
auto y = ay;
til::small_vector<til::inclusive_rect, 3> rects;
// +----------------+
// | #########| <-- A
// |################| <-- B
// |#### | <-- C
// +----------------+
//
// +----------------+
// |################| <-- B
// |################| <-- B
// |#### | <-- C
// +----------------+
//
// +----------------+
// | #########| <-- A
// |################| <-- C
// |################| <-- C
// +----------------+
//
// +----------------+
// |################| <-- C
// |################| <-- C
// |################| <-- C
// +----------------+
if (y <= by && ax > 0) // A
{
const auto x2 = y == by ? bx : w;
rects.emplace_back(ax, y, x2, y);
y += 1;
}
if (y < by && bx < w) // B
{
rects.emplace_back(0, y, w, by - 1);
y = by - 1;
}
if (y <= by) // C
{
rects.emplace_back(0, y, bx, by);
}
return rects;
}
};
}

View File

@@ -133,113 +133,6 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ends_with<>(str, prefix);
}
inline constexpr unsigned long to_ulong_error = ULONG_MAX;
inline constexpr int to_int_error = INT_MAX;
// Just like std::wcstoul, but without annoying locales and null-terminating strings.
// It has been fuzz-tested against clang's strtoul implementation.
template<typename T, typename Traits>
_TIL_INLINEPREFIX constexpr unsigned long to_ulong(const std::basic_string_view<T, Traits>& str, unsigned long base = 0) noexcept
{
static constexpr unsigned long maximumValue = ULONG_MAX / 16;
// We don't have to test ptr for nullability, as we only access it under either condition:
// * str.length() > 0, for determining the base
// * ptr != end, when parsing the characters; if ptr is null, length will be 0 and thus end == ptr
#pragma warning(push)
#pragma warning(disable : 26429) // Symbol 'ptr' is never tested for nullness, it can be marked as not_null
#pragma warning(disable : 26481) // Don't use pointer arithmetic. Use span instead
auto ptr = str.data();
const auto end = ptr + str.length();
unsigned long accumulator = 0;
unsigned long value = ULONG_MAX;
if (!base)
{
base = 10;
if (str.length() > 1 && *ptr == '0')
{
base = 8;
++ptr;
if (str.length() > 2 && (*ptr == 'x' || *ptr == 'X'))
{
base = 16;
++ptr;
}
}
}
if (ptr == end)
{
return to_ulong_error;
}
for (;; accumulator *= base)
{
value = ULONG_MAX;
if (*ptr >= '0' && *ptr <= '9')
{
value = *ptr - '0';
}
else if (*ptr >= 'A' && *ptr <= 'F')
{
value = *ptr - 'A' + 10;
}
else if (*ptr >= 'a' && *ptr <= 'f')
{
value = *ptr - 'a' + 10;
}
else
{
return to_ulong_error;
}
accumulator += value;
if (accumulator >= maximumValue)
{
return to_ulong_error;
}
if (++ptr == end)
{
return accumulator;
}
}
#pragma warning(pop)
}
constexpr unsigned long to_ulong(const std::string_view& str, unsigned long base = 0) noexcept
{
return to_ulong<>(str, base);
}
constexpr unsigned long to_ulong(const std::wstring_view& str, unsigned long base = 0) noexcept
{
return to_ulong<>(str, base);
}
// Implement to_int in terms of to_ulong by negating its result. to_ulong does not expect
// to be passed signed numbers and will return an error accordingly. That error when
// compared against -1 evaluates to true. We account for that by returning to_int_error if to_ulong
// returns an error.
constexpr int to_int(const std::wstring_view& str, unsigned long base = 0) noexcept
{
auto result = to_ulong_error;
const auto signPosition = str.find(L"-");
const bool hasSign = signPosition != std::wstring_view::npos;
result = hasSign ? to_ulong(str.substr(signPosition + 1), base) : to_ulong(str, base);
// Check that result is valid and will fit in an int.
if (result == to_ulong_error || (result > INT_MAX))
{
return to_int_error;
}
return hasSign ? result * -1 : result;
}
// Just like std::tolower, but without annoying locales.
template<typename T>
constexpr T tolower_ascii(T c)
@@ -348,55 +241,6 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ends_with<>(str, prefix);
}
// Give the arguments ("foo bar baz", " "), this method will
// * modify the first argument to "bar baz"
// * return "foo"
// If the needle cannot be found the "str" argument is returned as is.
template<typename T, typename Traits>
constexpr std::basic_string_view<T, Traits> prefix_split(std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& needle) noexcept
{
using view_type = std::basic_string_view<T, Traits>;
const auto needleLen = needle.size();
const auto idx = needleLen == 0 ? str.size() : str.find(needle);
const auto prefixIdx = std::min(str.size(), idx);
const auto suffixIdx = std::min(str.size(), prefixIdx + needle.size());
const view_type result{ str.data(), prefixIdx };
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead
str = { str.data() + suffixIdx, str.size() - suffixIdx };
return result;
}
constexpr std::string_view prefix_split(std::string_view& str, const std::string_view& needle) noexcept
{
return prefix_split<>(str, needle);
}
constexpr std::wstring_view prefix_split(std::wstring_view& str, const std::wstring_view& needle) noexcept
{
return prefix_split<>(str, needle);
}
// Give the arguments ("foo bar baz", " "), this method will
// * modify the first argument to "bar baz"
// * return "foo"
// If the needle cannot be found the "str" argument is returned as is.
template<typename T, typename Traits>
constexpr std::basic_string_view<T, Traits> prefix_split(std::basic_string_view<T, Traits>& str, T ch) noexcept
{
using view_type = std::basic_string_view<T, Traits>;
const auto idx = str.find(ch);
const auto prefixIdx = std::min(str.size(), idx);
const auto suffixIdx = std::min(str.size(), prefixIdx + 1);
const view_type result{ str.data(), prefixIdx };
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead
str = { str.data() + suffixIdx, str.size() - suffixIdx };
return result;
}
template<typename T, typename Traits>
constexpr std::basic_string_view<T, Traits> trim(const std::basic_string_view<T, Traits>& str, const T ch) noexcept
{
@@ -414,6 +258,228 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return { beg, end };
}
template<typename T, typename Traits>
struct split_iterator
{
struct sentinel
{
};
struct iterator
{
using iterator_category = std::forward_iterator_tag;
using value_type = std::basic_string_view<T, Traits>;
using reference = value_type&;
using pointer = value_type*;
using difference_type = std::ptrdiff_t;
explicit constexpr iterator(split_iterator& p) noexcept :
_iter{ p }
{
}
value_type operator*() const noexcept
{
#ifndef NDEBUG
// Don't call operator*() twice per iteration.
// Since C++ has inflexible iterators we can't implement a split iterator efficiently:
// We essentially need a do-while loop but iterators only offer for() loop semantics.
// This forces us to either seek to the first token in the constructor and then again on
// every operator++(), or we do this trick here where we seek on every operator*() call.
// This only works well of course, if you don't call operator*() multiple times.
assert(_iter._advanced);
_iter._advanced = false;
#endif
_iter._tok = std::find(_iter._it, _iter._end, _iter._needle);
return { _iter._it, _iter._tok };
}
iterator& operator++() noexcept
{
#ifndef NDEBUG
_iter._advanced = true;
#endif
_iter._it = std::min(_iter._end - 1, _iter._tok) + 1;
return *this;
}
bool operator!=(const sentinel&) const noexcept
{
return _iter._tok != _iter._end;
}
private:
split_iterator& _iter;
};
explicit constexpr split_iterator(const std::basic_string_view<T, Traits>& str, T needle) noexcept :
_it{ str.begin() },
_tok{ str.begin() },
_end{ str.end() },
_needle{ needle }
{
}
iterator begin() noexcept
{
return iterator{ *this };
}
sentinel end() noexcept
{
return sentinel{};
}
private:
typename iterator::value_type::iterator _it;
typename iterator::value_type::iterator _tok;
typename iterator::value_type::iterator _end;
typename iterator::value_type _value;
T _needle;
#ifndef NDEBUG
bool _advanced = true;
#endif
};
namespace details
{
// Just like std::wcstoul, but without annoying locales and null-terminating strings.
template<typename T, typename Traits>
_TIL_INLINEPREFIX constexpr std::optional<uint64_t> parse_u64(const std::basic_string_view<T, Traits>& str, int base = 0) noexcept
{
// We don't have to test ptr for nullability, as we only access it under either condition:
// * str.length() > 0, for determining the base
// * ptr != end, when parsing the characters; if ptr is null, length will be 0 and thus end == ptr
#pragma warning(push)
#pragma warning(disable : 26429) // Symbol 'ptr' is never tested for nullness, it can be marked as not_null
#pragma warning(disable : 26481) // Don't use pointer arithmetic. Use span instead
auto ptr = str.data();
const auto end = ptr + str.length();
uint64_t accumulator = 0;
uint64_t base64 = base;
if (base <= 0)
{
base64 = 10;
if (ptr != end && *ptr == '0')
{
base64 = 8;
ptr += 1;
if (ptr != end && (*ptr == 'x' || *ptr == 'X'))
{
base64 = 16;
ptr += 1;
}
}
}
if (ptr == end)
{
return {};
}
for (;;)
{
uint64_t value = 0;
if (*ptr >= '0' && *ptr <= '9')
{
value = *ptr - '0';
}
else if (*ptr >= 'A' && *ptr <= 'F')
{
value = *ptr - 'A' + 10;
}
else if (*ptr >= 'a' && *ptr <= 'f')
{
value = *ptr - 'a' + 10;
}
else
{
return {};
}
const auto acc = accumulator * base64 + value;
if (acc < accumulator)
{
return {};
}
accumulator = acc;
ptr += 1;
if (ptr == end)
{
return accumulator;
}
}
#pragma warning(pop)
}
template<std::unsigned_integral R, typename T, typename Traits>
constexpr std::optional<R> parse_unsigned(const std::basic_string_view<T, Traits>& str, int base = 0) noexcept
{
if constexpr (std::is_same_v<R, uint64_t>)
{
return details::parse_u64<>(str, base);
}
else
{
const auto opt = details::parse_u64<>(str, base);
if (!opt || *opt > uint64_t{ std::numeric_limits<R>::max() })
{
return {};
}
return gsl::narrow_cast<R>(*opt);
}
}
template<std::signed_integral R, typename T, typename Traits>
constexpr std::optional<R> parse_signed(std::basic_string_view<T, Traits> str, int base = 0) noexcept
{
const bool hasSign = str.starts_with(L'-');
if (hasSign)
{
str = str.substr(1);
}
const auto opt = details::parse_u64<>(str, base);
const auto max = uint64_t{ std::numeric_limits<R>::max() } + hasSign;
if (!opt || *opt > max)
{
return {};
}
const auto r = gsl::narrow_cast<R>(*opt);
return hasSign ? -r : r;
}
}
template<typename R>
constexpr std::optional<R> parse_unsigned(const std::string_view& str, int base = 0) noexcept
{
return details::parse_unsigned<R>(str, base);
}
template<typename R>
constexpr std::optional<R> parse_unsigned(const std::wstring_view& str, int base = 0) noexcept
{
return details::parse_unsigned<R>(str, base);
}
template<typename R>
constexpr std::optional<R> parse_signed(const std::string_view& str, int base = 0) noexcept
{
return details::parse_signed<R>(str, base);
}
template<typename R>
constexpr std::optional<R> parse_signed(const std::wstring_view& str, int base = 0) noexcept
{
return details::parse_signed<R>(str, base);
}
// Splits a font-family list into individual font-families. It loosely follows the CSS spec for font-family.
// It splits by comma, handles quotes and simple escape characters, and it cleans whitespace.
//

View File

@@ -294,7 +294,7 @@ using namespace Microsoft::Console::Interactivity;
// - owner: the HWND that should be the initial owner of the pseudo window.
// Return Value:
// - STATUS_SUCCESS on success, otherwise an appropriate error.
[[nodiscard]] NTSTATUS InteractivityFactory::CreatePseudoWindow(HWND& hwnd)
[[nodiscard]] NTSTATUS InteractivityFactory::CreatePseudoWindow(HWND& hwnd, const HWND owner)
{
hwnd = nullptr;
ApiLevel level;
@@ -310,11 +310,6 @@ using namespace Microsoft::Console::Interactivity;
{
case ApiLevel::Win32:
{
// We don't need an "Default IME" window for ConPTY. That's the terminal's job.
// -1, aka DWORD_MAX, tells the function to disable it for the entire process.
// Must be called before creating any window.
ImmDisableIME(DWORD_MAX);
pseudoClass.cbSize = sizeof(WNDCLASSEXW);
pseudoClass.lpszClassName = PSEUDO_WINDOW_CLASS;
pseudoClass.lpfnWndProc = s_PseudoWindowProc;
@@ -335,15 +330,19 @@ using namespace Microsoft::Console::Interactivity;
// will return the console handle again, not the owning
// terminal's handle. It's not entirely clear why, but WS_POPUP
// is absolutely vital for this to work correctly.
hwnd = CreateWindowExW(WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE,
const auto windowStyle = WS_OVERLAPPEDWINDOW | WS_POPUP;
const auto exStyles = WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_LAYERED | WS_EX_NOACTIVATE;
// Attempt to create window.
hwnd = CreateWindowExW(exStyles,
reinterpret_cast<LPCWSTR>(windowClassAtom),
nullptr,
WS_POPUP,
windowStyle,
0,
0,
0,
0,
_owner.load(std::memory_order_relaxed),
owner,
nullptr,
nullptr,
this);
@@ -376,38 +375,6 @@ using namespace Microsoft::Console::Interactivity;
return status;
}
void InteractivityFactory::SetOwner(HWND owner) noexcept
{
_owner.store(owner, std::memory_order_relaxed);
if (_pseudoConsoleWindowHwnd)
{
// DO NOT USE SetParent HERE!
//
// Calling SetParent on a window that is WS_VISIBLE will cause the OS to
// hide the window, make it a _child_ window, then call SW_SHOW on the
// window to re-show it. SW_SHOW, however, will cause the OS to also set
// that window as the _foreground_ window, which would result in the
// pty's hwnd stealing the foreground away from the owning terminal
// window. That's bad.
//
// SetWindowLongPtr seems to do the job of changing who the window owner
// is, without all the other side effects of reparenting the window.
// See #13066
::SetWindowLongPtrW(_pseudoConsoleWindowHwnd, GWLP_HWNDPARENT, reinterpret_cast<LONG_PTR>(owner));
}
}
void InteractivityFactory::SetVisibility(const bool isVisible) noexcept
{
if (_pseudoConsoleWindowHwnd && IsIconic(_pseudoConsoleWindowHwnd) != static_cast<BOOL>(isVisible))
{
_suppressVisibilityChange.store(true, std::memory_order_relaxed);
ShowWindow(_pseudoConsoleWindowHwnd, isVisible ? SW_SHOWNOACTIVATE : SW_MINIMIZE);
_suppressVisibilityChange.store(false, std::memory_order_relaxed);
}
}
// Method Description:
// - Static window procedure for pseudo console windows
// - Processes set-up on create to stow the "this" pointer to specific instantiations and routes
@@ -479,7 +446,7 @@ void InteractivityFactory::SetVisibility(const bool isVisible) noexcept
{
_WritePseudoWindowCallback(false);
}
return 0;
break;
}
// case WM_WINDOWPOSCHANGING:
// As long as user32 didn't eat the `ShowWindow` call because the window state requested
@@ -512,12 +479,12 @@ void InteractivityFactory::SetVisibility(const bool isVisible) noexcept
}
case WM_ACTIVATE:
{
if (const auto ownerHwnd = _owner.load(std::memory_order_relaxed))
if (const auto ownerHwnd{ ::GetAncestor(hWnd, GA_ROOTOWNER) })
{
SetFocus(ownerHwnd);
return 0;
}
return 0;
break;
}
}
// If we get this far, call the default window proc
@@ -534,11 +501,6 @@ void InteractivityFactory::SetVisibility(const bool isVisible) noexcept
// - <none>
void InteractivityFactory::_WritePseudoWindowCallback(bool showOrHide)
{
if (_suppressVisibilityChange.load(std::memory_order_relaxed))
{
return;
}
// IMPORTANT!
//
// A hosting terminal window should only "restore" itself in response to

View File

@@ -27,10 +27,7 @@ namespace Microsoft::Console::Interactivity
[[nodiscard]] NTSTATUS CreateAccessibilityNotifier(_Inout_ std::unique_ptr<IAccessibilityNotifier>& notifier);
[[nodiscard]] NTSTATUS CreateSystemConfigurationProvider(_Inout_ std::unique_ptr<ISystemConfigurationProvider>& provider);
[[nodiscard]] NTSTATUS CreatePseudoWindow(HWND& hwnd);
void SetOwner(HWND owner) noexcept;
void SetVisibility(const bool isVisible) noexcept;
[[nodiscard]] NTSTATUS CreatePseudoWindow(HWND& hwnd, const HWND owner);
// Wndproc
[[nodiscard]] static LRESULT CALLBACK s_PseudoWindowProc(_In_ HWND hwnd,
@@ -46,8 +43,6 @@ namespace Microsoft::Console::Interactivity
void _WritePseudoWindowCallback(bool showOrHide);
HWND _pseudoConsoleWindowHwnd{ nullptr };
std::atomic<HWND> _owner{ HWND_DESKTOP };
std::atomic<bool> _suppressVisibilityChange{ false };
WRL::ComPtr<PseudoConsoleWindowAccessibilityProvider> _pPseudoConsoleUiaProvider{ nullptr };
};
}

Some files were not shown because too many files have changed in this diff Show More