mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-18 18:56:25 +00:00
Compare commits
33 Commits
niels9001/
...
v1.22.2912
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ace5785cd | ||
|
|
8fa98f62bc | ||
|
|
b947d1a8be | ||
|
|
a0987c22c8 | ||
|
|
24475acba8 | ||
|
|
2a8dee286e | ||
|
|
181448908e | ||
|
|
e5f0af22d7 | ||
|
|
c49d79a1ec | ||
|
|
ff7f1a7c83 | ||
|
|
9b8c0602a2 | ||
|
|
ea60f14627 | ||
|
|
145babeae0 | ||
|
|
a2d7742567 | ||
|
|
44315b4909 | ||
|
|
5e8efdf008 | ||
|
|
d95a77b369 | ||
|
|
cc132d5e50 | ||
|
|
22731e8673 | ||
|
|
c129e794f8 | ||
|
|
bd33c7f20b | ||
|
|
893f32c642 | ||
|
|
58a50caf6a | ||
|
|
33b0e9dd10 | ||
|
|
385a9a6111 | ||
|
|
03fc325ad1 | ||
|
|
be99f93094 | ||
|
|
696fd1196b | ||
|
|
649d8b2979 | ||
|
|
3d01439c9f | ||
|
|
85afa41c32 | ||
|
|
b3f0afbc8f | ||
|
|
90cfb33c13 |
1
.github/actions/spelling/allow/apis.txt
vendored
1
.github/actions/spelling/allow/apis.txt
vendored
@@ -96,6 +96,7 @@ IGraphics
|
||||
IImage
|
||||
IInheritable
|
||||
IMap
|
||||
imm
|
||||
IMonarch
|
||||
IObject
|
||||
iosfwd
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
EOB
|
||||
swrapped
|
||||
wordi
|
||||
wordiswrapped
|
||||
wrappe
|
||||
16
.github/actions/spelling/expect/expect.txt
vendored
16
.github/actions/spelling/expect/expect.txt
vendored
@@ -16,6 +16,8 @@ ADDALIAS
|
||||
ADDREF
|
||||
ADDSTRING
|
||||
ADDTOOL
|
||||
adml
|
||||
admx
|
||||
AFill
|
||||
AFX
|
||||
AHelper
|
||||
@@ -564,6 +566,7 @@ entrypoints
|
||||
ENU
|
||||
ENUMLOGFONT
|
||||
ENUMLOGFONTEX
|
||||
EOB
|
||||
EOK
|
||||
EPres
|
||||
EQU
|
||||
@@ -782,6 +785,7 @@ HIWORD
|
||||
HKCU
|
||||
hkey
|
||||
hkl
|
||||
HKLM
|
||||
hlocal
|
||||
hlsl
|
||||
HMB
|
||||
@@ -864,6 +868,7 @@ INLINEPREFIX
|
||||
inproc
|
||||
Inputkeyinfo
|
||||
Inputreadhandledata
|
||||
INPUTSCOPE
|
||||
INSERTMODE
|
||||
INTERACTIVITYBASE
|
||||
INTERCEPTCOPYPASTE
|
||||
@@ -1289,6 +1294,7 @@ parms
|
||||
PATCOPY
|
||||
pathcch
|
||||
PATTERNID
|
||||
pbstr
|
||||
pcb
|
||||
pcch
|
||||
PCCHAR
|
||||
@@ -1374,9 +1380,11 @@ POSTCHARBREAKS
|
||||
POSX
|
||||
POSXSCROLL
|
||||
POSYSCROLL
|
||||
ppbstr
|
||||
PPEB
|
||||
ppf
|
||||
ppidl
|
||||
pprg
|
||||
PPROC
|
||||
ppropvar
|
||||
ppsi
|
||||
@@ -1692,6 +1700,7 @@ srcsrv
|
||||
SRCSRVTRG
|
||||
srctool
|
||||
srect
|
||||
SRGS
|
||||
srvinit
|
||||
srvpipe
|
||||
ssa
|
||||
@@ -1729,6 +1738,7 @@ swapchain
|
||||
swapchainpanel
|
||||
SWMR
|
||||
SWP
|
||||
swrapped
|
||||
SYMED
|
||||
SYNCPAINT
|
||||
syscalls
|
||||
@@ -1838,7 +1848,6 @@ triaging
|
||||
TRIMZEROHEADINGS
|
||||
trx
|
||||
tsa
|
||||
tsattrs
|
||||
tsgr
|
||||
tsm
|
||||
TStr
|
||||
@@ -1966,10 +1975,8 @@ vswhere
|
||||
vtapp
|
||||
VTE
|
||||
VTID
|
||||
vtio
|
||||
vtmode
|
||||
vtpipeterm
|
||||
vtpt
|
||||
VTRGB
|
||||
VTRGBTo
|
||||
vtseq
|
||||
@@ -2074,6 +2081,8 @@ WNDCLASSW
|
||||
Wndproc
|
||||
WNegative
|
||||
WNull
|
||||
wordi
|
||||
wordiswrapped
|
||||
workarea
|
||||
WOutside
|
||||
WOWARM
|
||||
@@ -2087,6 +2096,7 @@ WPrep
|
||||
WPresent
|
||||
wprp
|
||||
wprpi
|
||||
wrappe
|
||||
wregex
|
||||
writeback
|
||||
WRITECONSOLE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"instanceUrl": "https://microsoft.visualstudio.com",
|
||||
"projectName": "OS",
|
||||
"areaPath": "OS\\Windows Client and Services\\ADEPT\\E4D-Engineered for Developers\\SHINE\\Terminal",
|
||||
"areaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\Terminal",
|
||||
"notificationAliases": ["condev@microsoft.com", "duhowett@microsoft.com"]
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Optional, defaults to main. Name of the branch which will be used for calculating branch point. -->
|
||||
<PGOBranch>main</PGOBranch>
|
||||
<PGOBranch>release-1.22</PGOBranch>
|
||||
|
||||
<!-- Mandatory. Name of the NuGet package which will contain PGO databases for consumption by build system. -->
|
||||
<PGOPackageName>Microsoft.Internal.Windows.Terminal.PGODatabase</PGOPackageName>
|
||||
|
||||
@@ -59,10 +59,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
|
||||
@@ -69,10 +69,9 @@ jobs:
|
||||
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
|
||||
@@ -57,10 +57,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
|
||||
@@ -44,10 +44,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download all PDBs from all prior build phases
|
||||
|
||||
@@ -43,10 +43,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download all PDBs from all prior build phases
|
||||
|
||||
@@ -38,10 +38,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download MSIX Bundle Artifact
|
||||
|
||||
@@ -92,10 +92,7 @@ stages:
|
||||
generateSbom: ${{ parameters.generateSbom }}
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
beforeBuildSteps: # Right before we build, lay down the universal package and localizations
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download terminal-internal Universal Package
|
||||
@@ -119,10 +116,7 @@ stages:
|
||||
generateSbom: ${{ parameters.generateSbom }}
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
beforeBuildSteps:
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
|
||||
|
||||
- stage: Package
|
||||
|
||||
@@ -130,10 +130,7 @@ extends:
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
beforeBuildSteps: # Right before we build, lay down the universal package and localizations
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download terminal-internal Universal Package
|
||||
@@ -167,10 +164,7 @@ extends:
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
beforeBuildSteps:
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
|
||||
|
||||
- stage: Package
|
||||
|
||||
6
build/pipelines/templates-v2/steps-setup-versioning.yml
Normal file
6
build/pipelines/templates-v2/steps-setup-versioning.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
steps:
|
||||
- pwsh: |-
|
||||
nuget install Microsoft.Windows.Terminal.Versioning -OutputDirectory _versioning
|
||||
$VersionRoot = (Get-Item _versioning\Microsoft.Windows.*).FullName
|
||||
& "$VersionRoot\build\Setup.ps1" -ProjectDirectory "$(Build.SourcesDirectory)" -Verbose
|
||||
displayName: Set up versioning via M.W.T.V
|
||||
28
policies/WindowsTerminal.admx
Normal file
28
policies/WindowsTerminal.admx
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c) 2024 Microsoft Corporation -->
|
||||
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<policyNamespaces>
|
||||
<target prefix="terminal" namespace="Microsoft.Policies.WindowsTerminal" />
|
||||
<using prefix="windows" namespace="Microsoft.Policies.Windows" />
|
||||
</policyNamespaces>
|
||||
<resources minRequiredRevision="1.0" />
|
||||
<supportedOn>
|
||||
<definitions>
|
||||
<definition name="SUPPORTED_WindowsTerminal_1_21" displayName="$(string.SUPPORTED_WindowsTerminal_1_21)" />
|
||||
</definitions>
|
||||
</supportedOn>
|
||||
<categories>
|
||||
<category name="WindowsTerminal" displayName="$(string.WindowsTerminal)">
|
||||
<parentCategory ref="windows:WindowsComponents" />
|
||||
</category>
|
||||
</categories>
|
||||
<policies>
|
||||
<policy name="DisabledProfileSources" class="Both" displayName="$(string.DisabledProfileSources)" explainText="$(string.DisabledProfileSourcesText)" presentation="$(presentation.DisabledProfileSources)" key="Software\Policies\Microsoft\Windows Terminal">
|
||||
<parentCategory ref="WindowsTerminal" />
|
||||
<supportedOn ref="SUPPORTED_WindowsTerminal_1_21" />
|
||||
<elements>
|
||||
<multiText id="DisabledProfileSources" valueName="DisabledProfileSources" required="true" />
|
||||
</elements>
|
||||
</policy>
|
||||
</policies>
|
||||
</policyDefinitions>
|
||||
28
policies/en-US/WindowsTerminal.adml
Normal file
28
policies/en-US/WindowsTerminal.adml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c) 2024 Microsoft Corporation -->
|
||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<displayName>Windows Terminal</displayName>
|
||||
<description>Windows Terminal</description>
|
||||
<resources>
|
||||
<stringTable>
|
||||
<string id="WindowsTerminal">Windows Terminal</string>
|
||||
<string id="SUPPORTED_WindowsTerminal_1_21">At least Windows Terminal 1.21</string>
|
||||
<string id="DisabledProfileSources">Disabled Profile Sources</string>
|
||||
<string id="DisabledProfileSourcesText">Profiles will not be generated from any sources listed here. Source names can be arbitrary strings. Potential candidates can be found as the "source" property on profile definitions in Windows Terminal's settings.json file.
|
||||
|
||||
Common sources are:
|
||||
- Windows.Terminal.Azure
|
||||
- Windows.Terminal.PowershellCore
|
||||
- Windows.Terminal.Wsl
|
||||
|
||||
For instance, setting this policy to Windows.Terminal.Wsl will disable the builtin WSL integration of Windows Terminal.
|
||||
|
||||
Note: Existing profiles will disappear from Windows Terminal after adding their source to this policy.</string>
|
||||
</stringTable>
|
||||
<presentationTable>
|
||||
<presentation id="DisabledProfileSources">
|
||||
<multiTextBox refId="DisabledProfileSources">List of disabled sources (one per line)</multiTextBox>
|
||||
</presentation>
|
||||
</presentationTable>
|
||||
</resources>
|
||||
</policyDefinitionResources>
|
||||
@@ -16,7 +16,7 @@ bool Search::IsStale(const Microsoft::Console::Render::IRenderData& renderData,
|
||||
_lastMutationId != renderData.GetTextBuffer().GetLastMutationId();
|
||||
}
|
||||
|
||||
bool Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse)
|
||||
void Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse)
|
||||
{
|
||||
const auto& textBuffer = renderData.GetTextBuffer();
|
||||
|
||||
@@ -30,15 +30,15 @@ bool Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const st
|
||||
_results = std::move(result).value_or(std::vector<til::point_span>{});
|
||||
_index = reverse ? gsl::narrow_cast<ptrdiff_t>(_results.size()) - 1 : 0;
|
||||
_step = reverse ? -1 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Search::MoveToCurrentSelection()
|
||||
{
|
||||
if (_renderData->IsSelectionActive())
|
||||
{
|
||||
MoveToPoint(_renderData->GetTextBuffer().ScreenToBufferPosition(_renderData->GetSelectionAnchor()));
|
||||
}
|
||||
else if (const auto span = _renderData->GetSearchHighlightFocused())
|
||||
{
|
||||
MoveToPoint(_step > 0 ? span->start : span->end);
|
||||
}
|
||||
}
|
||||
|
||||
void Search::MoveToPoint(const til::point anchor) noexcept
|
||||
|
||||
@@ -36,9 +36,8 @@ public:
|
||||
Search() = default;
|
||||
|
||||
bool IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags) const noexcept;
|
||||
bool Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse);
|
||||
void Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse);
|
||||
|
||||
void MoveToCurrentSelection();
|
||||
void MoveToPoint(til::point anchor) noexcept;
|
||||
void MovePastPoint(til::point anchor) noexcept;
|
||||
void FindNext(bool reverse) noexcept;
|
||||
|
||||
@@ -451,14 +451,9 @@ size_t TextBuffer::FitTextIntoColumns(const std::wstring_view& chars, til::Coord
|
||||
cwd.GraphemeNext(state, chars);
|
||||
col += state.width;
|
||||
|
||||
// If we ran out of columns, we need to always return `columnLimit` and not `cols`,
|
||||
// because if we tried inserting a wide glyph into just 1 remaining column it will
|
||||
// fail to fit, but that remaining column still has been used up. When the caller sees
|
||||
// `columns == columnLimit` they will line-wrap and continue inserting into the next row.
|
||||
if (col > columnLimit)
|
||||
{
|
||||
columns = columnLimit;
|
||||
return dist;
|
||||
break;
|
||||
}
|
||||
|
||||
dist += state.len;
|
||||
@@ -466,7 +461,7 @@ size_t TextBuffer::FitTextIntoColumns(const std::wstring_view& chars, til::Coord
|
||||
|
||||
// But if we simply ran out of text we just need to return the actual number of columns.
|
||||
columns = col;
|
||||
return chars.size();
|
||||
return dist;
|
||||
}
|
||||
|
||||
// Pretend as if `position` is a regular cursor in the TextBuffer.
|
||||
|
||||
@@ -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 náhled &aplikace Terminal</value>
|
||||
<value>Otevřít &náhled Terminálu</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">
|
||||
|
||||
@@ -205,6 +205,13 @@
|
||||
Visibility="{x:Bind Item.(local:TabPaletteItem.TabStatus).IsInputBroadcastActive, Mode=OneWay}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Ellipse Grid.Column="4"
|
||||
Width="8"
|
||||
Height="8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{x:Bind mtu:Converters.ColorToBrush(Item.(local:TabPaletteItem.TabStatus).TabColorIndicator), Mode=OneWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
|
||||
@@ -2956,13 +2956,13 @@ bool Pane::ContainsReadOnly() const
|
||||
// - <none>
|
||||
void Pane::CollectTaskbarStates(std::vector<winrt::TerminalApp::TaskbarState>& states)
|
||||
{
|
||||
if (_IsLeaf())
|
||||
if (_content)
|
||||
{
|
||||
auto tbState{ winrt::make<winrt::TerminalApp::implementation::TaskbarState>(_content.TaskbarState(),
|
||||
_content.TaskbarProgress()) };
|
||||
states.push_back(tbState);
|
||||
}
|
||||
else
|
||||
else if (_firstChild && _secondChild)
|
||||
{
|
||||
_firstChild->CollectTaskbarStates(states);
|
||||
_secondChild->CollectTaskbarStates(states);
|
||||
|
||||
@@ -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 náhled &aplikace Terminal</value>
|
||||
<value>Otevřít &náhled Terminálu</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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -976,6 +976,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// active control in this tab. We'll just recalculate the
|
||||
// current color anyways.
|
||||
tab->_RecalculateAndApplyTabColor();
|
||||
tab->_tabStatus.TabColorIndicator(tab->GetTabColor().value_or(Windows::UI::Colors::Transparent()));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1617,6 +1618,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
_runtimeTabColor.emplace(color);
|
||||
_RecalculateAndApplyTabColor();
|
||||
_tabStatus.TabColorIndicator(color);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1633,6 +1635,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
_runtimeTabColor.reset();
|
||||
_RecalculateAndApplyTabColor();
|
||||
_tabStatus.TabColorIndicator(GetTabColor().value_or(Windows::UI::Colors::Transparent()));
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush TerminalTab::_BackgroundBrush()
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace winrt::TerminalApp::implementation
|
||||
WINRT_OBSERVABLE_PROPERTY(bool, IsReadOnlyActive, PropertyChanged.raise);
|
||||
WINRT_OBSERVABLE_PROPERTY(uint32_t, ProgressValue, PropertyChanged.raise);
|
||||
WINRT_OBSERVABLE_PROPERTY(bool, IsInputBroadcastActive, PropertyChanged.raise);
|
||||
WINRT_OBSERVABLE_PROPERTY(winrt::Windows::UI::Color, TabColorIndicator, PropertyChanged.raise);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -15,5 +15,6 @@ namespace TerminalApp
|
||||
UInt32 ProgressValue { get; set; };
|
||||
Boolean IsReadOnlyActive { get; set; };
|
||||
Boolean IsInputBroadcastActive { get; set; };
|
||||
Windows.UI.Color TabColorIndicator { get; set; };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <winrt/Windows.UI.Xaml.Automation.Peers.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Windows.UI.Xaml.Shapes.h>
|
||||
#include <winrt/Windows.UI.Xaml.Data.h>
|
||||
#include <winrt/Windows.UI.Xaml.Documents.h>
|
||||
#include <winrt/Windows.UI.Xaml.Input.h>
|
||||
|
||||
@@ -198,6 +198,17 @@ 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,
|
||||
@@ -1688,38 +1699,41 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
SearchResults ControlCore::Search(SearchRequest request)
|
||||
{
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
|
||||
SearchFlag flags{};
|
||||
WI_SetFlagIf(flags, SearchFlag::CaseInsensitive, !request.CaseSensitive);
|
||||
WI_SetFlagIf(flags, SearchFlag::RegularExpression, request.RegularExpression);
|
||||
const auto searchInvalidated = _searcher.IsStale(*_terminal.get(), request.Text, flags);
|
||||
|
||||
if (searchInvalidated || !request.Reset)
|
||||
if (searchInvalidated || !request.ResetOnly)
|
||||
{
|
||||
std::vector<til::point_span> oldResults;
|
||||
til::point_span oldFocused;
|
||||
|
||||
if (const auto focused = _terminal->GetSearchHighlightFocused())
|
||||
{
|
||||
oldFocused = *focused;
|
||||
}
|
||||
|
||||
if (searchInvalidated)
|
||||
{
|
||||
oldResults = _searcher.ExtractResults();
|
||||
_searcher.Reset(*_terminal.get(), request.Text, flags, !request.GoForward);
|
||||
|
||||
if (SnapSearchResultToSelection())
|
||||
{
|
||||
_searcher.MoveToCurrentSelection();
|
||||
SnapSearchResultToSelection(false);
|
||||
}
|
||||
|
||||
_terminal->SetSearchHighlights(_searcher.Results());
|
||||
}
|
||||
else
|
||||
|
||||
if (!request.ResetOnly)
|
||||
{
|
||||
_searcher.FindNext(!request.GoForward);
|
||||
}
|
||||
|
||||
if (const auto idx = _searcher.CurrentMatch(); idx >= 0)
|
||||
{
|
||||
_terminal->SetSearchHighlightFocused(gsl::narrow<size_t>(idx), request.ScrollOffset);
|
||||
}
|
||||
_terminal->SetSearchHighlightFocused(gsl::narrow<size_t>(std::max<ptrdiff_t>(0, _searcher.CurrentMatch())));
|
||||
_renderer->TriggerSearchHighlight(oldResults);
|
||||
|
||||
if (const auto focused = _terminal->GetSearchHighlightFocused(); focused && *focused != oldFocused)
|
||||
{
|
||||
_terminal->ScrollToSearchHighlight(request.ScrollOffset);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t totalMatches = 0;
|
||||
@@ -1747,27 +1761,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
{
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->SetSearchHighlights({});
|
||||
_terminal->SetSearchHighlightFocused({}, 0);
|
||||
_terminal->SetSearchHighlightFocused(0);
|
||||
_renderer->TriggerSearchHighlight(_searcher.Results());
|
||||
_searcher = {};
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Tells ControlCore to snap the current search result index to currently
|
||||
// selected text if the search was started using it.
|
||||
void ControlCore::SnapSearchResultToSelection(bool shouldSnap) noexcept
|
||||
{
|
||||
_snapSearchResultToSelection = shouldSnap;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Returns true, if we should snap the current search result index to
|
||||
// the currently selected text after a new search is started, else false.
|
||||
bool ControlCore::SnapSearchResultToSelection() const noexcept
|
||||
{
|
||||
return _snapSearchResultToSelection;
|
||||
}
|
||||
|
||||
void ControlCore::Close()
|
||||
{
|
||||
if (!_IsClosing())
|
||||
@@ -2212,19 +2210,32 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - <none>
|
||||
void ControlCore::ClearBuffer(Control::ClearBufferType clearType)
|
||||
{
|
||||
if (clearType == Control::ClearBufferType::Scrollback || clearType == Control::ClearBufferType::All)
|
||||
std::wstring_view command;
|
||||
switch (clearType)
|
||||
{
|
||||
case ClearBufferType::Screen:
|
||||
command = L"\x1b[H\x1b[2J";
|
||||
break;
|
||||
case ClearBufferType::Scrollback:
|
||||
command = L"\x1b[3J";
|
||||
break;
|
||||
case ClearBufferType::All:
|
||||
command = L"\x1b[H\x1b[2J\x1b[3J";
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->EraseScrollback();
|
||||
_terminal->Write(command);
|
||||
}
|
||||
|
||||
if (clearType == Control::ClearBufferType::Screen || clearType == Control::ClearBufferType::All)
|
||||
{
|
||||
// Send a signal to conpty to clear the buffer.
|
||||
if (auto conpty{ _connection.try_as<TerminalConnection::ConptyConnection>() })
|
||||
{
|
||||
// ConPTY will emit sequences to sync up our buffer with its new
|
||||
// contents.
|
||||
// Since the clearing of ConPTY occurs asynchronously, this call can result weird issues,
|
||||
// where a console application still sees contents that we've already deleted, etc.
|
||||
// The correct way would be for ConPTY to emit the appropriate CSI n J sequences.
|
||||
conpty.ClearBuffer();
|
||||
}
|
||||
}
|
||||
@@ -2471,13 +2482,21 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - This is related to work done for GH#2988.
|
||||
void ControlCore::GotFocus()
|
||||
{
|
||||
_focusChanged(true);
|
||||
const auto shared = _shared.lock_shared();
|
||||
if (shared->focusChanged)
|
||||
{
|
||||
(*shared->focusChanged)(true);
|
||||
}
|
||||
}
|
||||
|
||||
// See GotFocus.
|
||||
void ControlCore::LostFocus()
|
||||
{
|
||||
_focusChanged(false);
|
||||
const auto shared = _shared.lock_shared();
|
||||
if (shared->focusChanged)
|
||||
{
|
||||
(*shared->focusChanged)(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ControlCore::_focusChanged(bool focused)
|
||||
|
||||
@@ -228,8 +228,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
SearchResults Search(SearchRequest request);
|
||||
const std::vector<til::point_span>& SearchResultRows() const noexcept;
|
||||
void ClearSearch();
|
||||
void SnapSearchResultToSelection(bool snap) noexcept;
|
||||
bool SnapSearchResultToSelection() const noexcept;
|
||||
|
||||
void LeftClickOnTerminal(const til::point terminalPosition,
|
||||
const int numberOfClicks,
|
||||
@@ -306,6 +304,7 @@ 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;
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean GoForward;
|
||||
Boolean CaseSensitive;
|
||||
Boolean RegularExpression;
|
||||
Boolean Reset;
|
||||
Boolean ResetOnly;
|
||||
Int32 ScrollOffset;
|
||||
};
|
||||
|
||||
@@ -148,7 +148,6 @@ namespace Microsoft.Terminal.Control
|
||||
|
||||
SearchResults Search(SearchRequest request);
|
||||
void ClearSearch();
|
||||
Boolean SnapSearchResultToSelection;
|
||||
|
||||
Microsoft.Terminal.Core.Color ForegroundColor { get; };
|
||||
Microsoft.Terminal.Core.Color BackgroundColor { get; };
|
||||
|
||||
@@ -25,6 +25,12 @@ namespace Microsoft.Terminal.Control
|
||||
Console,
|
||||
};
|
||||
|
||||
enum DefaultInputScope
|
||||
{
|
||||
Default,
|
||||
AlphanumericHalfWidth,
|
||||
};
|
||||
|
||||
runtimeclass FontSizeChangedArgs
|
||||
{
|
||||
Int32 Width { get; };
|
||||
|
||||
@@ -891,6 +891,9 @@ void _stdcall TerminalSetTheme(void* terminal, TerminalTheme theme, LPCWSTR font
|
||||
renderSettings.SetColorTableEntry(tableIndex, gsl::at(theme.ColorTable, tableIndex));
|
||||
}
|
||||
|
||||
// Save these values as the new default render settings.
|
||||
renderSettings.SaveDefaultSettings();
|
||||
|
||||
publicTerminal->_terminal->SetCursorStyle(static_cast<Microsoft::Console::VirtualTerminal::DispatchTypes::CursorStyle>(theme.CursorStyle));
|
||||
|
||||
publicTerminal->_desiredFont = { fontFamily, 0, DEFAULT_FONT_WEIGHT, static_cast<float>(fontSize), CP_UTF8 };
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean DisablePartialInvalidation { get; };
|
||||
Boolean SoftwareRendering { get; };
|
||||
Microsoft.Terminal.Control.TextMeasurement TextMeasurement { get; };
|
||||
Microsoft.Terminal.Control.DefaultInputScope DefaultInputScope { get; };
|
||||
Boolean ShowMarks { get; };
|
||||
Boolean UseBackgroundImageForWindow { get; };
|
||||
Boolean RightClickContextMenu { get; };
|
||||
|
||||
@@ -575,7 +575,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// but since code paths differ, extra work is required to ensure correctness.
|
||||
if (!_core.HasMultiLineSelection())
|
||||
{
|
||||
_core.SnapSearchResultToSelection(true);
|
||||
const auto selectedLine{ _core.SelectedText(true) };
|
||||
_searchBox->PopulateTextbox(selectedLine);
|
||||
}
|
||||
@@ -862,6 +861,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
|
||||
_interactivity.UpdateSettings();
|
||||
{
|
||||
const auto inputScope = settings.DefaultInputScope();
|
||||
const auto alpha = inputScope == DefaultInputScope::AlphanumericHalfWidth;
|
||||
::Microsoft::Console::TSF::Handle::SetDefaultScopeAlphanumericHalfWidth(alpha);
|
||||
}
|
||||
if (_automationPeer)
|
||||
{
|
||||
_automationPeer.SetControlPadding(Core::Padding{
|
||||
@@ -1630,12 +1634,29 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
{
|
||||
if (vkey == VK_ADD)
|
||||
{
|
||||
// Alt '+' <number> is used to input Unicode code points.
|
||||
// Every time you press + it resets the entire state
|
||||
// in the original OS implementation as well.
|
||||
s.encoding = AltNumpadEncoding::Unicode;
|
||||
s.accumulator = 0;
|
||||
s.active = true;
|
||||
static const auto enabled = []() {
|
||||
wchar_t buffer[4]{};
|
||||
DWORD size = sizeof(buffer);
|
||||
RegGetValueW(
|
||||
HKEY_CURRENT_USER,
|
||||
L"Control Panel\\Input Method",
|
||||
L"EnableHexNumpad",
|
||||
RRF_RT_REG_SZ,
|
||||
nullptr,
|
||||
&buffer[0],
|
||||
&size);
|
||||
return size == 4 && memcmp(&buffer[0], L"1", 4) == 0;
|
||||
}();
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
// Alt '+' <number> is used to input Unicode code points.
|
||||
// Every time you press + it resets the entire state
|
||||
// in the original OS implementation as well.
|
||||
s.encoding = AltNumpadEncoding::Unicode;
|
||||
s.accumulator = 0;
|
||||
s.active = true;
|
||||
}
|
||||
}
|
||||
else if (vkey == VK_NUMPAD0 && s.encoding == AltNumpadEncoding::OEM && s.accumulator == 0)
|
||||
{
|
||||
@@ -3807,7 +3828,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
const auto goForward = _searchBox->GoForward();
|
||||
const auto caseSensitive = _searchBox->CaseSensitive();
|
||||
const auto regularExpression = _searchBox->RegularExpression();
|
||||
const auto request = SearchRequest{ text, goForward, caseSensitive, regularExpression, true, _calculateSearchScrollOffset() };
|
||||
const auto request = SearchRequest{ text, goForward, caseSensitive, regularExpression, true, _searchScrollOffset };
|
||||
_handleSearchResults(_core.Search(request));
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,9 @@ void Terminal::UpdateSettings(ICoreSettings settings)
|
||||
GetRenderSettings().SetColorTableEntry(TextColor::FRAME_BACKGROUND, til::color{ settings.TabColor().Value() });
|
||||
}
|
||||
|
||||
// Save the changes made above and in UpdateAppearance as the new default render settings.
|
||||
GetRenderSettings().SaveDefaultSettings();
|
||||
|
||||
if (!_startingTabColor && settings.StartingTabColor())
|
||||
{
|
||||
_startingTabColor = settings.StartingTabColor().Value();
|
||||
@@ -209,12 +212,6 @@ void Terminal::SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle)
|
||||
engine.Dispatch().SetCursorStyle(cursorStyle);
|
||||
}
|
||||
|
||||
void Terminal::EraseScrollback()
|
||||
{
|
||||
auto& engine = reinterpret_cast<OutputStateMachineEngine&>(_stateMachine->Engine());
|
||||
engine.Dispatch().EraseInDisplay(DispatchTypes::EraseType::Scrollback);
|
||||
}
|
||||
|
||||
bool Terminal::IsXtermBracketedPasteModeEnabled() const noexcept
|
||||
{
|
||||
return _systemMode.test(Mode::BracketedPaste);
|
||||
@@ -1254,15 +1251,17 @@ void Terminal::SetSearchHighlights(const std::vector<til::point_span>& highlight
|
||||
// Method Description:
|
||||
// - Stores the focused search highlighted region in the terminal
|
||||
// - If the region isn't empty, it will be brought into view
|
||||
void Terminal::SetSearchHighlightFocused(const size_t focusedIdx, til::CoordType searchScrollOffset)
|
||||
void Terminal::SetSearchHighlightFocused(const size_t focusedIdx) noexcept
|
||||
{
|
||||
_assertLocked();
|
||||
_searchHighlightFocused = focusedIdx;
|
||||
}
|
||||
|
||||
// bring the focused region into the view if the index is in valid range
|
||||
if (focusedIdx < _searchHighlights.size())
|
||||
void Terminal::ScrollToSearchHighlight(til::CoordType searchScrollOffset)
|
||||
{
|
||||
if (_searchHighlightFocused < _searchHighlights.size())
|
||||
{
|
||||
const auto focused = til::at(_searchHighlights, focusedIdx);
|
||||
const auto focused = til::at(_searchHighlights, _searchHighlightFocused);
|
||||
const auto adjustedStart = til::point{ focused.start.x, std::max(0, focused.start.y - searchScrollOffset) };
|
||||
const auto adjustedEnd = til::point{ focused.end.x, std::max(0, focused.end.y - searchScrollOffset) };
|
||||
_ScrollToPoints(adjustedStart, adjustedEnd);
|
||||
|
||||
@@ -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 EraseScrollback();
|
||||
bool IsXtermBracketedPasteModeEnabled() const noexcept;
|
||||
std::wstring_view GetWorkingDirectory() noexcept;
|
||||
|
||||
@@ -233,7 +232,8 @@ public:
|
||||
void SetSearchMissingCommandCallback(std::function<void(std::wstring_view, const til::CoordType)> pfn) noexcept;
|
||||
void SetClearQuickFixCallback(std::function<void()> pfn) noexcept;
|
||||
void SetSearchHighlights(const std::vector<til::point_span>& highlights) noexcept;
|
||||
void SetSearchHighlightFocused(const size_t focusedIdx, til::CoordType searchScrollOffset);
|
||||
void SetSearchHighlightFocused(size_t focusedIdx) noexcept;
|
||||
void ScrollToSearchHighlight(til::CoordType searchScrollOffset);
|
||||
|
||||
void BlinkCursor() noexcept;
|
||||
void SetCursorOn(const bool isOn) noexcept;
|
||||
|
||||
@@ -86,7 +86,7 @@ void Terminal::SetWindowTitle(const std::wstring_view title)
|
||||
_assertLocked();
|
||||
if (!_suppressApplicationTitle)
|
||||
{
|
||||
_title.emplace(title);
|
||||
_title.emplace(title.empty() ? _startingTitle : title);
|
||||
_pfnTitleChanged(_title.value());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
<!-- command name -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<!-- key chord -->
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<!-- edit buttons -->
|
||||
<!--
|
||||
This needs to be 112 because that is the width of the row of buttons in edit mode + padding.
|
||||
@@ -307,7 +307,7 @@
|
||||
Glyph="" />
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Flyout FlyoutPresenterStyle="{StaticResource CustomFlyoutPresenterStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="Actions_DeleteConfirmationMessage"
|
||||
Style="{StaticResource CustomFlyoutTextStyle}" />
|
||||
|
||||
@@ -289,14 +289,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
// Display a confirmation dialog.
|
||||
TextBlock errorMessageTB{};
|
||||
errorMessageTB.Text(RS_(L"Actions_RenameConflictConfirmationMessage"));
|
||||
errorMessageTB.TextWrapping(TextWrapping::Wrap);
|
||||
|
||||
const auto conflictingCmdName{ conflictingCmd.Name() };
|
||||
TextBlock conflictingCommandNameTB{};
|
||||
conflictingCommandNameTB.Text(fmt::format(L"\"{}\"", conflictingCmdName.empty() ? RS_(L"Actions_UnnamedCommandName") : conflictingCmdName));
|
||||
conflictingCommandNameTB.FontStyle(Windows::UI::Text::FontStyle::Italic);
|
||||
conflictingCommandNameTB.TextWrapping(TextWrapping::Wrap);
|
||||
|
||||
TextBlock confirmationQuestionTB{};
|
||||
confirmationQuestionTB.Text(RS_(L"Actions_RenameConflictConfirmationQuestion"));
|
||||
confirmationQuestionTB.TextWrapping(TextWrapping::Wrap);
|
||||
|
||||
Button acceptBTN{};
|
||||
acceptBTN.Content(box_value(RS_(L"Actions_RenameConflictConfirmationAcceptButton")));
|
||||
@@ -320,7 +323,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
flyoutStack.Children().Append(confirmationQuestionTB);
|
||||
flyoutStack.Children().Append(acceptBTN);
|
||||
|
||||
// This should match CustomFlyoutPresenterStyle in CommonResources.xaml!
|
||||
// We don't have access to those resources here, so it's easier to just copy them over.
|
||||
// This allows the flyout text to wrap
|
||||
Style acceptChangesFlyoutStyle{ winrt::xaml_typename<FlyoutPresenter>() };
|
||||
Setter horizontalScrollModeStyleSetter{ ScrollViewer::HorizontalScrollModeProperty(), box_value(ScrollMode::Disabled) };
|
||||
Setter horizontalScrollBarVisibilityStyleSetter{ ScrollViewer::HorizontalScrollBarVisibilityProperty(), box_value(ScrollBarVisibility::Disabled) };
|
||||
acceptChangesFlyoutStyle.Setters().Append(horizontalScrollModeStyleSetter);
|
||||
acceptChangesFlyoutStyle.Setters().Append(horizontalScrollBarVisibilityStyleSetter);
|
||||
|
||||
Flyout acceptChangesFlyout{};
|
||||
acceptChangesFlyout.FlyoutPresenterStyle(acceptChangesFlyoutStyle);
|
||||
acceptChangesFlyout.Content(flyoutStack);
|
||||
senderVM.AcceptChangesFlyout(acceptChangesFlyout);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<!-- Used for disclaimers -->
|
||||
<Style x:Key="DisclaimerStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="TextWrapping" Value="WrapWholeWords" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
<Setter Property="MaxWidth" Value="1000" />
|
||||
</Style>
|
||||
|
||||
@@ -125,6 +125,14 @@
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Margin" Value="0,0,0,10" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<!-- Used for the flyout itself. Removes scroll bar to allow for text wrapping. -->
|
||||
<Style x:Key="CustomFlyoutPresenterStyle"
|
||||
TargetType="FlyoutPresenter">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
</Style>
|
||||
|
||||
<!-- Number Box -->
|
||||
@@ -145,7 +153,7 @@
|
||||
BasedOn="{StaticResource BaseButtonStyle}"
|
||||
TargetType="Button">
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
<Setter Property="Height" Value="33" />
|
||||
<Setter Property="MinHeight" Value="33" />
|
||||
</Style>
|
||||
|
||||
<!-- Delete button based on Accent button template -->
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
</StackPanel>
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Flyout FlyoutPresenterStyle="{StaticResource CustomFlyoutPresenterStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="ColorScheme_DeleteConfirmationMessage"
|
||||
Style="{StaticResource CustomFlyoutTextStyle}" />
|
||||
|
||||
@@ -27,20 +27,6 @@
|
||||
</Page.Resources>
|
||||
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_Language"
|
||||
Visibility="{x:Bind ViewModel.LanguageSelectorAvailable}">
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.LanguageList}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentLanguage, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="x:String">
|
||||
<TextBlock Text="{x:Bind local:GlobalAppearanceViewModel.LanguageDisplayConverter((x:String))}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Theme -->
|
||||
<local:SettingContainer x:Uid="Globals_Theme">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "EnumEntry.h"
|
||||
|
||||
#include <LibraryResources.h>
|
||||
#include <WtExeUtils.h>
|
||||
|
||||
using namespace winrt;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
@@ -18,28 +17,6 @@ using namespace winrt::Windows::Foundation::Collections;
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
// For ComboBox an empty SelectedItem string denotes no selection.
|
||||
// What we want instead is for "Use system language" to be selected by default.
|
||||
// --> "und" is synonymous for "Use system language".
|
||||
constexpr std::wstring_view systemLanguageTag{ L"und" };
|
||||
|
||||
static constexpr std::array appLanguageTags{
|
||||
L"en-US",
|
||||
L"de-DE",
|
||||
L"es-ES",
|
||||
L"fr-FR",
|
||||
L"it-IT",
|
||||
L"ja",
|
||||
L"ko",
|
||||
L"pt-BR",
|
||||
L"qps-PLOC",
|
||||
L"qps-PLOCA",
|
||||
L"qps-PLOCM",
|
||||
L"ru",
|
||||
L"zh-Hans",
|
||||
L"zh-Hant",
|
||||
};
|
||||
|
||||
constexpr std::wstring_view systemThemeName{ L"system" };
|
||||
constexpr std::wstring_view darkThemeName{ L"dark" };
|
||||
constexpr std::wstring_view lightThemeName{ L"light" };
|
||||
@@ -56,146 +33,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_UpdateThemeList();
|
||||
}
|
||||
|
||||
winrt::hstring GlobalAppearanceViewModel::LanguageDisplayConverter(const winrt::hstring& tag)
|
||||
{
|
||||
if (tag == systemLanguageTag)
|
||||
{
|
||||
return RS_(L"Globals_LanguageDefault");
|
||||
}
|
||||
|
||||
winrt::Windows::Globalization::Language language{ tag };
|
||||
return language.NativeName();
|
||||
}
|
||||
|
||||
// Returns whether the language selector is available/shown.
|
||||
//
|
||||
// winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride()
|
||||
// doesn't work for unpackaged applications. The corresponding code in TerminalApp is disabled.
|
||||
// It would be confusing for our users if we presented a dysfunctional language selector.
|
||||
bool GlobalAppearanceViewModel::LanguageSelectorAvailable()
|
||||
{
|
||||
return IsPackaged();
|
||||
}
|
||||
|
||||
// Returns the list of languages the user may override the application language with.
|
||||
// The returned list are BCP 47 language tags like {"und", "en-US", "de-DE", "es-ES", ...}.
|
||||
// "und" is short for "undefined" and is synonymous for "Use system language" in this code.
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> GlobalAppearanceViewModel::LanguageList()
|
||||
{
|
||||
if (_languageList)
|
||||
{
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
if (!LanguageSelectorAvailable())
|
||||
{
|
||||
_languageList = {};
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
// In order to return the language list this code does the following:
|
||||
// [1] Get all possible languages we want to allow the user to choose.
|
||||
// We have to acquire languages from multiple sources, creating duplicates. See below at [1].
|
||||
// [2] Sort languages by their ASCII tags, forcing the UI in a consistent/stable order.
|
||||
// I wanted to sort the localized language names initially, but it turned out to be complex.
|
||||
// [3] Remove potential duplicates in our language list from [1].
|
||||
// We don't want to have en-US twice in the list, do we?
|
||||
// [4] Optionally remove unwanted language tags (like pseudo-localizations).
|
||||
|
||||
std::vector<winrt::hstring> tags;
|
||||
|
||||
// [1]:
|
||||
{
|
||||
// ManifestLanguages contains languages the app ships with.
|
||||
// Unfortunately, we cannot use this source. Our manifest must contain the
|
||||
// ~100 languages that are localized for the shell extension and start menu
|
||||
// presentation so we align with Windows display languages for those surfaces.
|
||||
// However, the actual content of our application is limited to a much smaller
|
||||
// subset of approximately 14 languages. As such, we will code the limited
|
||||
// subset of languages that we support for selection within the Settings
|
||||
// dropdown to steer users towards the ones that we can display in the app.
|
||||
|
||||
// As per the function definition, the first item
|
||||
// is always "Use system language" ("und").
|
||||
tags.emplace_back(systemLanguageTag);
|
||||
|
||||
// Add our hard-coded languages after the system definition.
|
||||
for (const auto& v : appLanguageTags)
|
||||
{
|
||||
tags.push_back(v);
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: The size of tags is always >0, due to tags[0] being hard-coded to "und".
|
||||
const auto tagsBegin = ++tags.begin();
|
||||
const auto tagsEnd = tags.end();
|
||||
|
||||
// [2]:
|
||||
std::sort(tagsBegin, tagsEnd);
|
||||
|
||||
// I'd love for both, std::unique and std::remove_if, to occur in a single loop,
|
||||
// but the code turned out to be complex and even less maintainable, so I gave up.
|
||||
{
|
||||
// [3] part 1:
|
||||
auto it = std::unique(tagsBegin, tagsEnd);
|
||||
|
||||
// The qps- languages are useful for testing ("pseudo-localization").
|
||||
// --> Leave them in if debug features are enabled.
|
||||
if (!_GlobalSettings.DebugFeaturesEnabled())
|
||||
{
|
||||
// [4] part 1:
|
||||
it = std::remove_if(tagsBegin, it, [](const winrt::hstring& tag) -> bool {
|
||||
return til::starts_with(tag, L"qps-");
|
||||
});
|
||||
}
|
||||
|
||||
// [3], [4] part 2 (completing the so called "erase-remove idiom"):
|
||||
tags.erase(it, tagsEnd);
|
||||
}
|
||||
|
||||
_languageList = winrt::single_threaded_observable_vector(std::move(tags));
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IInspectable GlobalAppearanceViewModel::CurrentLanguage()
|
||||
{
|
||||
if (_currentLanguage)
|
||||
{
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
if (!LanguageSelectorAvailable())
|
||||
{
|
||||
_currentLanguage = {};
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
// NOTE: PrimaryLanguageOverride throws if this instance is unpackaged.
|
||||
auto currentLanguage = winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride();
|
||||
if (currentLanguage.empty())
|
||||
{
|
||||
currentLanguage = systemLanguageTag;
|
||||
}
|
||||
|
||||
_currentLanguage = winrt::box_value(currentLanguage);
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
void GlobalAppearanceViewModel::CurrentLanguage(const winrt::Windows::Foundation::IInspectable& tag)
|
||||
{
|
||||
_currentLanguage = tag;
|
||||
|
||||
const auto currentLanguage = winrt::unbox_value<winrt::hstring>(_currentLanguage);
|
||||
if (currentLanguage == systemLanguageTag)
|
||||
{
|
||||
_GlobalSettings.ClearLanguage();
|
||||
}
|
||||
else
|
||||
{
|
||||
_GlobalSettings.Language(currentLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
// Function Description:
|
||||
// - Updates the list of all themes available to choose from.
|
||||
void GlobalAppearanceViewModel::_UpdateThemeList()
|
||||
|
||||
@@ -22,16 +22,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
GETSET_BINDABLE_ENUM_SETTING(TabWidthMode, winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, _GlobalSettings.TabWidthMode);
|
||||
|
||||
public:
|
||||
// LanguageDisplayConverter maps the given BCP 47 tag to a localized string.
|
||||
// For instance "en-US" produces "English (United States)", while "de-DE" produces
|
||||
// "Deutsch (Deutschland)". This works independently of the user's locale.
|
||||
static winrt::hstring LanguageDisplayConverter(const winrt::hstring& tag);
|
||||
|
||||
bool LanguageSelectorAvailable();
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> LanguageList();
|
||||
winrt::Windows::Foundation::IInspectable CurrentLanguage();
|
||||
void CurrentLanguage(const winrt::Windows::Foundation::IInspectable& tag);
|
||||
|
||||
winrt::Windows::Foundation::IInspectable CurrentTheme();
|
||||
void CurrentTheme(const winrt::Windows::Foundation::IInspectable& tag);
|
||||
static winrt::hstring ThemeNameConverter(const Model::Theme& theme);
|
||||
@@ -52,8 +42,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
private:
|
||||
Model::GlobalAppSettings _GlobalSettings;
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> _languageList;
|
||||
winrt::Windows::Foundation::IInspectable _currentLanguage;
|
||||
winrt::Windows::Foundation::IInspectable _currentTheme;
|
||||
|
||||
void _UpdateThemeList();
|
||||
|
||||
@@ -11,11 +11,6 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
GlobalAppearanceViewModel(Microsoft.Terminal.Settings.Model.GlobalAppSettings globalSettings);
|
||||
|
||||
static String LanguageDisplayConverter(String tag);
|
||||
Boolean LanguageSelectorAvailable { get; };
|
||||
Windows.Foundation.Collections.IObservableVector<String> LanguageList { get; };
|
||||
IInspectable CurrentLanguage;
|
||||
|
||||
IInspectable CurrentTheme;
|
||||
static String ThemeNameConverter(Microsoft.Terminal.Settings.Model.Theme theme);
|
||||
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Model.Theme> ThemeList { get; };
|
||||
|
||||
@@ -139,6 +139,29 @@
|
||||
</ComboBox>
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_Language"
|
||||
Visibility="{x:Bind ViewModel.LanguageSelectorAvailable}">
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.LanguageList}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentLanguage, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="x:String">
|
||||
<TextBlock Text="{x:Bind local:LaunchViewModel.LanguageDisplayConverter((x:String))}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_DefaultInputScope">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.DefaultInputScopeList}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentDefaultInputScope, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Start on User Login -->
|
||||
<local:SettingContainer x:Uid="Globals_StartOnUserLogin">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.StartOnUserLogin, Mode=TwoWay}"
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
#include "LaunchViewModel.h"
|
||||
#include "LaunchViewModel.g.cpp"
|
||||
#include "EnumEntry.h"
|
||||
|
||||
#include <LibraryResources.h>
|
||||
#include <WtExeUtils.h>
|
||||
|
||||
using namespace winrt::Windows::UI::Xaml::Navigation;
|
||||
using namespace winrt::Windows::Foundation;
|
||||
@@ -14,11 +16,34 @@ using namespace winrt::Windows::UI::Xaml::Data;
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
// For ComboBox an empty SelectedItem string denotes no selection.
|
||||
// What we want instead is for "Use system language" to be selected by default.
|
||||
// --> "und" is synonymous for "Use system language".
|
||||
constexpr std::wstring_view systemLanguageTag{ L"und" };
|
||||
|
||||
static constexpr std::array appLanguageTags{
|
||||
L"en-US",
|
||||
L"de-DE",
|
||||
L"es-ES",
|
||||
L"fr-FR",
|
||||
L"it-IT",
|
||||
L"ja",
|
||||
L"ko",
|
||||
L"pt-BR",
|
||||
L"qps-PLOC",
|
||||
L"qps-PLOCA",
|
||||
L"qps-PLOCM",
|
||||
L"ru",
|
||||
L"zh-Hans",
|
||||
L"zh-Hant",
|
||||
};
|
||||
|
||||
LaunchViewModel::LaunchViewModel(Model::CascadiaSettings settings) :
|
||||
_Settings{ settings }
|
||||
{
|
||||
_useDefaultLaunchPosition = isnan(InitialPosX()) && isnan(InitialPosY());
|
||||
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(DefaultInputScope, DefaultInputScope, winrt::Microsoft::Terminal::Control::DefaultInputScope, L"Globals_DefaultInputScope", L"Content");
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(FirstWindowPreference, FirstWindowPreference, FirstWindowPreference, L"Globals_FirstWindowPreference", L"Content");
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(LaunchMode, LaunchMode, LaunchMode, L"Globals_LaunchMode", L"Content");
|
||||
// More options were added to the JSON mapper when the enum was made into [Flags]
|
||||
@@ -40,6 +65,146 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
});
|
||||
}
|
||||
|
||||
winrt::hstring LaunchViewModel::LanguageDisplayConverter(const winrt::hstring& tag)
|
||||
{
|
||||
if (tag == systemLanguageTag)
|
||||
{
|
||||
return RS_(L"Globals_LanguageDefault");
|
||||
}
|
||||
|
||||
winrt::Windows::Globalization::Language language{ tag };
|
||||
return language.NativeName();
|
||||
}
|
||||
|
||||
// Returns whether the language selector is available/shown.
|
||||
//
|
||||
// winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride()
|
||||
// doesn't work for unpackaged applications. The corresponding code in TerminalApp is disabled.
|
||||
// It would be confusing for our users if we presented a dysfunctional language selector.
|
||||
bool LaunchViewModel::LanguageSelectorAvailable()
|
||||
{
|
||||
return IsPackaged();
|
||||
}
|
||||
|
||||
// Returns the list of languages the user may override the application language with.
|
||||
// The returned list are BCP 47 language tags like {"und", "en-US", "de-DE", "es-ES", ...}.
|
||||
// "und" is short for "undefined" and is synonymous for "Use system language" in this code.
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> LaunchViewModel::LanguageList()
|
||||
{
|
||||
if (_languageList)
|
||||
{
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
if (!LanguageSelectorAvailable())
|
||||
{
|
||||
_languageList = {};
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
// In order to return the language list this code does the following:
|
||||
// [1] Get all possible languages we want to allow the user to choose.
|
||||
// We have to acquire languages from multiple sources, creating duplicates. See below at [1].
|
||||
// [2] Sort languages by their ASCII tags, forcing the UI in a consistent/stable order.
|
||||
// I wanted to sort the localized language names initially, but it turned out to be complex.
|
||||
// [3] Remove potential duplicates in our language list from [1].
|
||||
// We don't want to have en-US twice in the list, do we?
|
||||
// [4] Optionally remove unwanted language tags (like pseudo-localizations).
|
||||
|
||||
std::vector<winrt::hstring> tags;
|
||||
|
||||
// [1]:
|
||||
{
|
||||
// ManifestLanguages contains languages the app ships with.
|
||||
// Unfortunately, we cannot use this source. Our manifest must contain the
|
||||
// ~100 languages that are localized for the shell extension and start menu
|
||||
// presentation so we align with Windows display languages for those surfaces.
|
||||
// However, the actual content of our application is limited to a much smaller
|
||||
// subset of approximately 14 languages. As such, we will code the limited
|
||||
// subset of languages that we support for selection within the Settings
|
||||
// dropdown to steer users towards the ones that we can display in the app.
|
||||
|
||||
// As per the function definition, the first item
|
||||
// is always "Use system language" ("und").
|
||||
tags.emplace_back(systemLanguageTag);
|
||||
|
||||
// Add our hard-coded languages after the system definition.
|
||||
for (const auto& v : appLanguageTags)
|
||||
{
|
||||
tags.push_back(v);
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: The size of tags is always >0, due to tags[0] being hard-coded to "und".
|
||||
const auto tagsBegin = ++tags.begin();
|
||||
const auto tagsEnd = tags.end();
|
||||
|
||||
// [2]:
|
||||
std::sort(tagsBegin, tagsEnd);
|
||||
|
||||
// I'd love for both, std::unique and std::remove_if, to occur in a single loop,
|
||||
// but the code turned out to be complex and even less maintainable, so I gave up.
|
||||
{
|
||||
// [3] part 1:
|
||||
auto it = std::unique(tagsBegin, tagsEnd);
|
||||
|
||||
// The qps- languages are useful for testing ("pseudo-localization").
|
||||
// --> Leave them in if debug features are enabled.
|
||||
if (!_Settings.GlobalSettings().DebugFeaturesEnabled())
|
||||
{
|
||||
// [4] part 1:
|
||||
it = std::remove_if(tagsBegin, it, [](const winrt::hstring& tag) -> bool {
|
||||
return til::starts_with(tag, L"qps-");
|
||||
});
|
||||
}
|
||||
|
||||
// [3], [4] part 2 (completing the so called "erase-remove idiom"):
|
||||
tags.erase(it, tagsEnd);
|
||||
}
|
||||
|
||||
_languageList = winrt::single_threaded_observable_vector(std::move(tags));
|
||||
return _languageList;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IInspectable LaunchViewModel::CurrentLanguage()
|
||||
{
|
||||
if (_currentLanguage)
|
||||
{
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
if (!LanguageSelectorAvailable())
|
||||
{
|
||||
_currentLanguage = {};
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
// NOTE: PrimaryLanguageOverride throws if this instance is unpackaged.
|
||||
auto currentLanguage = winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride();
|
||||
if (currentLanguage.empty())
|
||||
{
|
||||
currentLanguage = systemLanguageTag;
|
||||
}
|
||||
|
||||
_currentLanguage = winrt::box_value(currentLanguage);
|
||||
return _currentLanguage;
|
||||
}
|
||||
|
||||
void LaunchViewModel::CurrentLanguage(const winrt::Windows::Foundation::IInspectable& tag)
|
||||
{
|
||||
_currentLanguage = tag;
|
||||
|
||||
const auto currentLanguage = winrt::unbox_value<winrt::hstring>(_currentLanguage);
|
||||
if (currentLanguage == systemLanguageTag)
|
||||
{
|
||||
_Settings.GlobalSettings().ClearLanguage();
|
||||
}
|
||||
else
|
||||
{
|
||||
_Settings.GlobalSettings().Language(currentLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
winrt::hstring LaunchViewModel::LaunchParametersCurrentValue()
|
||||
{
|
||||
const auto launchModeString = CurrentLaunchMode().as<EnumEntry>()->EnumName();
|
||||
|
||||
@@ -14,6 +14,16 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
public:
|
||||
LaunchViewModel(Model::CascadiaSettings settings);
|
||||
|
||||
// LanguageDisplayConverter maps the given BCP 47 tag to a localized string.
|
||||
// For instance "en-US" produces "English (United States)", while "de-DE" produces
|
||||
// "Deutsch (Deutschland)". This works independently of the user's locale.
|
||||
static winrt::hstring LanguageDisplayConverter(const winrt::hstring& tag);
|
||||
|
||||
bool LanguageSelectorAvailable();
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> LanguageList();
|
||||
winrt::Windows::Foundation::IInspectable CurrentLanguage();
|
||||
void CurrentLanguage(const winrt::Windows::Foundation::IInspectable& tag);
|
||||
|
||||
winrt::hstring LaunchParametersCurrentValue();
|
||||
double InitialPosX();
|
||||
double InitialPosY();
|
||||
@@ -35,6 +45,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
void CurrentLaunchMode(const winrt::Windows::Foundation::IInspectable& enumEntry);
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::Terminal::Settings::Editor::EnumEntry> LaunchModeList();
|
||||
|
||||
GETSET_BINDABLE_ENUM_SETTING(DefaultInputScope, winrt::Microsoft::Terminal::Control::DefaultInputScope, _Settings.GlobalSettings().DefaultInputScope);
|
||||
GETSET_BINDABLE_ENUM_SETTING(FirstWindowPreference, Model::FirstWindowPreference, _Settings.GlobalSettings().FirstWindowPreference);
|
||||
GETSET_BINDABLE_ENUM_SETTING(WindowingBehavior, Model::WindowingMode, _Settings.GlobalSettings().WindowingBehavior);
|
||||
|
||||
@@ -45,6 +56,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
private:
|
||||
Model::CascadiaSettings _Settings;
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> _languageList;
|
||||
winrt::Windows::Foundation::IInspectable _currentLanguage;
|
||||
bool _useDefaultLaunchPosition;
|
||||
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::Terminal::Settings::Editor::EnumEntry> _LaunchModeList;
|
||||
|
||||
@@ -11,6 +11,14 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
LaunchViewModel(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
|
||||
|
||||
static String LanguageDisplayConverter(String tag);
|
||||
Boolean LanguageSelectorAvailable { get; };
|
||||
Windows.Foundation.Collections.IObservableVector<String> LanguageList { get; };
|
||||
IInspectable CurrentLanguage;
|
||||
|
||||
IInspectable CurrentDefaultInputScope;
|
||||
IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> DefaultInputScopeList { get; };
|
||||
|
||||
String LaunchParametersCurrentValue { get; };
|
||||
Double InitialPosX;
|
||||
Double InitialPosY;
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Systemstandard verwenden</value>
|
||||
<value>Standard</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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Use system default</value>
|
||||
<value>Default</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>Default IME input mode</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>Informs the IME what language to use by default. For languages that rely on an IME and don't use Latin characters by default, this setting can be used to force English input on startup.</value>
|
||||
</data>
|
||||
<data name="Globals_DefaultInputScopeDefault.Content" xml:space="preserve">
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="Globals_DefaultInputScopeAlphanumericHalfWidth.Content" xml:space="preserve">
|
||||
<value>Alphanumeric Half-Width (English)</value>
|
||||
</data>
|
||||
<data name="Globals_AlwaysShowTabs.Header" xml:space="preserve">
|
||||
<value>Always show tabs</value>
|
||||
<comment>Header for a control to toggle if the app should always show the tabs (similar to a website browser).</comment>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Usar los valores predeterminados del sistema</value>
|
||||
<value>Predeterminado</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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Utiliser la valeur par défaut du système</value>
|
||||
<value>Par défaut</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 d’entré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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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 d’un caractère « nouvelle ligne »</value>
|
||||
</data>
|
||||
<data name="Settings_PortableModeNote.Text" xml:space="preserve">
|
||||
<value>Terminal Windows s’exé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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Usa impostazioni predefinite di sistema</value>
|
||||
<value>Impostazione predefinita</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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<comment>A description explaining how this control changes the app's language. {Locked="Windows"}</comment>
|
||||
</data>
|
||||
<data name="Globals_LanguageDefault" xml:space="preserve">
|
||||
<value>Usar o padrão do sistema</value>
|
||||
<value>Padrão</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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1157,7 +1170,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>将配置文件名称替换为标题,以在启动时传递给外壳。</value>
|
||||
<value>将配置文件名称替换为标题,以在启动时传递给 shell。</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">
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -246,9 +246,22 @@
|
||||
<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>
|
||||
@@ -1539,6 +1552,10 @@
|
||||
<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>
|
||||
@@ -1819,6 +1836,15 @@
|
||||
<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>
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<StaticResource x:Key="SettingContainerMessageForeground"
|
||||
ResourceKey="TextFillColorPrimaryBrush" />
|
||||
|
||||
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
|
||||
ResourceKey="SystemAccentColorDark2" />
|
||||
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<Style x:Key="SecondaryTextBlockStyle"
|
||||
@@ -73,6 +76,9 @@
|
||||
ResourceKey="SystemColorWindowTextColorBrush" />
|
||||
<StaticResource x:Key="SettingContainerMessageForeground"
|
||||
ResourceKey="SystemColorWindowTextColorBrush" />
|
||||
|
||||
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
|
||||
ResourceKey="SystemAccentColorLight1" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<Style x:Key="SecondaryTextBlockStyle"
|
||||
@@ -106,6 +112,9 @@
|
||||
ResourceKey="TextFillColorPrimaryBrush" />
|
||||
<StaticResource x:Key="SettingContainerMessageForeground"
|
||||
ResourceKey="TextFillColorPrimaryBrush" />
|
||||
|
||||
<StaticResource x:Key="SettingContainerResetButtonIconForeground"
|
||||
ResourceKey="SystemAccentColorLight2" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
@@ -136,7 +145,7 @@
|
||||
|
||||
<Style x:Key="SettingContainerFontIconStyle"
|
||||
TargetType="FontIcon">
|
||||
<Setter Property="Foreground" Value="{StaticResource SystemAccentColor}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource SettingContainerResetButtonIconForeground}" />
|
||||
<Setter Property="FontSize" Value="11" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
||||
</Style>
|
||||
|
||||
@@ -531,7 +531,9 @@ 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_.
|
||||
if (const auto icon = profile.Icon(); icon.size() > 2)
|
||||
// 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)
|
||||
{
|
||||
const auto iconPath{ wil::ExpandEnvironmentStringsW<std::wstring>(icon.c_str()) };
|
||||
try
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
void _addOrMergeUserColorScheme(const winrt::com_ptr<implementation::ColorScheme>& colorScheme);
|
||||
void _executeGenerator(const IDynamicProfileGenerator& generator);
|
||||
|
||||
std::unordered_set<std::wstring_view> _ignoredNamespaces;
|
||||
std::unordered_set<winrt::hstring, til::transparent_hstring_hash, til::transparent_hstring_equal_to> _ignoredNamespaces;
|
||||
std::set<std::string> themesChangeLog;
|
||||
// See _getNonUserOriginProfiles().
|
||||
size_t _userProfileCount = 0;
|
||||
|
||||
@@ -146,9 +146,27 @@ SettingsLoader::SettingsLoader(const std::string_view& userJSON, const std::stri
|
||||
if (const auto sources = userSettings.globals->DisabledProfileSources())
|
||||
{
|
||||
_ignoredNamespaces.reserve(sources.Size());
|
||||
for (const auto& id : sources)
|
||||
for (auto&& id : sources)
|
||||
{
|
||||
_ignoredNamespaces.emplace(id);
|
||||
_ignoredNamespaces.emplace(std::move(id));
|
||||
}
|
||||
}
|
||||
|
||||
// Apply DisabledProfileSources policy setting. Pick whatever policy is set first.
|
||||
// In most cases HKCU settings take precedence over HKLM settings, but the inverse is true for policies.
|
||||
for (const auto key : { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER })
|
||||
{
|
||||
wchar_t buffer[512]; // "640K ought to be enough for anyone"
|
||||
DWORD bufferSize = sizeof(buffer);
|
||||
if (RegGetValueW(key, LR"(Software\Policies\Microsoft\Windows Terminal)", L"DisabledProfileSources", RRF_RT_REG_MULTI_SZ, nullptr, buffer, &bufferSize) == 0)
|
||||
{
|
||||
for (auto p = buffer; *p;)
|
||||
{
|
||||
const auto len = wcslen(p);
|
||||
_ignoredNamespaces.emplace(p, gsl::narrow_cast<uint32_t>(len));
|
||||
p += len + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +278,7 @@ void SettingsLoader::FindFragmentsAndMergeIntoUserSettings()
|
||||
const auto filename = fragmentExtFolder.path().filename();
|
||||
const auto& source = filename.native();
|
||||
|
||||
if (!_ignoredNamespaces.count(std::wstring_view{ source }) && fragmentExtFolder.is_directory())
|
||||
if (!_ignoredNamespaces.contains(std::wstring_view{ source }) && fragmentExtFolder.is_directory())
|
||||
{
|
||||
parseAndLayerFragmentFiles(fragmentExtFolder.path(), winrt::hstring{ source });
|
||||
}
|
||||
@@ -295,7 +313,7 @@ void SettingsLoader::FindFragmentsAndMergeIntoUserSettings()
|
||||
for (const auto& ext : extensions)
|
||||
{
|
||||
const auto packageName = ext.Package().Id().FamilyName();
|
||||
if (_ignoredNamespaces.count(std::wstring_view{ packageName }))
|
||||
if (_ignoredNamespaces.contains(std::wstring_view{ packageName }))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -914,7 +932,7 @@ void SettingsLoader::_addOrMergeUserColorScheme(const winrt::com_ptr<implementat
|
||||
void SettingsLoader::_executeGenerator(const IDynamicProfileGenerator& generator)
|
||||
{
|
||||
const auto generatorNamespace = generator.GetNamespace();
|
||||
if (_ignoredNamespaces.count(generatorNamespace))
|
||||
if (_ignoredNamespaces.contains(generatorNamespace))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -774,7 +774,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
// covers actions w/out args
|
||||
// - "command": "unbound" --> "unbound"
|
||||
// - "command": "copy" --> "copy"
|
||||
changes.emplace(fmt::format(FMT_COMPILE("{}"), json.asString()));
|
||||
changes.emplace(json.asString());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
DEFINE_ENUM_MAP(winrt::Windows::UI::Xaml::ElementTheme, ElementTheme);
|
||||
DEFINE_ENUM_MAP(Model::NewTabPosition, NewTabPosition);
|
||||
DEFINE_ENUM_MAP(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabViewWidthMode);
|
||||
DEFINE_ENUM_MAP(Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope);
|
||||
DEFINE_ENUM_MAP(Model::FirstWindowPreference, FirstWindowPreference);
|
||||
DEFINE_ENUM_MAP(Model::LaunchMode, LaunchMode);
|
||||
DEFINE_ENUM_MAP(Model::TabSwitcherMode, TabSwitcherMode);
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Windows::UI::Xaml::ElementTheme> ElementTheme();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, NewTabPosition> NewTabPosition();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode> TabViewWidthMode();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::Terminal::Control::DefaultInputScope> DefaultInputScope();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, FirstWindowPreference> FirstWindowPreference();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, LaunchMode> LaunchMode();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, TabSwitcherMode> TabSwitcherMode();
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
static Windows.Foundation.Collections.IMap<String, Windows.UI.Xaml.ElementTheme> ElementTheme { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.NewTabPosition> NewTabPosition { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.UI.Xaml.Controls.TabViewWidthMode> TabViewWidthMode { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Control.DefaultInputScope> DefaultInputScope { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.FirstWindowPreference> FirstWindowPreference { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.LaunchMode> LaunchMode { get; };
|
||||
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.TabSwitcherMode> TabSwitcherMode { get; };
|
||||
|
||||
@@ -269,6 +269,10 @@ Json::Value GlobalAppSettings::ToJson()
|
||||
{
|
||||
_TextMeasurement.reset();
|
||||
}
|
||||
if (_DefaultInputScope == Control::DefaultInputScope::Default)
|
||||
{
|
||||
_DefaultInputScope.reset();
|
||||
}
|
||||
|
||||
if (_DisablePartialInvalidation == false)
|
||||
{
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
INHERITABLE_SETTING(Boolean, TrimPaste);
|
||||
INHERITABLE_SETTING(LaunchPosition, InitialPosition);
|
||||
INHERITABLE_SETTING(Boolean, CenterOnLaunch);
|
||||
INHERITABLE_SETTING(Microsoft.Terminal.Control.DefaultInputScope, DefaultInputScope);
|
||||
INHERITABLE_SETTING(FirstWindowPreference, FirstWindowPreference);
|
||||
INHERITABLE_SETTING(LaunchMode, LaunchMode);
|
||||
INHERITABLE_SETTING(Boolean, SnapToGridOnResize);
|
||||
|
||||
@@ -28,6 +28,7 @@ Author(s):
|
||||
X(bool, DisablePartialInvalidation, "rendering.disablePartialInvalidation", false) \
|
||||
X(bool, SoftwareRendering, "rendering.software", false) \
|
||||
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) \
|
||||
|
||||
@@ -368,6 +368,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
_DisablePartialInvalidation = globalSettings.DisablePartialInvalidation();
|
||||
_SoftwareRendering = globalSettings.SoftwareRendering();
|
||||
_TextMeasurement = globalSettings.TextMeasurement();
|
||||
_DefaultInputScope = globalSettings.DefaultInputScope();
|
||||
_UseBackgroundImageForWindow = globalSettings.UseBackgroundImageForWindow();
|
||||
_ForceVTInput = globalSettings.ForceVTInput();
|
||||
_TrimBlockSelection = globalSettings.TrimBlockSelection();
|
||||
|
||||
@@ -161,6 +161,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, bool, DisablePartialInvalidation, false);
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, bool, SoftwareRendering, false);
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, Microsoft::Terminal::Control::TextMeasurement, TextMeasurement);
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope);
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, bool, UseBackgroundImageForWindow, false);
|
||||
INHERITABLE_SETTING(Model::TerminalSettings, bool, ForceVTInput, false);
|
||||
|
||||
|
||||
@@ -782,3 +782,11 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Control::TextMeasurement)
|
||||
pair_type{ "console", ValueType::Console },
|
||||
};
|
||||
};
|
||||
|
||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Control::DefaultInputScope)
|
||||
{
|
||||
JSON_MAPPINGS(2) = {
|
||||
pair_type{ "default", ValueType::Default },
|
||||
pair_type{ "alphanumericHalfWidth", ValueType::AlphanumericHalfWidth },
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"action": "experimental.colorSelection"
|
||||
// default fg and bg (i07 and i00)
|
||||
},
|
||||
"keys": "alt+1"
|
||||
"keys": "alt+1",
|
||||
"id": "Terminal.ColorSelectionDefaultFgAndBg"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -16,7 +17,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i08"
|
||||
},
|
||||
"keys": "alt+2"
|
||||
"keys": "alt+2",
|
||||
"id": "Terminal.ColorSelectionFgIndex8"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -24,7 +26,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0c"
|
||||
},
|
||||
"keys": "alt+3"
|
||||
"keys": "alt+3",
|
||||
"id": "Terminal.ColorSelectionFgIndex12"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -32,7 +35,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0a"
|
||||
},
|
||||
"keys": "alt+4"
|
||||
"keys": "alt+4",
|
||||
"id": "Terminal.ColorSelectionFgIndex10"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -40,7 +44,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0e"
|
||||
},
|
||||
"keys": "alt+5"
|
||||
"keys": "alt+5",
|
||||
"id": "Terminal.ColorSelectionFgIndex14"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -48,7 +53,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i09"
|
||||
},
|
||||
"keys": "alt+6"
|
||||
"keys": "alt+6",
|
||||
"id": "Terminal.ColorSelectionFgIndex9"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -56,7 +62,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0d"
|
||||
},
|
||||
"keys": "alt+7"
|
||||
"keys": "alt+7",
|
||||
"id": "Terminal.ColorSelectionFgIndex13"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -64,7 +71,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0b"
|
||||
},
|
||||
"keys": "alt+8"
|
||||
"keys": "alt+8",
|
||||
"id": "Terminal.ColorSelectionFgIndex11"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -72,7 +80,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i0f"
|
||||
},
|
||||
"keys": "alt+9"
|
||||
"keys": "alt+9",
|
||||
"id": "Terminal.ColorSelectionFgIndex15"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -80,7 +89,8 @@
|
||||
"action": "experimental.colorSelection",
|
||||
"foreground": "i03"
|
||||
},
|
||||
"keys": "alt+0"
|
||||
"keys": "alt+0",
|
||||
"id": "Terminal.ColorSelectionFgIndex3"
|
||||
},
|
||||
// background
|
||||
{
|
||||
@@ -90,7 +100,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i07"
|
||||
},
|
||||
"keys": "ctrl+1"
|
||||
"keys": "ctrl+1",
|
||||
"id": "Terminal.ColorSelectionBgIndex7"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -99,7 +110,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i08"
|
||||
},
|
||||
"keys": "ctrl+2"
|
||||
"keys": "ctrl+2",
|
||||
"id": "Terminal.ColorSelectionBgIndex8"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -108,7 +120,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0c"
|
||||
},
|
||||
"keys": "ctrl+3"
|
||||
"keys": "ctrl+3",
|
||||
"id": "Terminal.ColorSelectionBgIndex12"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -117,7 +130,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0a"
|
||||
},
|
||||
"keys": "ctrl+4"
|
||||
"keys": "ctrl+4",
|
||||
"id": "Terminal.ColorSelectionBgIndex10"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -126,7 +140,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0e"
|
||||
},
|
||||
"keys": "ctrl+5"
|
||||
"keys": "ctrl+5",
|
||||
"id": "Terminal.ColorSelectionBgIndex14"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -135,7 +150,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i09"
|
||||
},
|
||||
"keys": "ctrl+6"
|
||||
"keys": "ctrl+6",
|
||||
"id": "Terminal.ColorSelectionBgIndex9"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -144,7 +160,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0d"
|
||||
},
|
||||
"keys": "ctrl+7"
|
||||
"keys": "ctrl+7",
|
||||
"id": "Terminal.ColorSelectionBgIndex13"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -153,7 +170,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0b"
|
||||
},
|
||||
"keys": "ctrl+8"
|
||||
"keys": "ctrl+8",
|
||||
"id": "Terminal.ColorSelectionBgIndex11"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -162,7 +180,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0f"
|
||||
},
|
||||
"keys": "ctrl+9"
|
||||
"keys": "ctrl+9",
|
||||
"id": "Terminal.ColorSelectionBgIndex15"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -171,7 +190,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i03"
|
||||
},
|
||||
"keys": "ctrl+0"
|
||||
"keys": "ctrl+0",
|
||||
"id": "Terminal.ColorSelectionBgIndex3"
|
||||
},
|
||||
// with matching
|
||||
// Foreground, all matches
|
||||
@@ -182,7 +202,8 @@
|
||||
"matchMode": "all",
|
||||
// default fg and bg (i07 and i00)
|
||||
},
|
||||
"keys": "alt+shift+1"
|
||||
"keys": "alt+shift+1",
|
||||
"id": "Terminal.ColorSelectionMatchDefaultFgAndBg"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -191,7 +212,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i08"
|
||||
},
|
||||
"keys": "alt+shift+2"
|
||||
"keys": "alt+shift+2",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex8"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -200,7 +222,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0c"
|
||||
},
|
||||
"keys": "alt+shift+3"
|
||||
"keys": "alt+shift+3",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex12"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -209,7 +232,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0a"
|
||||
},
|
||||
"keys": "alt+shift+4"
|
||||
"keys": "alt+shift+4",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex10"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -218,7 +242,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0e"
|
||||
},
|
||||
"keys": "alt+shift+5"
|
||||
"keys": "alt+shift+5",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex14"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -227,7 +252,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i09"
|
||||
},
|
||||
"keys": "alt+shift+6"
|
||||
"keys": "alt+shift+6",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex9"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -236,7 +262,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0d"
|
||||
},
|
||||
"keys": "alt+shift+7"
|
||||
"keys": "alt+shift+7",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex13"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -245,7 +272,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0b"
|
||||
},
|
||||
"keys": "alt+shift+8"
|
||||
"keys": "alt+shift+8",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex11"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -254,7 +282,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i0f"
|
||||
},
|
||||
"keys": "alt+shift+9"
|
||||
"keys": "alt+shift+9",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex15"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -263,7 +292,8 @@
|
||||
"matchMode": "all",
|
||||
"foreground": "i03"
|
||||
},
|
||||
"keys": "alt+shift+0"
|
||||
"keys": "alt+shift+0",
|
||||
"id": "Terminal.ColorSelectionMatchFgIndex3"
|
||||
},
|
||||
// background, all matches
|
||||
{
|
||||
@@ -274,7 +304,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i07"
|
||||
},
|
||||
"keys": "ctrl+shift+1"
|
||||
"keys": "ctrl+shift+1",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex7"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -284,7 +315,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i08"
|
||||
},
|
||||
"keys": "ctrl+shift+2"
|
||||
"keys": "ctrl+shift+2",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex8"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -294,7 +326,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0c"
|
||||
},
|
||||
"keys": "ctrl+shift+3"
|
||||
"keys": "ctrl+shift+3",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex12"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -304,7 +337,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0a"
|
||||
},
|
||||
"keys": "ctrl+shift+4"
|
||||
"keys": "ctrl+shift+4",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex10"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -314,7 +348,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0e"
|
||||
},
|
||||
"keys": "ctrl+shift+5"
|
||||
"keys": "ctrl+shift+5",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex14"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -324,7 +359,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i09"
|
||||
},
|
||||
"keys": "ctrl+shift+6"
|
||||
"keys": "ctrl+shift+6",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex9"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -334,7 +370,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0d"
|
||||
},
|
||||
"keys": "ctrl+shift+7"
|
||||
"keys": "ctrl+shift+7",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex13"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -344,7 +381,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0b"
|
||||
},
|
||||
"keys": "ctrl+shift+8"
|
||||
"keys": "ctrl+shift+8",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex11"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -354,7 +392,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i0f"
|
||||
},
|
||||
"keys": "ctrl+shift+9"
|
||||
"keys": "ctrl+shift+9",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex15"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
@@ -364,7 +403,8 @@
|
||||
"foreground": "i00",
|
||||
"background": "i03"
|
||||
},
|
||||
"keys": "ctrl+shift+0"
|
||||
"keys": "ctrl+shift+0",
|
||||
"id": "Terminal.ColorSelectionMatchBgIndex3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -304,9 +304,9 @@ namespace ControlUnitTests
|
||||
|
||||
Log::Comment(L"Check the buffer after the clear");
|
||||
VERIFY_ARE_EQUAL(20, core->_terminal->GetViewport().Height());
|
||||
VERIFY_ARE_EQUAL(21, core->ScrollOffset());
|
||||
VERIFY_ARE_EQUAL(41, core->ScrollOffset());
|
||||
VERIFY_ARE_EQUAL(20, core->ViewHeight());
|
||||
VERIFY_ARE_EQUAL(41, core->BufferHeight());
|
||||
VERIFY_ARE_EQUAL(61, core->BufferHeight());
|
||||
|
||||
// In this test, we can't actually check if we cleared the buffer
|
||||
// contents. ConPTY will handle the actual clearing of the buffer
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>WindowsApp.lib;WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>WindowsApp.lib;winmm.Lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
|
||||
@@ -1181,11 +1181,23 @@ void AppHost::_IsQuakeWindowChanged(const winrt::Windows::Foundation::IInspectab
|
||||
// Raised from our Peasant. We handle by propagating the call to our terminal window.
|
||||
void AppHost::_QuitRequested(const winrt::Windows::Foundation::IInspectable&, const winrt::Windows::Foundation::IInspectable&)
|
||||
{
|
||||
const auto root = _windowLogic.GetRoot();
|
||||
if (!root)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const auto dispatcher = root.Dispatcher();
|
||||
if (!dispatcher)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// We process the shutdown synchronously here, because otherwise the
|
||||
// AutomaticShutdownRequested() logic wouldn't run synchronously either.
|
||||
til::latch latch{ 1 };
|
||||
|
||||
_windowLogic.GetRoot().Dispatcher().RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [&latch, weakThis = weak_from_this()]() {
|
||||
dispatcher.RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [&latch, weakThis = weak_from_this()]() {
|
||||
const auto countDownOnExit = wil::scope_exit([&latch] {
|
||||
latch.count_down();
|
||||
});
|
||||
|
||||
@@ -510,6 +510,15 @@ long IslandWindow::_calculateTotalSize(const bool isWidth, const long clientSize
|
||||
_HandleCreateWindow(wparam, lparam);
|
||||
return 0;
|
||||
}
|
||||
case WM_ENABLE:
|
||||
{
|
||||
if (_interopWindowHandle != nullptr)
|
||||
{
|
||||
// send focus to the child window
|
||||
SetFocus(_interopWindowHandle);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_SETFOCUS:
|
||||
{
|
||||
if (_interopWindowHandle != nullptr)
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
X(bool, DisablePartialInvalidation, false) \
|
||||
X(bool, SoftwareRendering, false) \
|
||||
X(winrt::Microsoft::Terminal::Control::TextMeasurement, TextMeasurement) \
|
||||
X(winrt::Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope, winrt::Microsoft::Terminal::Control::DefaultInputScope::Default) \
|
||||
X(bool, UseBackgroundImageForWindow, false) \
|
||||
X(bool, ShowMarks, false) \
|
||||
X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, 0) \
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
<alwaysEnabledBrandingTokens>
|
||||
<brandingToken>Dev</brandingToken>
|
||||
<brandingToken>Canary</brandingToken>
|
||||
<brandingToken>Preview</brandingToken>
|
||||
</alwaysEnabledBrandingTokens>
|
||||
</feature>
|
||||
|
||||
@@ -174,6 +175,7 @@
|
||||
<alwaysEnabledBrandingTokens>
|
||||
<brandingToken>Dev</brandingToken>
|
||||
<brandingToken>Canary</brandingToken>
|
||||
<brandingToken>Preview</brandingToken>
|
||||
</alwaysEnabledBrandingTokens>
|
||||
</feature>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "output.h"
|
||||
#include "handle.h"
|
||||
#include "_stream.h"
|
||||
#include "../interactivity/inc/ServiceLocator.hpp"
|
||||
|
||||
using namespace Microsoft::Console;
|
||||
@@ -74,8 +75,6 @@ void PtySignalInputThread::ConnectConsole() noexcept
|
||||
{
|
||||
_DoShowHide(*_initialShowHide);
|
||||
}
|
||||
|
||||
// We should have successfully used the _earlyReparent message in CreatePseudoWindow.
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -87,8 +86,7 @@ void PtySignalInputThread::ConnectConsole() noexcept
|
||||
// - Refer to GH#13066 for details.
|
||||
void PtySignalInputThread::CreatePseudoWindow()
|
||||
{
|
||||
HWND owner = _earlyReparent.has_value() ? reinterpret_cast<HWND>((*_earlyReparent).handle) : HWND_DESKTOP;
|
||||
ServiceLocator::LocatePseudoWindow(owner);
|
||||
ServiceLocator::LocatePseudoWindow();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -197,7 +195,9 @@ void PtySignalInputThread::_DoClearBuffer() const
|
||||
}
|
||||
|
||||
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
|
||||
THROW_IF_FAILED(gci.GetActiveOutputBuffer().ClearBuffer());
|
||||
auto& screenInfo = gci.GetActiveOutputBuffer();
|
||||
auto& stateMachine = screenInfo.GetStateMachine();
|
||||
stateMachine.ProcessString(L"\x1b[H\x1b[2J");
|
||||
}
|
||||
|
||||
void PtySignalInputThread::_DoShowHide(const ShowHideData& data)
|
||||
@@ -220,7 +220,7 @@ void PtySignalInputThread::_DoShowHide(const ShowHideData& data)
|
||||
return;
|
||||
}
|
||||
|
||||
_api.ShowWindow(data.show);
|
||||
ServiceLocator::SetPseudoWindowVisibility(data.show);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -237,44 +237,7 @@ void PtySignalInputThread::_DoSetWindowParent(const SetParentData& data)
|
||||
LockConsole();
|
||||
auto Unlock = wil::scope_exit([&] { UnlockConsole(); });
|
||||
|
||||
// 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));
|
||||
}
|
||||
ServiceLocator::SetPseudoWindowOwner(reinterpret_cast<HWND>(data.handle));
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
|
||||
@@ -75,8 +75,5 @@ namespace Microsoft::Console
|
||||
std::optional<ResizeWindowData> _earlyResize;
|
||||
std::optional<ShowHideData> _initialShowHide;
|
||||
ConhostInternalGetSet _api;
|
||||
|
||||
public:
|
||||
std::optional<SetParentData> _earlyReparent;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <til/unicode.h>
|
||||
|
||||
#include "directio.h"
|
||||
#include "handle.h" // LockConsole
|
||||
#include "output.h" // CloseConsoleProcessState
|
||||
#include "../interactivity/inc/ServiceLocator.hpp"
|
||||
@@ -790,3 +791,51 @@ void VtIo::Writer::WriteInfos(til::point target, std::span<const CHAR_INFO> info
|
||||
} while (--repeat);
|
||||
}
|
||||
}
|
||||
|
||||
void VtIo::Writer::WriteScreenInfo(SCREEN_INFORMATION& newContext, til::size oldSize) const
|
||||
{
|
||||
const auto area = static_cast<size_t>(oldSize.width * oldSize.height);
|
||||
|
||||
auto& main = newContext.GetMainBuffer();
|
||||
auto& alt = newContext.GetActiveBuffer();
|
||||
const auto hasAltBuffer = &alt != &main;
|
||||
|
||||
// TODO GH#5094: This could use xterm's XTWINOPS "\e[8;<height>;<width>t" escape sequence here.
|
||||
if (oldSize != main.GetBufferSize().Dimensions())
|
||||
{
|
||||
THROW_IF_NTSTATUS_FAILED(main.ResizeTraditional(oldSize));
|
||||
main.SetViewportSize(&oldSize);
|
||||
}
|
||||
if (hasAltBuffer && oldSize != alt.GetBufferSize().Dimensions())
|
||||
{
|
||||
THROW_IF_NTSTATUS_FAILED(alt.ResizeTraditional(oldSize));
|
||||
alt.SetViewportSize(&oldSize);
|
||||
}
|
||||
|
||||
const auto request = Viewport::FromDimensions({}, oldSize);
|
||||
Viewport read;
|
||||
til::small_vector<CHAR_INFO, 1024> infos;
|
||||
infos.resize(area, CHAR_INFO{ L' ', FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED });
|
||||
|
||||
const auto dumpScreenInfo = [&](SCREEN_INFORMATION& screenInfo) {
|
||||
THROW_IF_FAILED(ReadConsoleOutputWImplHelper(screenInfo, infos, request, read));
|
||||
for (til::CoordType i = 0; i < oldSize.height; i++)
|
||||
{
|
||||
WriteInfos({ 0, i }, { infos.begin() + i * oldSize.width, static_cast<size_t>(oldSize.width) });
|
||||
}
|
||||
|
||||
WriteCUP(screenInfo.GetTextBuffer().GetCursor().GetPosition());
|
||||
WriteAttributes(screenInfo.GetAttributes());
|
||||
WriteDECTCEM(screenInfo.GetTextBuffer().GetCursor().IsVisible());
|
||||
WriteDECAWM(WI_IsFlagSet(screenInfo.OutputMode, ENABLE_WRAP_AT_EOL_OUTPUT));
|
||||
};
|
||||
|
||||
WriteASB(false);
|
||||
dumpScreenInfo(main);
|
||||
|
||||
if (hasAltBuffer)
|
||||
{
|
||||
WriteASB(true);
|
||||
dumpScreenInfo(alt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace Microsoft::Console::VirtualTerminal
|
||||
void WriteWindowTitle(std::wstring_view title) const;
|
||||
void WriteAttributes(const TextAttribute& attributes) const;
|
||||
void WriteInfos(til::point target, std::span<const CHAR_INFO> infos) const;
|
||||
void WriteScreenInfo(SCREEN_INFORMATION& newContext, til::size oldSize) const;
|
||||
|
||||
private:
|
||||
VtIo* _io = nullptr;
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AllowIsolation>true</AllowIsolation>
|
||||
<AdditionalDependencies>WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.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;clang_rt.fuzzer_MT-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;clang_rt.fuzzer_MT-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
|
||||
@@ -487,49 +487,8 @@ void ApiRoutines::SetConsoleActiveScreenBufferImpl(SCREEN_INFORMATION& newContex
|
||||
|
||||
if (auto writer = gci.GetVtWriter())
|
||||
{
|
||||
const auto viewport = gci.GetActiveOutputBuffer().GetBufferSize();
|
||||
const auto size = viewport.Dimensions();
|
||||
const auto area = static_cast<size_t>(viewport.Width() * viewport.Height());
|
||||
|
||||
auto& main = newContext.GetMainBuffer();
|
||||
auto& alt = newContext.GetActiveBuffer();
|
||||
const auto hasAltBuffer = &alt != &main;
|
||||
|
||||
// TODO GH#5094: This could use xterm's XTWINOPS "\e[8;<height>;<width>t" escape sequence here.
|
||||
THROW_IF_NTSTATUS_FAILED(main.ResizeTraditional(size));
|
||||
main.SetViewportSize(&size);
|
||||
if (hasAltBuffer)
|
||||
{
|
||||
THROW_IF_NTSTATUS_FAILED(alt.ResizeTraditional(size));
|
||||
alt.SetViewportSize(&size);
|
||||
}
|
||||
|
||||
Viewport read;
|
||||
til::small_vector<CHAR_INFO, 1024> infos;
|
||||
infos.resize(area, CHAR_INFO{ L' ', FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED });
|
||||
|
||||
const auto dumpScreenInfo = [&](SCREEN_INFORMATION& screenInfo) {
|
||||
THROW_IF_FAILED(ReadConsoleOutputWImpl(screenInfo, infos, viewport, read));
|
||||
for (til::CoordType i = 0; i < size.height; i++)
|
||||
{
|
||||
writer.WriteInfos({ 0, i }, { infos.begin() + i * size.width, static_cast<size_t>(size.width) });
|
||||
}
|
||||
|
||||
writer.WriteCUP(screenInfo.GetTextBuffer().GetCursor().GetPosition());
|
||||
writer.WriteAttributes(screenInfo.GetAttributes());
|
||||
writer.WriteDECTCEM(screenInfo.GetTextBuffer().GetCursor().IsVisible());
|
||||
writer.WriteDECAWM(WI_IsFlagSet(screenInfo.OutputMode, ENABLE_WRAP_AT_EOL_OUTPUT));
|
||||
};
|
||||
|
||||
writer.WriteASB(false);
|
||||
dumpScreenInfo(main);
|
||||
|
||||
if (hasAltBuffer)
|
||||
{
|
||||
writer.WriteASB(true);
|
||||
dumpScreenInfo(alt);
|
||||
}
|
||||
|
||||
const auto oldSize = gci.GetActiveOutputBuffer().GetBufferSize().Dimensions();
|
||||
writer.WriteScreenInfo(newContext, oldSize);
|
||||
writer.Submit();
|
||||
}
|
||||
|
||||
@@ -995,7 +954,9 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
|
||||
try
|
||||
{
|
||||
// Just in case if the client application didn't check if this request is useless.
|
||||
if (source.left == target.x && source.top == target.y)
|
||||
// Checking if the source is empty also prevents bugs where we use the size of calculations.
|
||||
if ((source.left == target.x && source.top == target.y) ||
|
||||
source.left > source.right || source.top > source.bottom)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1044,23 +1005,23 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
|
||||
|
||||
if (gci.GetVtIo()->GetDeviceAttributes().test(Microsoft::Console::VirtualTerminal::DeviceAttribute::RectangularAreaOperations))
|
||||
{
|
||||
// This calculates just the positive offsets caused by out-of-bounds (OOB) source and target coordinates.
|
||||
//
|
||||
// If the source rectangle is OOB to the bottom-right, then the size of the rectangle that can
|
||||
// be copied shrinks, but its origin stays the same. However, if the rectangle is OOB to the
|
||||
// top-left then the origin of the to-be-copied rectangle will be offset by an inverse amount.
|
||||
// Similarly, if the *target* rectangle is OOB to the bottom-right, its size shrinks while
|
||||
// the origin stays the same, and if it's OOB to the top-left, then the origin is offset.
|
||||
//
|
||||
// In other words, this calculates the total offset that needs to be applied to the to-be-copied rectangle.
|
||||
// Later down below we'll then clamp that rectangle which will cause its size to shrink as needed.
|
||||
const til::point offset{
|
||||
std::max(0, -source.left) + std::max(0, clipViewport.Left() - target.x),
|
||||
std::max(0, -source.top) + std::max(0, clipViewport.Top() - target.y),
|
||||
};
|
||||
const til::point targetSourceDistance{ target - sourceViewport.Origin() };
|
||||
const til::point sourceTargetDistance{ -targetSourceDistance.x, -targetSourceDistance.y };
|
||||
|
||||
const auto copyTargetViewport = Viewport::FromDimensions(target + offset, sourceViewport.Dimensions()).Clamp(clipViewport);
|
||||
const auto copySourceViewport = Viewport::FromDimensions(sourceViewport.Origin() + offset, copyTargetViewport.Dimensions()).Clamp(bufferSize);
|
||||
// To figure out what part of "source" we can copy to "target" without
|
||||
// * reading outside the bufferSize
|
||||
// * writing outside the clipViewport
|
||||
// we move the clipViewport into a coordinate system relative to the source rectangle (= clipAtSource).
|
||||
// Then we can intersect the source rectangle with both the valid bufferSize and clipAtSource at once.
|
||||
const auto clipAtSource = Viewport::Offset(clipViewport, sourceTargetDistance);
|
||||
auto copySourceViewport = sourceViewport.Clamp(bufferSize).Clamp(clipAtSource);
|
||||
if (!copySourceViewport.IsValid())
|
||||
{
|
||||
copySourceViewport = Viewport::Empty();
|
||||
}
|
||||
|
||||
// Afterward we can undo the translation of clipAtSource to get the target rectangle.
|
||||
const auto copyTargetViewport = Viewport::Offset(copySourceViewport, targetSourceDistance);
|
||||
const auto fills = Viewport::Subtract(fillViewport, copyTargetViewport);
|
||||
std::wstring buf;
|
||||
|
||||
@@ -1069,7 +1030,7 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
|
||||
Microsoft::Console::VirtualTerminal::VtIo::FormatAttributes(buf, TextAttribute{ fillAttribute });
|
||||
}
|
||||
|
||||
if (copySourceViewport.IsValid() && copyTargetViewport.IsValid())
|
||||
if (copyTargetViewport.IsValid())
|
||||
{
|
||||
// DECCRA: Copy Rectangular Area
|
||||
fmt::format_to(
|
||||
|
||||
@@ -208,8 +208,14 @@ CursorType ConhostInternalGetSet::GetUserDefaultCursorStyle() const
|
||||
// - <none>
|
||||
void ConhostInternalGetSet::ShowWindow(bool showOrHide)
|
||||
{
|
||||
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
|
||||
const auto hwnd = gci.IsInVtIoMode() ? ServiceLocator::LocatePseudoWindow() : ServiceLocator::LocateConsoleWindow()->GetWindowHandle();
|
||||
// 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;
|
||||
}
|
||||
|
||||
// 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
|
||||
@@ -217,6 +223,7 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1267,17 +1267,30 @@ COOKED_READ_DATA::LayoutResult COOKED_READ_DATA::_layoutLine(std::wstring& outpu
|
||||
output.append(text, 0, len);
|
||||
column += cols;
|
||||
it += len;
|
||||
|
||||
if (it != nextControlChar)
|
||||
{
|
||||
// The only reason that not all text could be fit into the line is if the last character was a wide glyph.
|
||||
// In that case we want to return the columnLimit, to indicate that the row is full and a line wrap is required,
|
||||
// BUT DON'T want to pad the line with a whitespace to actually fill the line to the columnLimit.
|
||||
// This is because copying the prompt contents (Ctrl-A, Ctrl-C) should not copy any trailing padding whitespace.
|
||||
//
|
||||
// Thanks to this lie, the _redisplay() code will not use a CRLF sequence or similar to move to the next line,
|
||||
// as it thinks that this row has naturally wrapped. This causes it to print the wide glyph on the preceding line
|
||||
// which causes the terminal to insert the padding whitespace for us.
|
||||
column = columnLimit;
|
||||
break;
|
||||
}
|
||||
|
||||
if (column >= columnLimit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const auto nextPlainChar = std::find_if(it, end, [](const auto& wch) { return wch >= L' '; });
|
||||
for (; it != nextPlainChar; ++it)
|
||||
{
|
||||
if (column >= columnLimit)
|
||||
{
|
||||
column = columnLimit;
|
||||
goto outerLoopExit;
|
||||
}
|
||||
|
||||
const auto wch = *it;
|
||||
wchar_t buf[8];
|
||||
til::CoordType len = 0;
|
||||
@@ -1297,11 +1310,20 @@ COOKED_READ_DATA::LayoutResult COOKED_READ_DATA::_layoutLine(std::wstring& outpu
|
||||
|
||||
if (column + len > columnLimit)
|
||||
{
|
||||
// Unlike above with regular text we can't avoid padding the line with whitespace, because a string
|
||||
// like "^A" is not a wide glyph, and so we cannot trick the terminal to insert the padding for us.
|
||||
output.append(columnLimit - column, L' ');
|
||||
column = columnLimit;
|
||||
goto outerLoopExit;
|
||||
}
|
||||
|
||||
output.append(buf, len);
|
||||
column += len;
|
||||
|
||||
if (column >= columnLimit)
|
||||
{
|
||||
goto outerLoopExit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2129,38 +2129,6 @@ void SCREEN_INFORMATION::SetViewport(const Viewport& newViewport,
|
||||
Tracing::s_TraceWindowViewport(_viewport);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Clear the entire contents of the viewport, except for the cursor's row,
|
||||
// which is moved to the top line of the viewport.
|
||||
// - This is used exclusively by ConPTY to support GH#1193, GH#1882. This allows
|
||||
// a terminal to clear the contents of the ConPTY buffer, which is important
|
||||
// if the user would like to be able to clear the terminal-side buffer.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - S_OK
|
||||
[[nodiscard]] HRESULT SCREEN_INFORMATION::ClearBuffer()
|
||||
{
|
||||
// Rotate the buffer to bring the cursor row to the top of the viewport.
|
||||
const auto cursorPos = _textBuffer->GetCursor().GetPosition();
|
||||
for (auto i = 0; i < cursorPos.y; i++)
|
||||
{
|
||||
_textBuffer->IncrementCircularBuffer();
|
||||
}
|
||||
|
||||
// Erase everything below that point.
|
||||
RETURN_IF_FAILED(SetCursorPosition({ 0, 1 }, false));
|
||||
auto& engine = reinterpret_cast<OutputStateMachineEngine&>(_stateMachine->Engine());
|
||||
engine.Dispatch().EraseInDisplay(DispatchTypes::EraseType::ToEnd);
|
||||
|
||||
// Restore the original cursor x offset, but now on the first row.
|
||||
RETURN_IF_FAILED(SetCursorPosition({ cursorPos.x, 0 }, false));
|
||||
|
||||
_textBuffer->TriggerRedrawAll();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Writes cells to the output buffer at the cursor position.
|
||||
// Arguments:
|
||||
|
||||
@@ -203,8 +203,6 @@ public:
|
||||
void SetDefaultAttributes(const TextAttribute& attributes,
|
||||
const TextAttribute& popupAttributes);
|
||||
|
||||
[[nodiscard]] HRESULT ClearBuffer();
|
||||
|
||||
void UpdateBottom();
|
||||
|
||||
FontInfo& GetCurrentFont() noexcept;
|
||||
|
||||
@@ -36,7 +36,7 @@ Settings::Settings() :
|
||||
_bAutoPosition(true),
|
||||
_uHistoryBufferSize(DEFAULT_NUMBER_OF_COMMANDS),
|
||||
_uNumberOfHistoryBuffers(DEFAULT_NUMBER_OF_BUFFERS),
|
||||
_bHistoryNoDup(false),
|
||||
_bHistoryNoDup(true),
|
||||
// ColorTable initialized below
|
||||
_uCodePage(ServiceLocator::LocateGlobals().uiOEMCP),
|
||||
_uScrollScale(1),
|
||||
@@ -110,7 +110,7 @@ void Settings::ApplyDesktopSpecificDefaults()
|
||||
_bQuickEdit = TRUE;
|
||||
_uHistoryBufferSize = 50;
|
||||
_uNumberOfHistoryBuffers = 4;
|
||||
_bHistoryNoDup = FALSE;
|
||||
_bHistoryNoDup = true;
|
||||
|
||||
_renderSettings.ResetColorTable();
|
||||
|
||||
@@ -349,6 +349,8 @@ void Settings::Validate()
|
||||
TextAttribute::SetLegacyDefaultAttributes(_wFillAttribute);
|
||||
// And calculate the position of the default colors in the color table.
|
||||
CalculateDefaultColorIndices();
|
||||
// We can also then save these values as the default render settings.
|
||||
SaveDefaultRenderSettings();
|
||||
|
||||
FAIL_FAST_IF(!(_dwWindowSize.X > 0));
|
||||
FAIL_FAST_IF(!(_dwWindowSize.Y > 0));
|
||||
@@ -755,6 +757,11 @@ void Settings::CalculateDefaultColorIndices() noexcept
|
||||
_renderSettings.SetColorAliasIndex(ColorAlias::DefaultBackground, backgroundAlias);
|
||||
}
|
||||
|
||||
void Settings::SaveDefaultRenderSettings() noexcept
|
||||
{
|
||||
_renderSettings.SaveDefaultSettings();
|
||||
}
|
||||
|
||||
bool Settings::IsTerminalScrolling() const noexcept
|
||||
{
|
||||
return _TerminalScrolling;
|
||||
|
||||
@@ -172,6 +172,7 @@ public:
|
||||
void SetInterceptCopyPaste(const bool interceptCopyPaste) noexcept;
|
||||
|
||||
void CalculateDefaultColorIndices() noexcept;
|
||||
void SaveDefaultRenderSettings() noexcept;
|
||||
|
||||
bool IsTerminalScrolling() const noexcept;
|
||||
void SetTerminalScrolling(const bool terminalScrollingEnabled) noexcept;
|
||||
|
||||
@@ -132,6 +132,7 @@ 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 \
|
||||
@@ -195,6 +196,7 @@ 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; \
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<AdditionalIncludeDirectories>..;$(SolutionDir)src\inc;$(SolutionDir)src\inc\test;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>WinMM.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user