Merge remote-tracking branch 'origin/main' into dev/duhowett/fhl-2024/merge-idls

This commit is contained in:
Dustin L. Howett
2024-05-08 11:09:23 -05:00
299 changed files with 5716 additions and 8779 deletions

View File

@@ -80,6 +80,7 @@ mnt
mru
nje
noreply
notwrapped
ogonek
ok'd
overlined

View File

@@ -1,6 +1,8 @@
ACLs
ADMINS
advapi
akv
AKV
altform
altforms
appendwttlogging
@@ -14,6 +16,7 @@ autoexec
backplating
bitmaps
BOMs
checkcflags
COMPUTERNAME
CPLs
cpptools
@@ -101,3 +104,4 @@ wtl
wtt
wttlog
Xamarin
xfgcheck

View File

@@ -1,4 +1,3 @@
AAAa
AAAAA
AAAAAAAAAAAAA
AAAAAABBBBBBCCC

View File

@@ -10,6 +10,7 @@ ACCESSTOKEN
acidev
ACIOSS
ACover
acp
actctx
ACTCTXW
ADDALIAS
@@ -67,10 +68,10 @@ ASBSET
asdfghjkl
ASetting
ASingle
ASYNCDONTCARE
ASYNCWINDOWPOS
atch
ATest
ATTRCOLOR
aumid
Authenticode
AUTOBUDDY
@@ -124,8 +125,6 @@ Blt
BLUESCROLL
BODGY
BOLDFONT
BOOLIFY
bools
Borland
boutput
boxheader
@@ -156,7 +155,6 @@ cazamor
CBash
cbiex
CBN
CBoolean
cbt
CCCBB
cch
@@ -164,12 +162,9 @@ CCHAR
CCmd
ccolor
CCom
CComp
CConsole
CConversion
CCRT
cdd
CEdit
CELLSIZE
cfae
cfie
@@ -179,18 +174,17 @@ CFuzz
cgscrn
chafa
changelists
chaof
charinfo
CHARSETINFO
chh
chshdng
CHT
Cic
CLASSSTRING
CLE
cleartype
CLICKACTIVE
clickdown
CLIENTID
clipbrd
CLIPCHILDREN
CLIPSIBLINGS
@@ -229,7 +223,6 @@ commdlg
COMMITID
componentization
conapi
conareainfo
conattrs
conbufferout
concfg
@@ -240,8 +233,7 @@ condrv
conechokey
conemu
conhost
conime
conimeinfo
CONIME
conintegrity
conintegrityuwp
coninteractivitybase
@@ -253,6 +245,7 @@ CONKBD
conlibk
conmsgl
CONNECTINFO
connyection
CONOUT
conprops
conpropsp
@@ -279,7 +272,6 @@ contentfiles
conterm
contsf
contypes
convarea
conwinuserrefs
coordnew
COPYCOLOR
@@ -314,7 +306,6 @@ csrutil
CSTYLE
CSwitch
CTerminal
CText
ctl
ctlseqs
CTRLEVENT
@@ -322,7 +313,7 @@ CTRLFREQUENCY
CTRLKEYSHORTCUTS
Ctrls
CTRLVOLUME
Ctxt
CUAS
CUF
cupxy
CURRENTFONT
@@ -486,7 +477,6 @@ DISABLEDELAYEDEXPANSION
DISABLENOSCROLL
DISPATCHNOTIFY
DISPLAYATTRIBUTE
DISPLAYATTRIBUTEPROPERTY
DISPLAYCHANGE
distros
dlg
@@ -562,7 +552,6 @@ entrypoints
ENU
ENUMLOGFONT
ENUMLOGFONTEX
enumranges
EOK
EPres
EQU
@@ -621,7 +610,6 @@ FINDDOWN
FINDSTRINGEXACT
FINDUP
FIter
FIXEDCONVERTED
FIXEDFILEINFO
Flg
flyouts
@@ -736,9 +724,8 @@ Greyscale
gridline
gset
gsl
GTP
guc
guidatom
GUIDATOM
GValue
GWL
GWLP
@@ -837,7 +824,6 @@ IEnd
IEnum
IFACEMETHODIMP
ification
IGNOREEND
IGNORELANGUAGE
IHosted
iid
@@ -861,7 +847,6 @@ inkscape
INLINEPREFIX
inproc
Inputkeyinfo
INPUTPROCESSORPROFILE
Inputreadhandledata
INSERTMODE
INTERACTIVITYBASE
@@ -873,9 +858,7 @@ INVALIDARG
INVALIDATERECT
Ioctl
ipch
ipp
IProperty
IPSINK
ipsp
IShell
ISwap
@@ -895,7 +878,6 @@ JOBOBJECT
JOBOBJECTINFOCLASS
JPN
jsoncpp
Jsons
jsprovider
jumplist
KAttrs
@@ -925,6 +907,7 @@ KLMNOPQRSTY
KOK
KPRIORITY
KVM
kyouhaishaheiku
langid
LANGUAGELIST
lasterror
@@ -987,7 +970,6 @@ lpdw
lpelfe
lpfn
LPFNADDPROPSHEETPAGE
lpl
LPMEASUREITEMSTRUCT
LPMINMAXINFO
lpmsg
@@ -1063,6 +1045,7 @@ MENUITEMINFO
MENUSELECT
messageext
metaproj
Mgrs
microsoftpublicsymbols
midl
mii
@@ -1117,7 +1100,6 @@ muxes
myapplet
mybranch
mydir
MYMAX
Mypair
Myval
NAMELENGTH
@@ -1161,6 +1143,7 @@ NOCOPYBITS
NODUP
noexcepts
NOFONT
NOHIDDENTEXT
NOINTEGRALHEIGHT
NOINTERFACE
NOLINKINFO
@@ -1184,6 +1167,7 @@ NORMALDISPLAY
NOSCRATCH
NOSEARCH
noselect
NOSELECTION
NOSENDCHANGING
NOSIZE
NOSNAPSHOT
@@ -1274,6 +1258,7 @@ packageuwp
PACKAGEVERSIONNUMBER
PACKCOORD
PACKVERSION
pacp
pagedown
pageup
PAINTPARAMS
@@ -1285,7 +1270,6 @@ parms
PATCOPY
pathcch
PATTERNID
pcat
pcb
pcch
PCCHAR
@@ -1309,9 +1293,9 @@ PCSTR
PCWCH
PCWCHAR
PCWSTR
pda
pdbs
pdbstr
pdcs
PDPs
pdtobj
pdw
@@ -1341,6 +1325,7 @@ PIDLIST
pids
pii
piml
pimpl
pinvoke
pipename
pipestr
@@ -1372,7 +1357,6 @@ POSXSCROLL
POSYSCROLL
PPEB
ppf
ppguid
ppidl
PPROC
ppropvar
@@ -1402,7 +1386,7 @@ PROCESSINFOCLASS
PRODEXT
PROPERTYID
PROPERTYKEY
PROPERTYVAL
propertyval
propsheet
PROPSHEETHEADER
PROPSHEETPAGE
@@ -1434,8 +1418,11 @@ ptch
ptsz
PTYIn
PUCHAR
pvar
pwch
PWDDMCONSOLECONTEXT
Pwease
pweview
pws
pwstr
pwsz
@@ -1519,6 +1506,7 @@ rgn
rgp
rgpwsz
rgrc
rguid
rgw
RIGHTALIGN
RIGHTBUTTON
@@ -1526,6 +1514,7 @@ riid
RIS
roadmap
robomac
rodata
rosetta
RRF
rrr
@@ -1648,7 +1637,6 @@ sidebyside
SIF
SIGDN
Signtool
SINGLEFLAG
SINGLETHREADED
siup
sixel
@@ -1721,6 +1709,7 @@ SYMED
SYNCPAINT
syscalls
SYSCHAR
SYSCOLOR
SYSCOMMAND
SYSDEADCHAR
SYSKEYDOWN
@@ -1732,6 +1721,7 @@ sysparams
sysparamsext
SYSTEMHAND
SYSTEMMENU
SYSTEMTIME
tabview
TAdd
taef
@@ -1786,7 +1776,6 @@ TEXTMETRIC
TEXTMETRICW
textmode
texttests
TFCAT
TFunction
THUMBPOSITION
THUMBTRACK
@@ -1817,7 +1806,6 @@ Tpqrst
tracelogging
traceviewpp
trackbar
TRACKCOMPOSITION
trackpad
transitioning
Trd
@@ -1841,8 +1829,6 @@ TTM
TTo
tvpp
tvtseq
Txtev
typechecked
TYUI
UAC
uap
@@ -1860,10 +1846,8 @@ UIACCESS
uiacore
uiautomationcore
uielem
UIELEMENTENABLEDONLY
UINTs
ul
ulcch
uld
uldash
uldb
@@ -1917,6 +1901,7 @@ UVWXY
UVWXYZ
uwa
uwp
uwu
uxtheme
Vanara
vararg
@@ -1957,7 +1942,6 @@ vstest
VSTS
VSTT
vswhere
vtapi
vtapp
VTE
VTID
@@ -1991,6 +1975,7 @@ wdm
webpage
websites
wekyb
wewoad
wex
wextest
wextestclass
@@ -2020,7 +2005,6 @@ WINDOWALPHA
windowdpiapi
WINDOWEDGE
windowext
windowime
WINDOWINFO
windowio
windowmetrics
@@ -2071,7 +2055,6 @@ WNDCLASSW
Wndproc
WNegative
WNull
wnwb
workarea
WOutside
WOWARM
@@ -2110,7 +2093,6 @@ WTs
WTSOFTFONT
wtw
wtypes
Wubi
WUX
WVerify
WWith
@@ -2137,9 +2119,7 @@ xes
XFG
XFile
XFORM
xin
xinchaof
xinxinchaof
XIn
XManifest
XMath
xorg

View File

@@ -13,7 +13,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.5.0
- uses: actions/add-to-project@v1.0.1
with:
project-url: https://github.com/orgs/microsoft/projects/159
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

View File

@@ -171,6 +171,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Control.Lib", "src\cascadia\TerminalControl\TerminalControlLib.vcxproj", "{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}"
ProjectSection(ProjectDependencies) = postProject
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {1CF55140-EF6A-4736-A403-957E4F7430BB}
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {2FD12FBB-1DDB-46D8-B818-1023C624CACA}
{48D21369-3D7B-4431-9967-24E81292CF63} = {48D21369-3D7B-4431-9967-24E81292CF63}
{8222900C-8B6C-452A-91AC-BE95DB04B95F} = {8222900C-8B6C-452A-91AC-BE95DB04B95F}
{AF0A096A-8B3A-4949-81EF-7DF8F0FEE91F} = {AF0A096A-8B3A-4949-81EF-7DF8F0FEE91F}
@@ -412,7 +413,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TerminalStress", "src\tools
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingTests", "src\tools\RenderingTests\RenderingTests.vcxproj", "{37C995E0-2349-4154-8E77-4A52C0C7F46D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UIHelpers", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchcat", "src\tools\benchcat\benchcat.vcxproj", "{2C836962-9543-4CE5-B834-D28E1F124B66}"
EndProject
@@ -477,6 +478,7 @@ Global
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|ARM64.Build.0 = Debug|ARM64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.ActiveCfg = Debug|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.Build.0 = Debug|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.Deploy.0 = Debug|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x86.ActiveCfg = Debug|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x86.Build.0 = Debug|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Fuzzing|Any CPU.ActiveCfg = Fuzzing|Win32
@@ -2443,7 +2445,7 @@ Global
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
{4C8E6BB0-4713-4ADB-BD04-81628ECEAF20} = {81C352DB-1818-45B7-A284-18E259F1CC87}
{D57841D1-8294-4F2B-BB8B-D2A35738DECD} = {81C352DB-1818-45B7-A284-18E259F1CC87}
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
{3AE13314-1939-4DFA-9C14-38CA0834050C} = {F1995847-4AE5-479A-BBAF-382E51A63532}
{DCF55140-EF6A-4736-A403-957E4F7430BB} = {F1995847-4AE5-479A-BBAF-382E51A63532}
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {F1995847-4AE5-479A-BBAF-382E51A63532}

View File

@@ -51,12 +51,12 @@ steps:
git config --local core.autocrlf true
displayName: Prepare git submission environment
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
displayName: 'Touchdown Build - 7105, PRODEXT'
inputs:
teamId: 7105
authId: '$(TouchdownApplicationID)'
authKey: '$(TouchdownApplicationKey)'
TDBuildServiceConnection: $(TouchdownServiceConnection)
authType: SubjectNameIssuer
resourceFilePath: |
**\en-US\*.resw
Terminal.Internal\PDPs\Stable\PDPs\en-us\PDP.xml

View File

@@ -30,6 +30,13 @@ extends:
buildTerminal: true
pgoBuildMode: Optimize
codeSign: true
signingIdentity:
serviceName: $(SigningServiceName)
appId: $(SigningAppId)
tenantId: $(SigningTenantId)
akvName: $(SigningAKVName)
authCertName: $(SigningAuthCertName)
signCertName: $(SigningSignCertName)
publishSymbolsToPublic: true
publishVpackToWindows: false
symbolExpiryTime: 15

View File

@@ -78,6 +78,13 @@ extends:
buildConfigurations: ${{ parameters.buildConfigurations }}
buildPlatforms: ${{ parameters.buildPlatforms }}
codeSign: true
signingIdentity:
serviceName: $(SigningServiceName)
appId: $(SigningAppId)
tenantId: $(SigningTenantId)
akvName: $(SigningAKVName)
authCertName: $(SigningAuthCertName)
signCertName: $(SigningSignCertName)
terminalInternalPackageVersion: ${{ parameters.terminalInternalPackageVersion }}
publishSymbolsToPublic: ${{ parameters.publishSymbolsToPublic }}
publishVpackToWindows: ${{ parameters.publishVpackToWindows }}

View File

@@ -27,6 +27,9 @@ parameters:
- name: publishArtifacts
type: boolean
default: true
- name: signingIdentity
type: object
default: {}
jobs:
- job: ${{ parameters.jobName }}
@@ -97,10 +100,15 @@ jobs:
flattenFolders: true
- ${{ if eq(parameters.codeSign, true) }}:
- task: EsrpCodeSigning@3
- task: EsrpCodeSigning@5
displayName: Submit *.nupkg to ESRP for code signing
inputs:
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
Pattern: '*.nupkg'
UseMinimatch: true

View File

@@ -65,6 +65,9 @@ parameters:
- name: removeAllNonSignedFiles
type: boolean
default: false
- name: signingIdentity
type: object
default: {}
jobs:
- job: ${{ parameters.jobName }}
@@ -142,6 +145,10 @@ jobs:
- template: .\steps-restore-nuget.yml
- pwsh: |-
.\build\scripts\Set-LatestVCToolsVersion.ps1
displayName: Work around DD-1541167 (VCToolsVersion)
- ${{ parameters.beforeBuildSteps }}
- task: VSBuild@1
@@ -235,10 +242,15 @@ jobs:
# Code-sign everything we just put together.
# We run the signing in Terminal.BinDir, because all of the signing batches are relative to the final architecture/configuration output folder.
- task: EsrpCodeSigning@3
- task: EsrpCodeSigning@5
displayName: Submit Signing Request
inputs:
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
FolderPath: '$(Terminal.BinDir)'
signType: batchSigning
batchSignPolicyFile: '$(Build.SourcesDirectory)/ESRPSigningConfig.json'

View File

@@ -80,7 +80,7 @@ jobs:
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
displayName: Install Azure Module Dependencies
- task: AzureFileCopy@5
- task: AzureFileCopy@6
displayName: Publish to Storage Account
inputs:
sourcePath: _out/*

View File

@@ -32,6 +32,9 @@ parameters:
- name: afterBuildSteps
type: stepList
default: []
- name: signingIdentity
type: object
default: {}
jobs:
- job: ${{ parameters.jobName }}
@@ -94,10 +97,15 @@ jobs:
displayName: Create msixbundle
- ${{ if eq(parameters.codeSign, true) }}:
- task: EsrpCodeSigning@3
- task: EsrpCodeSigning@5
displayName: Submit *.msixbundle to ESRP for code signing
inputs:
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
FolderPath: $(System.ArtifactsDirectory)\bundle
Pattern: $(BundleStemName)*.msixbundle
UseMinimatch: true

View File

@@ -27,6 +27,9 @@ parameters:
- name: publishArtifacts
type: boolean
default: true
- name: signingIdentity
type: object
default: {}
jobs:
- job: ${{ parameters.jobName }}
@@ -82,10 +85,15 @@ jobs:
versionEnvVar: XES_PACKAGEVERSIONNUMBER
- ${{ if eq(parameters.codeSign, true) }}:
- task: EsrpCodeSigning@3
- task: EsrpCodeSigning@5
displayName: Submit *.nupkg to ESRP for code signing
inputs:
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
Pattern: '*.nupkg'
UseMinimatch: true

View File

@@ -33,7 +33,7 @@ parameters:
- arm64
- name: codeSign
type: boolean
default: true
default: false
- name: generateSbom
type: boolean
default: true

View File

@@ -60,6 +60,9 @@ parameters:
- name: extraPublishJobs
type: object
default: []
- name: signingIdentity
type: object
default: {}
resources:
repositories:
@@ -82,6 +85,7 @@ extends:
cloudvault: # https://aka.ms/obpipelines/cloudvault
enabled: false
globalSdl: # https://aka.ms/obpipelines/sdl
enableCheckCFlags: false # CheckCFlags is broken and exploding our builds; to remove, :g/BAD-FLAGS/d
asyncSdl:
enabled: true
tsaOptionsFile: 'build/config/tsa.json'
@@ -107,6 +111,8 @@ extends:
parameters:
pool: { type: windows }
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -122,6 +128,7 @@ extends:
generateSbom: false # this is handled by onebranch
removeAllNonSignedFiles: true # appease the overlords
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
@@ -141,6 +148,8 @@ extends:
parameters:
pool: { type: windows }
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -156,6 +165,7 @@ extends:
generateSbom: false # this is handled by onebranch
removeAllNonSignedFiles: true # appease the overlords
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
beforeBuildSteps:
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
@@ -172,6 +182,8 @@ extends:
parameters:
pool: { type: windows }
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -207,6 +219,7 @@ extends:
buildPlatforms: ${{ parameters.buildPlatforms }}
generateSbom: false # Handled by onebranch
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
afterBuildSteps:
# This directory has to exist, even if we aren't using createvpack, because the Guardian rules demand it.
- pwsh: |-
@@ -223,6 +236,8 @@ extends:
parameters:
pool: { type: windows }
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -232,12 +247,15 @@ extends:
buildPlatforms: ${{ parameters.buildPlatforms }}
generateSbom: false # this is handled by onebranch
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
- ${{ if eq(parameters.buildWPF, true) }}:
- template: ./build/pipelines/templates-v2/job-build-package-wpf.yml@self
parameters:
pool: { type: windows }
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -247,6 +265,7 @@ extends:
buildPlatforms: ${{ parameters.buildPlatforms }}
generateSbom: false # this is handled by onebranch
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
- stage: Publish
displayName: Publish
@@ -260,6 +279,8 @@ extends:
subscription: ${{ parameters.symbolPublishingSubscription }}
symbolProject: ${{ parameters.symbolPublishingProject }}
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(Build.ArtifactStagingDirectory)

View File

@@ -0,0 +1,8 @@
$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml))
$VSPackages = $VSInstances.instances.instance.packages.package
$LatestVCPackage = ($VSInstances.instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.CRT.Source" })
$LatestVCToolsVersion = $LatestVCPackage.version;
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
Write-Output "Updating VCToolsVersion environment variable for job"
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"

View File

@@ -5,7 +5,7 @@
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
<XesBaseYearForStoreVersion>2024</XesBaseYearForStoreVersion>
<VersionMajor>1</VersionMajor>
<VersionMinor>21</VersionMinor>
<VersionMinor>22</VersionMinor>
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
</PropertyGroup>
</Project>

View File

@@ -65,9 +65,6 @@
* `clipboard.cpp`
* Handles the command prompt line as you see in CMD.exe (known as the processed input line… most other shells handle this themselves with raw input and dont use ours. This is a legacy of bad architectural design, putting stuff in conhost not in CMD)
* `cmdline.cpp`
* Handles shunting IME data back and forth to the TSF library and to and from the various buffers
* `Conimeinfo.cpp`
* `Convarea.cpp`
* Contains the global state for the entire console application
* `consoleInformation.cpp`
* Stuff related to the low-level server communication over our protocol with the driver

View File

@@ -349,7 +349,7 @@
"description": "Sets the DWrite font features for the given font. For example, { \"ss01\": 1, \"liga\":0 } will enable ss01 and disable ligatures.",
"type": "object",
"patternProperties": {
"^(([A-Za-z0-9]){4})$": {
"^[\\x20-\\x7E]{4}$": {
"type": "integer"
}
},
@@ -359,7 +359,7 @@
"description": "Sets the DWrite font axes for the given font. For example, { \"wght\": 200 } will set the font weight to 200.",
"type": "object",
"patternProperties": {
"^([A-Za-z]{4})$": {
"^[\\x20-\\x7E]{4}$": {
"type": "number"
}
},
@@ -1501,8 +1501,10 @@
"const": "multipleActions"
},
"actions": {
"$ref": "#/$defs/ShortcutAction",
"type": "array",
"items": {
"$ref": "#/$defs/ShortcutAction"
},
"minItems": 1,
"description": "A list of other actions."
}
@@ -1891,6 +1893,14 @@
],
"type": "string"
},
"IconStyle": {
"enum": [
"default",
"hidden",
"monochrome"
],
"type": "string"
},
"ThemeColor": {
"description": "A special kind of color for use in themes. Can be an #rrggbb color, #rrggbbaa color, or a special value. 'accent' is evaluated as the user's selected Accent color in the OS, and 'terminalBackground' will be evaluated as the background color of the active terminal pane.",
"oneOf": [
@@ -1928,6 +1938,10 @@
"showCloseButton": {
"description": "Controls the visibility of the close button on the tab",
"$ref": "#/$defs/ShowCloseButton"
},
"iconStyle": {
"description": "Controls the appearance of a tab's icon",
"$ref": "#/$defs/IconStyle"
}
}
},
@@ -2065,6 +2079,9 @@
{
"$ref": "#/$defs/SwitchToTabAction"
},
{
"$ref": "#/$defs/ScrollToMarkAction"
},
{
"$ref": "#/$defs/MoveFocusAction"
},
@@ -2200,6 +2217,10 @@
}
}
},
"id": {
"description": "The ID of this command. If one isn't provided, we will generate one internally.",
"type": "string"
},
"iterateOn": {
"type": "string",
"description": "Used to create iterable commands based on other objects in your settings. Possible values:\n- \"profiles\" \n- \"schemes\"",
@@ -2211,7 +2232,15 @@
"commands": {
"description": "List of commands to execute",
"items": {
"$ref": "#/$defs/Keybinding/properties/command"
"type": "object",
"properties": {
"command": {
"$ref": "#/$defs/Keybinding/properties/command"
},
"name": {
"$ref": "#/$defs/Keybinding/properties/name"
}
}
},
"minItems": 1,
"type": "array"
@@ -2772,20 +2801,35 @@
"type": "string"
}
},
"experimental.autoMarkPrompts": {
"autoMarkPrompts": {
"default": false,
"description": "When set to true, prompts will automatically be marked.",
"type": "boolean"
},
"experimental.autoMarkPrompts": {
"deprecated": true,
"description": "This has been replaced by autoMarkPrompts in 1.21",
"type": "boolean"
},
"experimental.retroTerminalEffect": {
"description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
"type": "boolean"
},
"experimental.showMarksOnScrollbar": {
"deprecated": true,
"description": "This has been replaced by showMarksOnScrollbar in 1.21",
"type": "boolean"
},
"showMarksOnScrollbar": {
"default": false,
"description": "When set to true, marks added to the buffer via the addMark action will appear on the scrollbar.",
"type": "boolean"
},
"experimental.rightClickContextMenu": {
"default": false,
"description": "When set to true, right-clicking on the terminal will show a context menu. When set to false, right-click will copy",
"type": "boolean"
},
"experimental.repositionCursorWithMouse": {
"default": false,
"description": "When set to true, you can move the text cursor by clicking with the mouse on the current commandline. This is an experimental feature - there are lots of edge cases where this will not work as expected.",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -8,5 +8,5 @@ Please consult the [license](https://raw.githubusercontent.com/microsoft/cascadi
### Fonts Included
* Cascadia Code, Cascadia Mono (2111.01)
* from microsoft/cascadia-code@de36d62e777d34d3bed92a7e23988e5d61e0ba02
* Cascadia Code, Cascadia Mono (2404.23)
* from microsoft/cascadia-code@1034791e5fc6e060a448d2b29cd94a6c683edb36

View File

@@ -11,7 +11,7 @@ Licensed under the MIT license.
#include <conattrs.hpp>
#include "MySettings.g.h"
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, uint32_t>;
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
using IFontAxesMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
namespace winrt::SampleApp::implementation

View File

@@ -914,7 +914,7 @@ const til::small_rle<TextAttribute, uint16_t, 1>& ROW::Attributes() const noexce
TextAttribute ROW::GetAttrByColumn(const til::CoordType column) const
{
return _attr.at(_clampedUint16(column));
return _attr.at(_clampedColumn(column));
}
std::vector<uint16_t> ROW::GetHyperlinks() const
@@ -1097,12 +1097,6 @@ DelimiterClass ROW::DelimiterClassAt(til::CoordType column, const std::wstring_v
}
}
template<typename T>
constexpr uint16_t ROW::_clampedUint16(T v) noexcept
{
return static_cast<uint16_t>(clamp(v, 0, 65535));
}
template<typename T>
constexpr uint16_t ROW::_clampedColumn(T v) const noexcept
{

View File

@@ -230,8 +230,6 @@ private:
static constexpr uint16_t CharOffsetsTrailer = 0x8000;
static constexpr uint16_t CharOffsetsMask = 0x7fff;
template<typename T>
static constexpr uint16_t _clampedUint16(T v) noexcept;
template<typename T>
constexpr uint16_t _clampedColumn(T v) const noexcept;
template<typename T>

View File

@@ -6,19 +6,87 @@
#include "textBuffer.hpp"
// All of these are somewhat annoying when trying to implement RefcountBuffer.
// You can't stuff a unique_ptr into ut->q (= void*) after all.
#pragma warning(disable : 26402) // Return a scoped object instead of a heap-allocated if it has a move constructor (r.3).
#pragma warning(disable : 26403) // Reset or explicitly delete an owner<T> pointer '...' (r.3).
#pragma warning(disable : 26409) // Avoid calling new and delete explicitly, use std::make_unique<T> instead (r.11).
struct RowRange
{
til::CoordType begin;
til::CoordType end;
};
struct RefcountBuffer
{
size_t references;
size_t capacity;
wchar_t data[1];
static RefcountBuffer* EnsureCapacityForOverwrite(RefcountBuffer* buffer, size_t capacity)
{
// We must not just ensure that `buffer` has at least `capacity`, but also that its reference count is <= 1, because otherwise we would resize a shared buffer.
if (buffer != nullptr && buffer->references <= 1 && buffer->capacity >= capacity)
{
return buffer;
}
const auto oldCapacity = buffer ? buffer->capacity << 1 : 0;
const auto newCapacity = std::max(capacity + 128, oldCapacity);
const auto newBuffer = static_cast<RefcountBuffer*>(::operator new(sizeof(RefcountBuffer) - sizeof(data) + newCapacity * sizeof(wchar_t)));
if (!newBuffer)
{
return nullptr;
}
if (buffer)
{
buffer->Release();
}
// Copying the old buffer's data is not necessary because utextAccess() will scribble right over it.
newBuffer->references = 1;
newBuffer->capacity = newCapacity;
return newBuffer;
}
void AddRef() noexcept
{
// With our usage patterns, either of these two would indicate
// an unbalanced AddRef/Release or a memory corruption.
assert(references > 0 && references < 1000);
references++;
}
void Release() noexcept
{
// With our usage patterns, either of these two would indicate
// an unbalanced AddRef/Release or a memory corruption.
assert(references > 0 && references < 1000);
if (--references == 0)
{
::operator delete(this);
}
}
};
constexpr size_t& accessLength(UText* ut) noexcept
{
static_assert(sizeof(ut->p) == sizeof(size_t));
return *std::bit_cast<size_t*>(&ut->p);
}
constexpr RefcountBuffer*& accessBuffer(UText* ut) noexcept
{
static_assert(sizeof(ut->q) == sizeof(RefcountBuffer*));
return *std::bit_cast<RefcountBuffer**>(&ut->q);
}
constexpr RowRange& accessRowRange(UText* ut) noexcept
{
static_assert(sizeof(ut->a) == sizeof(RowRange));
return *std::bit_cast<RowRange*>(&ut->a);
}
@@ -56,11 +124,16 @@ static UText* U_CALLCONV utextClone(UText* dest, const UText* src, UBool deep, U
}
dest = utext_setup(dest, 0, status);
if (*status <= U_ZERO_ERROR)
if (*status > U_ZERO_ERROR)
{
memcpy(dest, src, sizeof(UText));
return dest;
}
memcpy(dest, src, sizeof(UText));
if (const auto buf = accessBuffer(dest))
{
buf->AddRef();
}
return dest;
}
@@ -82,7 +155,9 @@ try
for (til::CoordType y = range.begin; y < range.end; ++y)
{
length += textBuffer.GetRowByOffset(y).GetText().size();
const auto& row = textBuffer.GetRowByOffset(y);
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
length += row.GetText().size() + !row.WasWrapForced();
}
accessLength(ut) = length;
@@ -126,11 +201,13 @@ try
const auto range = accessRowRange(ut);
auto start = ut->chunkNativeStart;
auto limit = ut->chunkNativeLimit;
auto y = accessCurrentRow(ut);
std::wstring_view text;
if (neededIndex < start || neededIndex >= limit)
{
auto y = accessCurrentRow(ut);
std::wstring_view text;
bool wasWrapForced = false;
if (neededIndex < start)
{
do
@@ -138,12 +215,17 @@ try
--y;
if (y < range.begin)
{
assert(false);
return false;
}
text = textBuffer.GetRowByOffset(y).GetText();
const auto& row = textBuffer.GetRowByOffset(y);
text = row.GetText();
wasWrapForced = row.WasWrapForced();
limit = start;
start -= text.size();
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
start -= text.size() + !wasWrapForced;
} while (neededIndex < start);
}
else
@@ -153,15 +235,32 @@ try
++y;
if (y >= range.end)
{
assert(false);
return false;
}
text = textBuffer.GetRowByOffset(y).GetText();
const auto& row = textBuffer.GetRowByOffset(y);
text = row.GetText();
wasWrapForced = row.WasWrapForced();
start = limit;
limit += text.size();
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
limit += text.size() + !wasWrapForced;
} while (neededIndex >= limit);
}
if (!wasWrapForced)
{
const auto newSize = text.size() + 1;
const auto buffer = RefcountBuffer::EnsureCapacityForOverwrite(accessBuffer(ut), newSize);
memcpy(&buffer->data[0], text.data(), text.size() * sizeof(wchar_t));
til::at(buffer->data, text.size()) = L'\n';
text = { &buffer->data[0], newSize };
accessBuffer(ut) = buffer;
}
accessCurrentRow(ut) = y;
ut->chunkNativeStart = start;
ut->chunkNativeLimit = limit;
@@ -256,18 +355,32 @@ catch (...)
return 0;
}
static void U_CALLCONV utextClose(UText* ut) noexcept
{
if (const auto buffer = accessBuffer(ut))
{
buffer->Release();
}
}
static constexpr UTextFuncs utextFuncs{
.tableSize = sizeof(UTextFuncs),
.clone = utextClone,
.nativeLength = utextNativeLength,
.access = utextAccess,
.close = utextClose,
};
// Creates a UText from the given TextBuffer that spans rows [rowBeg,RowEnd).
UText Microsoft::Console::ICU::UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept
Microsoft::Console::ICU::unique_utext Microsoft::Console::ICU::UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept
{
#pragma warning(suppress : 26477) // Use 'nullptr' rather than 0 or NULL (es.47).
UText ut = UTEXT_INITIALIZER;
unique_utext ut{ UTEXT_INITIALIZER };
UErrorCode status = U_ZERO_ERROR;
utext_setup(&ut, 0, &status);
FAIL_FAST_IF(status > U_ZERO_ERROR);
ut.providerProperties = (1 << UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE) | (1 << UTEXT_PROVIDER_STABLE_CHUNKS);
ut.pFuncs = &utextFuncs;
ut.context = &textBuffer;

View File

@@ -10,8 +10,9 @@ class TextBuffer;
namespace Microsoft::Console::ICU
{
using unique_uregex = wistd::unique_ptr<URegularExpression, wil::function_deleter<decltype(&uregex_close), &uregex_close>>;
using unique_utext = wil::unique_struct<UText, decltype(&utext_close), &utext_close>;
UText UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
unique_utext UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
unique_uregex CreateRegex(const std::wstring_view& pattern, uint32_t flags, UErrorCode* status) noexcept;
til::point_span BufferRangeFromMatch(UText* ut, URegularExpression* re);
}

View File

@@ -8,28 +8,26 @@
using namespace Microsoft::Console::Types;
bool Search::ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive)
bool Search::IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool caseInsensitive) const noexcept
{
return _renderData != &renderData ||
_needle != needle ||
_caseInsensitive != caseInsensitive ||
_lastMutationId != renderData.GetTextBuffer().GetLastMutationId();
}
bool Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool caseInsensitive, bool reverse)
{
const auto& textBuffer = renderData.GetTextBuffer();
const auto lastMutationId = textBuffer.GetLastMutationId();
if (_needle == needle &&
_caseInsensitive == caseInsensitive &&
_lastMutationId == lastMutationId)
{
_step = reverse ? -1 : 1;
return false;
}
_renderData = &renderData;
_needle = needle;
_caseInsensitive = caseInsensitive;
_lastMutationId = lastMutationId;
_lastMutationId = textBuffer.GetLastMutationId();
_results = textBuffer.SearchText(needle, caseInsensitive);
_index = reverse ? gsl::narrow_cast<ptrdiff_t>(_results.size()) - 1 : 0;
_step = reverse ? -1 : 1;
return true;
}
@@ -93,8 +91,9 @@ void Search::MovePastPoint(const til::point anchor) noexcept
_index = (index + count) % count;
}
void Search::FindNext() noexcept
void Search::FindNext(bool reverse) noexcept
{
_step = reverse ? -1 : 1;
if (const auto count{ gsl::narrow_cast<ptrdiff_t>(_results.size()) })
{
_index = (_index + _step + count) % count;
@@ -111,28 +110,6 @@ const til::point_span* Search::GetCurrent() const noexcept
return nullptr;
}
void Search::HighlightResults() const
{
std::vector<til::inclusive_rect> toSelect;
const auto& textBuffer = _renderData->GetTextBuffer();
for (const auto& r : _results)
{
const auto rbStart = textBuffer.BufferToScreenPosition(r.start);
const auto rbEnd = textBuffer.BufferToScreenPosition(r.end);
til::inclusive_rect re;
re.top = rbStart.y;
re.bottom = rbEnd.y;
re.left = rbStart.x;
re.right = rbEnd.x;
toSelect.emplace_back(re);
}
_renderData->SelectSearchRegions(std::move(toSelect));
}
// Routine Description:
// - Takes the found word and selects it in the screen buffer
@@ -158,6 +135,11 @@ const std::vector<til::point_span>& Search::Results() const noexcept
return _results;
}
std::vector<til::point_span>&& Search::ExtractResults() noexcept
{
return std::move(_results);
}
ptrdiff_t Search::CurrentMatch() const noexcept
{
return _index;

View File

@@ -25,18 +25,19 @@ class Search final
public:
Search() = default;
bool ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive);
bool IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool caseInsensitive) const noexcept;
bool Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool caseInsensitive, bool reverse);
void MoveToCurrentSelection();
void MoveToPoint(til::point anchor) noexcept;
void MovePastPoint(til::point anchor) noexcept;
void FindNext() noexcept;
void FindNext(bool reverse) noexcept;
const til::point_span* GetCurrent() const noexcept;
void HighlightResults() const;
bool SelectCurrent() const;
const std::vector<til::point_span>& Results() const noexcept;
std::vector<til::point_span>&& ExtractResults() noexcept;
ptrdiff_t CurrentMatch() const noexcept;
private:

View File

@@ -1176,36 +1176,40 @@ void TextBuffer::Reset() noexcept
_initialAttributes = _currentAttributes;
}
void TextBuffer::ClearScrollback(const til::CoordType start, const til::CoordType height)
// Arguments:
// - newFirstRow: The current y-position of the viewport. We'll clear up until here.
// - rowsToKeep: the number of rows to keep in the buffer.
void TextBuffer::ClearScrollback(const til::CoordType newFirstRow, const til::CoordType rowsToKeep)
{
if (start <= 0)
// We're already at the top? don't clear anything. There's no scrollback.
if (newFirstRow <= 0)
{
return;
}
if (height <= 0)
// The new viewport should keep 0 rows? Then just reset everything.
if (rowsToKeep <= 0)
{
_decommit();
return;
}
ClearMarksInRange(til::point{ 0, 0 }, til::point{ _width, std::max(0, newFirstRow - 1) });
// Our goal is to move the viewport to the absolute start of the underlying memory buffer so that we can
// MEM_DECOMMIT the remaining memory. _firstRow is used to make the TextBuffer behave like a circular buffer.
// The start parameter is relative to the _firstRow. The trick to get the content to the absolute start
// The newFirstRow parameter is relative to the _firstRow. The trick to get the content to the absolute start
// is to simply add _firstRow ourselves and then reset it to 0. This causes ScrollRows() to write into
// the absolute start while reading from relative coordinates. This works because GetRowByOffset()
// operates modulo the buffer height and so the possibly-too-large startAbsolute won't be an issue.
const auto startAbsolute = _firstRow + start;
const auto startAbsolute = _firstRow + newFirstRow;
_firstRow = 0;
ScrollRows(startAbsolute, height, -startAbsolute);
ScrollRows(startAbsolute, rowsToKeep, -startAbsolute);
const auto end = _estimateOffsetOfLastCommittedRow();
for (auto y = height; y <= end; ++y)
for (auto y = rowsToKeep; y <= end; ++y)
{
GetMutableRowByOffset(y).Reset(_initialAttributes);
}
ClearMarksInRange(til::point{ 0, height }, til::point{ _width, _height });
}
// Routine Description:
@@ -1440,10 +1444,23 @@ til::point TextBuffer::_GetWordStartForSelection(const til::point target, const
// expand left until we hit the left boundary or a different delimiter class
while (result != bufferSize.Origin() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
{
//prevent selection wrapping on whitespace selection
if (isControlChar && result.x == bufferSize.Left())
if (result.x == bufferSize.Left())
{
break;
// Prevent wrapping to the previous line if the selection begins on whitespace
if (isControlChar)
{
break;
}
if (result.y > 0)
{
// Prevent wrapping to the previous line if it was hard-wrapped (e.g. not forced by us to wrap)
const auto& priorRow = GetRowByOffset(result.y - 1);
if (!priorRow.WasWrapForced())
{
break;
}
}
}
bufferSize.DecrementInBounds(result);
}
@@ -1563,10 +1580,22 @@ til::point TextBuffer::_GetWordEndForSelection(const til::point target, const st
// expand right until we hit the right boundary as a ControlChar or a different delimiter class
while (result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
{
if (isControlChar && result.x == bufferSize.RightInclusive())
if (result.x == bufferSize.RightInclusive())
{
break;
// Prevent wrapping to the next line if the selection begins on whitespace
if (isControlChar)
{
break;
}
// Prevent wrapping to the next line if this one was hard-wrapped (e.g. not forced by us to wrap)
const auto& row = GetRowByOffset(result.y);
if (!row.WasWrapForced())
{
break;
}
}
bufferSize.IncrementInBoundsCircular(result);
}
@@ -1995,25 +2024,10 @@ size_t TextBuffer::SpanLength(const til::point coordStart, const til::point coor
// - end - where to end getting text
// Return Value:
// - Just the text.
std::wstring TextBuffer::GetPlainText(const til::point& start, const til::point& end) const
std::wstring TextBuffer::GetPlainText(const til::point start, const til::point end) const
{
std::wstring text;
auto spanLength = SpanLength(start, end);
text.reserve(spanLength);
auto it = GetCellDataAt(start);
for (; it && spanLength > 0; ++it, --spanLength)
{
const auto& cell = *it;
if (cell.DbcsAttr() != DbcsAttribute::Trailing)
{
const auto chars = cell.Chars();
text.append(chars);
}
}
return text;
const auto req = CopyRequest::FromConfig(*this, start, end, true, false, false, false);
return GetPlainText(req);
}
// Routine Description:
@@ -2549,6 +2563,7 @@ void TextBuffer::Serialize(const wchar_t* destination) const
TextColor previousBg;
TextColor previousUl;
uint16_t previousHyperlinkId = 0;
bool delayedLineBreak = false;
// This iterates through each row. The exit condition is at the end
// of the for() loop so that we can properly handle file flushing.
@@ -2568,9 +2583,11 @@ void TextBuffer::Serialize(const wchar_t* destination) const
}
const auto& runs = row.Attributes().runs();
auto it = runs.begin();
const auto beg = runs.begin();
const auto end = runs.end();
auto it = beg;
const auto last = end - 1;
const auto lastCharX = row.MeasureRight();
til::CoordType oldX = 0;
for (; it != end; ++it)
@@ -2750,24 +2767,55 @@ void TextBuffer::Serialize(const wchar_t* destination) const
}
}
auto newX = oldX + it->length;
// Trim whitespace with default attributes from the end of each line.
if (it == last && it->value == TextAttribute{})
// Initially, the buffer is initialized with the default attributes, but once it begins to scroll,
// newly scrolled in rows are initialized with the current attributes. This means we need to set
// the current attributes to those of the upcoming row before the row comes up. Or inversely:
// We let the row come up, let it set its attributes and only then print the newline.
if (delayedLineBreak)
{
// This can result in oldX > newX, but that's okay because GetText()
// is robust against that and returns an empty string.
newX = row.MeasureRight();
buffer.append(L"\r\n");
delayedLineBreak = false;
}
auto newX = oldX + it->length;
// Since our text buffer doesn't store the original input text, the information over the amount of trailing
// whitespaces was lost. If we don't do anything here then a row that just says "Hello" would be serialized
// to "Hello ...". If the user restores the buffer dump with a different window size,
// this would result in some fairly ugly reflow. This code attempts to at least trim trailing whitespaces.
//
// As mentioned above for `delayedLineBreak`, rows are initialized with their first attribute, BUT
// only if the viewport has begun to scroll. Otherwise, they're initialized with the default attributes.
// In other words, we can only skip \x1b[K = Erase in Line, if both the first/last attribute are the default attribute.
static constexpr TextAttribute defaultAttr;
const auto trimTrailingWhitespaces = it == last && lastCharX < newX;
const auto clearToEndOfLine = trimTrailingWhitespaces && beg->value != defaultAttr || beg->value != defaultAttr;
if (trimTrailingWhitespaces)
{
newX = lastCharX;
}
buffer.append(row.GetText(oldX, newX));
if (clearToEndOfLine)
{
buffer.append(L"\x1b[K");
}
oldX = newX;
}
const auto moreRowsRemaining = currentRow < lastRowWithText;
delayedLineBreak = !row.WasWrapForced();
if (!row.WasWrapForced() || !moreRowsRemaining)
if (!moreRowsRemaining)
{
buffer.append(L"\r\n");
if (previousHyperlinkId)
{
buffer.append(L"\x1b]8;;\x1b\\");
}
buffer.append(L"\x1b[m\r\n");
}
if (buffer.size() >= writeThreshold || !moreRowsRemaining)

View File

@@ -49,8 +49,6 @@ filling in the last row, and updating the screen.
#pragma once
#include <vector>
#include "cursor.h"
#include "Row.hpp"
#include "TextAttribute.hpp"
@@ -198,7 +196,7 @@ public:
size_t SpanLength(const til::point coordStart, const til::point coordEnd) const;
std::wstring GetPlainText(const til::point& start, const til::point& end) const;
std::wstring GetPlainText(til::point start, til::point end) const;
struct CopyRequest
{

View File

@@ -127,7 +127,7 @@ namespace winrt::TerminalApp::implementation
auto originalOpacity{ control.BackgroundOpacity() };
// Apply the new opacity
control.AdjustOpacity(args.Opacity() / 100.0, args.Relative());
control.AdjustOpacity(args.Opacity() / 100.0f, args.Relative());
if (backup)
{

View File

@@ -286,7 +286,7 @@ namespace winrt::TerminalApp::implementation
_SplitPane(terminalTab,
realArgs.SplitDirection(),
// This is safe, we're already filtering so the value is (0, 1)
::base::saturated_cast<float>(realArgs.SplitSize()),
realArgs.SplitSize(),
_MakePane(realArgs.ContentArgs(), duplicateFromTab));
args.Handled(true);
}
@@ -1247,7 +1247,7 @@ namespace winrt::TerminalApp::implementation
if (const auto& realArgs = args.ActionArgs().try_as<AdjustOpacityArgs>())
{
const auto res = _ApplyToActiveControls([&](auto& control) {
control.AdjustOpacity(realArgs.Opacity() / 100.0, realArgs.Relative());
control.AdjustOpacity(realArgs.Opacity() / 100.0f, realArgs.Relative());
});
args.Handled(res);
}

View File

@@ -116,6 +116,9 @@ namespace winrt::TerminalApp::implementation
switch (visualState)
{
case WindowVisualState::WindowVisualStateIconified:
// Iconified (aka minimized) state should preserve the active window styling
break;
case WindowVisualState::WindowVisualStateMaximized:
VisualStateManager::GoToState(MaximizeButton(), L"WindowStateMaximized", false);
@@ -124,9 +127,7 @@ namespace winrt::TerminalApp::implementation
CloseButton().Height(maximizedHeight);
MaximizeToolTip().Text(RS_(L"WindowRestoreDownButtonToolTip"));
break;
case WindowVisualState::WindowVisualStateNormal:
case WindowVisualState::WindowVisualStateIconified:
default:
VisualStateManager::GoToState(MaximizeButton(), L"WindowStateNormal", false);

View File

@@ -47,14 +47,8 @@ Pane::Pane(const IPaneContent& content, const bool lastFocused) :
// LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
// Colors::Transparent! The border won't get Tapped events, and they'll fall
// through to something else.
_borderFirst.Tapped([this](auto&, auto& e) {
_FocusFirstChild();
e.Handled(true);
});
_borderSecond.Tapped([this](auto&, auto& e) {
_FocusFirstChild();
e.Handled(true);
});
_borderFirst.Tapped({ this, &Pane::_borderTappedHandler });
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
}
Pane::Pane(std::shared_ptr<Pane> first,
@@ -88,14 +82,8 @@ Pane::Pane(std::shared_ptr<Pane> first,
// LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
// Colors::Transparent! The border won't get Tapped events, and they'll fall
// through to something else.
_borderFirst.Tapped([this](auto&, auto& e) {
_FocusFirstChild();
e.Handled(true);
});
_borderSecond.Tapped([this](auto&, auto& e) {
_FocusFirstChild();
e.Handled(true);
});
_borderFirst.Tapped({ this, &Pane::_borderTappedHandler });
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
}
// Extract the terminal settings from the current (leaf) pane's control
@@ -151,7 +139,7 @@ Pane::BuildStartupState Pane::BuildStartupActions(uint32_t currentId, uint32_t n
// When creating a pane the split size is the size of the new pane
// and not position.
const auto splitDirection = _splitState == SplitState::Horizontal ? SplitDirection::Down : SplitDirection::Right;
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? .5 : 1. - _desiredSplitPosition);
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? 0.5f : 1.0f - _desiredSplitPosition);
SplitPaneArgs args{ SplitType::Manual, splitDirection, splitSize, terminalArgs };
actionAndArgs.Args(args);
@@ -1237,6 +1225,14 @@ void Pane::UpdateVisuals()
// - <none>
void Pane::_Focus()
{
// Don't focus our content if we're already focused. This prevents a bug
// where tapping on the arrow in a ComboBox will land in our Tapped handler,
// and if we steal focus from the ComboBox, it won't open. See GH#17062
if (WasLastFocused())
{
return;
}
GotFocus.raise(shared_from_this(), FocusState::Programmatic);
if (const auto& lastContent{ GetLastFocusedContent() })
{
@@ -1595,12 +1591,12 @@ void Pane::_CloseChildRoutine(const bool closeFirst)
const auto splitWidth = _splitState == SplitState::Vertical;
Size removedOriginalSize{
::base::saturated_cast<float>(removedChild->_root.ActualWidth()),
::base::saturated_cast<float>(removedChild->_root.ActualHeight())
static_cast<float>(removedChild->_root.ActualWidth()),
static_cast<float>(removedChild->_root.ActualHeight())
};
Size remainingOriginalSize{
::base::saturated_cast<float>(remainingChild->_root.ActualWidth()),
::base::saturated_cast<float>(remainingChild->_root.ActualHeight())
static_cast<float>(remainingChild->_root.ActualWidth()),
static_cast<float>(remainingChild->_root.ActualHeight())
};
// Remove both children from the grid
@@ -1902,7 +1898,7 @@ void Pane::_SetupEntranceAnimation()
// looks bad.
_secondChild->_root.Background(_themeResources.unfocusedBorderBrush);
const auto [firstSize, secondSize] = _CalcChildrenSizes(::base::saturated_cast<float>(totalSize));
const auto [firstSize, secondSize] = _CalcChildrenSizes(static_cast<float>(totalSize));
// This is safe to capture this, because it's only being called in the
// context of this method (not on another thread)
@@ -3021,3 +3017,9 @@ winrt::Windows::UI::Xaml::Media::SolidColorBrush Pane::_ComputeBorderColor()
return _themeResources.unfocusedBorderBrush;
}
void Pane::_borderTappedHandler(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::UI::Xaml::Input::TappedRoutedEventArgs& e)
{
_FocusFirstChild();
e.Handled(true);
}

View File

@@ -314,6 +314,8 @@ private:
SplitState _convertAutomaticOrDirectionalSplitState(const winrt::Microsoft::Terminal::Settings::Model::SplitDirection& splitType) const;
void _borderTappedHandler(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::Input::TappedRoutedEventArgs& e);
// Function Description:
// - Returns true if the given direction can be used with the given split
// type.

View File

@@ -190,16 +190,16 @@
<value>Mehrere Bereiche</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Schließen...</value>
<value>Schließen</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Registerkarten auf der rechten Seite schließen</value>
<value>Tabs nach rechts schließen</value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Andere Registerkarten schließen</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Registerkarte schließen</value>
<value>Tab schließen</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Bereich schließen</value>
@@ -208,16 +208,16 @@
<value>Registerkarte teilen</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Geteilter Bereich</value>
<value>Bereich teilen</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Websuche</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Farbe...</value>
<value>Registerkartenfarbe ändern</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Benutzerdefiniert...</value>
<value>Benutzerdefiniert</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Zurücksetzen</value>
@@ -226,7 +226,7 @@
<value>Registerkarte umbenennen</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>Registerkarte duplizieren</value>
<value>Registerkarte kopieren</value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Profil mit einem ungültigen "backgroundImage" gefunden. Dieses Profil hat standardmäßig kein Hintergrundbild. Stellen Sie sicher, dass beim Festlegen eines "backgroundImage" der Wert ein gültiger Dateipfad zu einem Bild ist.</value>
@@ -487,7 +487,7 @@
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Drittanbieter-Hinweise</value>
<value>Hinweise von Drittanbietern</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -761,7 +761,7 @@
<value>Suchen</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>Nur Text</value>
<value>Unformatierter Text</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>Das Beendigungsverhalten kann in den erweiterten Profileinstellungen konfiguriert werden.</value>
@@ -830,7 +830,7 @@
<value>Diese Registerkarte schließen</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Leer...</value>
<value>Leer</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Bereich schließen</value>

View File

@@ -187,7 +187,7 @@
<value>Varios paneles</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Cerrar...</value>
<value>Cerrar</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Cerrar las pestañas de la derecha</value>
@@ -202,19 +202,19 @@
<value>Cerrar panel</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Dividir tabla</value>
<value>Dividir pestaña</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Panel dividido</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Búsqueda en la Web</value>
<value>Búsqueda en la web</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Color...</value>
<value>Cambiar color de pestaña</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Configuración personalizada...</value>
<value>Personalizar</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Restablecer</value>
@@ -464,7 +464,7 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Tareas iniciales</value>
<value>Introducción</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
@@ -480,7 +480,7 @@
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>Directiva de privacidad</value>
<value>Política de privacidad</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
@@ -723,7 +723,7 @@
<value>Maximizar</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Restaurar a tamaño normal</value>
<value>Restaurar</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Paleta de comandos</value>
@@ -827,7 +827,7 @@
<value>Cerrar esta pestaña</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Vacío...</value>
<value>Vacío</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Cerrar panel</value>
@@ -840,7 +840,7 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>Mover la Pestaña a una Nueva ventana</value>
<value>Mover pestaña a nueva ventana</value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>Mueve la pestaña a una nueva ventana </value>

View File

@@ -187,13 +187,13 @@
<value>Volets multiples</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Fermez...</value>
<value>Fermer</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Fermer les Onglets à Droite</value>
<value>Fermer les onglets à droite</value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Fermez les Autres onglets</value>
<value>Fermer les autres onglets</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Fermer longlet</value>
@@ -205,16 +205,16 @@
<value>Fractionner longlet</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Fractionner le volet...</value>
<value>Fractionner le volet</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Recherche web</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Couleur...</value>
<value>Modifier la couleur de longlet</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Personnalisée...</value>
<value>Personnalisé</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Réinitialiser</value>
@@ -464,7 +464,7 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Prise en main</value>
<value>Bien démarrer</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
@@ -480,11 +480,11 @@
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>Politique de confidentialité</value>
<value>Charte de confidentialité</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Avis de tiers</value>
<value>Mentions tierces</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -723,7 +723,7 @@
<value>Agrandir</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Niveau inférieur</value>
<value>Restaurer</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Palette de commandes</value>
@@ -767,7 +767,7 @@
<value>Ne plus afficher</value>
</data>
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Cette fenêtre de terminal sexécute en tant quAdministrateur</value>
<value>Cette fenêtre de terminal sexécute en tant quadministrateur</value>
</data>
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
<value>{0} suggestions trouvées</value>
@@ -827,7 +827,7 @@
<value>Fermer cet onglet</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Vide...</value>
<value>Vide</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Fermer le volet</value>
@@ -846,7 +846,7 @@
<value>Déplacer l'onglet vers une nouvelle fenêtre </value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>Exécuter en tant qu'administrateur</value>
<value>Exécuter en temps qu'administrateur (restreint)</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">

View File

@@ -187,7 +187,7 @@
<value>Più riquadri</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Chiudi...</value>
<value>Chiudi</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Chiudi schede a destra</value>
@@ -199,7 +199,7 @@
<value>Chiudi scheda</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Chiudi riquadro</value>
<value>Chiudi il riquadro</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Dividi scheda</value>
@@ -211,10 +211,10 @@
<value>Ricerca nel Web</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Colore...</value>
<value>Cambia colore scheda</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Personalizzato...</value>
<value>Personalizzato</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Reimposta</value>
@@ -464,7 +464,7 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Attività iniziali</value>
<value>Introduzione</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
@@ -484,7 +484,7 @@
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Informative di terze parti</value>
<value>Comunicazioni di terze parti</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -723,7 +723,7 @@
<value>Ingrandisci</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Ripristina visualizzazione normale</value>
<value>Ripristina in basso</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Riquadro comandi</value>
@@ -830,7 +830,7 @@
<value>Vuoto</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Chiudi riquadro</value>
<value>Chiudi il riquadro</value>
</data>
<data name="ClosePaneToolTip" xml:space="preserve">
<value>Chiude il riquadro attivo se sono presenti più riquadri</value>

View File

@@ -188,7 +188,7 @@
<value>複数ウィンドウ</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>閉じる...</value>
<value>閉じる</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>タブを右側に閉じる</value>
@@ -203,28 +203,28 @@
<value>ウィンドウを閉じる</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>分割タブ</value>
<value>[分割] タブ</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>分割ウィンドウ</value>
<value>ウィンドウを分割する</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Web 検索</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>色...</value>
<value>タブの色の変更</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>カスタム...</value>
<value>カスタム</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>リセット</value>
</data>
<data name="RenameTabText" xml:space="preserve">
<value>タブ名を変更</value>
<value>[名前の変更] タブ</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>タブ複製</value>
<value>タブ複製する</value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>無効な "backgroundImage" を持つプロファイルが見つかりました。既定では、そのプロファイルに背景画像はありません。"backgroundImage" を設定するときに、値が画像への有効なファイル パスとなっていることをご確認ください。</value>
@@ -485,7 +485,7 @@
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>サードパーティに関する通知</value>
<value>サード パーティ通知</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -724,7 +724,7 @@
<value>最大化</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>元に戻す</value>
<value>元に戻す (縮小)</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>コマンド パレット</value>
@@ -759,7 +759,7 @@
<value>検索する</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>プレーンテキスト</value>
<value>テキスト</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>終了動作は、プロファイルの詳細設定で構成できます。</value>
@@ -828,7 +828,7 @@
<value>このタブを閉じます</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>空っぽ...</value>
<value>なし</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>ウィンドウを閉じる</value>
@@ -847,7 +847,7 @@
<value>タブを新しいウィンドウに移動 </value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>管理者として実行する</value>
<value>管理者として実行</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">

View File

@@ -187,10 +187,10 @@
<value>여러 창</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>닫기...</value>
<value>닫기</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>오른쪽으로 탭 닫기</value>
<value>오른쪽에 있는 탭 닫기</value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>다른 탭 닫기</value>
@@ -211,10 +211,10 @@
<value>웹 검색</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>색...</value>
<value>탭 색 변경</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>사용자 정의...</value>
<value>사용자 정</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>다시 설정</value>
@@ -454,7 +454,7 @@
<value>정보</value>
</data>
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
<value>피드백 보내기</value>
<value>의견 보내기</value>
</data>
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
<value>확인</value>
@@ -468,7 +468,7 @@
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
<value>소스 코드</value>
<value>원본 코드</value>
<comment>A hyperlink name for the Terminal's documentation</comment>
</data>
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
@@ -480,11 +480,11 @@
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>개인정보 취급방침</value>
<value>개인정보 보호정책</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>타사 통지 사항</value>
<value>타사 통지</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -571,7 +571,7 @@
<value>명령줄 구문 분석 오류:</value>
</data>
<data name="CommandPaletteControlName" xml:space="preserve">
<value>명령 도구 모음</value>
<value>명령 팔레트</value>
</data>
<data name="TabSwitcherControlName" xml:space="preserve">
<value>탭 전환기</value>
@@ -723,10 +723,10 @@
<value>최대화</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>아래로 복원</value>
<value>이전 크기로 복원</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>명령 도구 모음</value>
<value>명령 팔레트</value>
</data>
<data name="NotificationIconFocusTerminal" xml:space="preserve">
<value>포커스 터미널</value>
@@ -827,7 +827,7 @@
<value>이 탭 닫기</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>비어 있음...</value>
<value>비어 있음</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>창 닫기</value>
@@ -840,13 +840,13 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>새 창으로 이동</value>
<value>탭을 새 창으로 이동</value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>탭을 새 창으로 이동 </value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>관리자로 실행</value>
<value>관리자 권한으로 실행</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">

View File

@@ -187,34 +187,34 @@
<value>Vários painéis</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Fechar...</value>
<value>Fechar</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Fechar Guias à Direita</value>
<value>Fechar guias à direita</value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Fechar Outras Guias</value>
<value>Fechar outras guias</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Fechar guia</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Fechar Painel</value>
<value>Fechar o painel</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Dividir Guia</value>
<value>Guia Dividir</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Painel dividido</value>
<value>Dividir painel</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Pesquisa na web</value>
<value>Pesquisa na Web</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Cor...</value>
<value>Alterar cor da guia</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Personalizados...</value>
<value>Personalizado</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Restaurar</value>
@@ -223,7 +223,7 @@
<value>Renomear guia</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>Duplicar Guia</value>
<value>Duplicar guia</value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Foi encontrado um perfil com um "backgroundImage" inválido. O perfil deve ser o padrão para que não haja nenhuma imagem de tela de fundo. Certifique-se de que, ao definir um "backgroundImage", o valor é um caminho de arquivo válido para uma imagem.</value>
@@ -454,7 +454,7 @@
<value>Sobre</value>
</data>
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
<value>Enviar Comentários</value>
<value>Enviar comentários</value>
</data>
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
<value>OK</value>
@@ -464,7 +464,7 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Ponto de Partida</value>
<value>Introdução</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
@@ -484,7 +484,7 @@
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Avisos de terceiros</value>
<value>Avisos de Terceiros</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -571,10 +571,10 @@
<value>Falha ao analisar a linha de comando:</value>
</data>
<data name="CommandPaletteControlName" xml:space="preserve">
<value>Paleta de Comandos</value>
<value>Paleta de comandos</value>
</data>
<data name="TabSwitcherControlName" xml:space="preserve">
<value>Seletor de guias</value>
<value>Alternador de guias</value>
</data>
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
<value>Digite o nome da guia...</value>
@@ -726,7 +726,7 @@
<value>Restaurar Tamanho Original</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Paleta de Comandos</value>
<value>Paleta de comandos</value>
</data>
<data name="NotificationIconFocusTerminal" xml:space="preserve">
<value>Terminal de foco</value>
@@ -746,7 +746,7 @@
<value>Dividir a janela e iniciar em determinado diretório</value>
</data>
<data name="ExportTabText" xml:space="preserve">
<value>Exportar Texto</value>
<value>Exportar texto</value>
</data>
<data name="ExportFailure" xml:space="preserve">
<value>Falha ao exportar o conteúdo do terminal</value>
@@ -758,7 +758,7 @@
<value>Localizar</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>Texto Simples</value>
<value>Texto sem formatação</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>O comportamento de término pode ser configurado nas configurações avançadas do perfil.</value>
@@ -767,7 +767,7 @@
<value>Não mostra de novo</value>
</data>
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Esta janela do Terminal está funcionando como Administrador</value>
<value>Esta janela do Terminal está sendo executada como administrador</value>
</data>
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
<value>Sugestões encontradas: {0}</value>
@@ -827,10 +827,10 @@
<value>Fechar esta guia</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Vazio...</value>
<value>Vazio</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Fechar Painel</value>
<value>Fechar o painel</value>
</data>
<data name="ClosePaneToolTip" xml:space="preserve">
<value>Feche o painel ativo se vários painéis estiverem presentes</value>
@@ -840,13 +840,13 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>Mover Guia para Nova Janela</value>
<value>Mover guia para nova janela</value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>Move a guia para uma nova janela</value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>Executar como Administrador</value>
<value>Executar como administrador</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
@@ -885,7 +885,7 @@
<value>Se definido, o comando será acrescentado ao comando padrão do perfil em vez de substituí-lo.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Reiniciar Conexão</value>
<value>Reiniciar conexão</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Reiniciar a conexão do painel ativo</value>

View File

@@ -191,43 +191,43 @@
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Ćļôŝέ... !!</value>
<value>Ćļôŝέ !</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Сĺôšę Ťăв !!!</value>
<value>Сĺôšę ťăв !!!</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Ćŀöśё Раņé !!!</value>
<value>Ćŀöśё ρаņé !!!</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Šрľīτ Τàв !!!</value>
<value>Šрľīτ τàв !!!</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Šрŀіт Ρªňë !!!</value>
<value>Šрŀіт φªňë !!!</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Ẅёв Şĕаŕčĥ !!!</value>
<value>Ẅёв şĕаŕčĥ !!!</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Ċõŀόř... !!</value>
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Ċµѕťøм... !!!</value>
<value>Ċµѕťøм !</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Яěšěŧ !</value>
</data>
<data name="RenameTabText" xml:space="preserve">
<value>Γεñамē Ťãв !!!</value>
<value>Γεñамē ťãв !!!</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ Τàв !!! </value>
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
@@ -462,7 +462,7 @@
<value>Åвōύţ !</value>
</data>
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
<value>Ѕеηð ę℮đвäçк !!! </value>
<value>Ѕеηð ƒę℮đвäçк !!! </value>
</data>
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
<value>ΦΚ </value>
@@ -472,11 +472,11 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
<value>Ѕοџŗсė Çŏđе !!!</value>
<value>Ѕοџŗсė ¢ŏđе !!!</value>
<comment>A hyperlink name for the Terminal's documentation</comment>
</data>
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
@@ -484,15 +484,15 @@
<comment>A hyperlink name for user documentation</comment>
</data>
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
<value>Ŗеľ℮àşε πòτéš !!! </value>
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Ţћĩřð-Ρářŧγ οŧīĉęŝ !!! !!!</value>
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -579,10 +579,10 @@
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
</data>
<data name="CommandPaletteControlName" xml:space="preserve">
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
</data>
<data name="TabSwitcherControlName" xml:space="preserve">
<value>Τăь Ѕωîťςћêг !!! </value>
<value>Τăь ѕωîťςћêг !!! </value>
</data>
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
@@ -731,10 +731,10 @@
<value>Μą×ìmϊżé !!</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
<value>Ŕèšŧòяё ďǿẃи !!! </value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
<value>Ċòмmāńδ рªľėτťë !!! !</value>
</data>
<data name="NotificationIconFocusTerminal" xml:space="preserve">
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
@@ -754,7 +754,7 @@
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
</data>
<data name="ExportTabText" xml:space="preserve">
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
<value>Ė×φōŗŧ ţєхŧ !!!</value>
</data>
<data name="ExportFailure" xml:space="preserve">
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
@@ -766,7 +766,7 @@
<value>₣ìпđ !</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>Ρĺáīň Тěхт !!!</value>
<value>Ρĺáīň тěхт !!!</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
@@ -775,7 +775,7 @@
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
</data>
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
</data>
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
@@ -835,10 +835,10 @@
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Ёмφţγ... !!</value>
<value>Ёмφţγ !</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Ĉĺοŝе Ρаиę !!!</value>
<value>Ĉĺοŝе φаиę !!!</value>
</data>
<data name="ClosePaneToolTip" xml:space="preserve">
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
@@ -848,13 +848,13 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
@@ -893,7 +893,7 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>

View File

@@ -191,43 +191,43 @@
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Ćļôŝέ... !!</value>
<value>Ćļôŝέ !</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Сĺôšę Ťăв !!!</value>
<value>Сĺôšę ťăв !!!</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Ćŀöśё Раņé !!!</value>
<value>Ćŀöśё ρаņé !!!</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Šрľīτ Τàв !!!</value>
<value>Šрľīτ τàв !!!</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Šрŀіт Ρªňë !!!</value>
<value>Šрŀіт φªňë !!!</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Ẅёв Şĕаŕčĥ !!!</value>
<value>Ẅёв şĕаŕčĥ !!!</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Ċõŀόř... !!</value>
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Ċµѕťøм... !!!</value>
<value>Ċµѕťøм !</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Яěšěŧ !</value>
</data>
<data name="RenameTabText" xml:space="preserve">
<value>Γεñамē Ťãв !!!</value>
<value>Γεñамē ťãв !!!</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ Τàв !!! </value>
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
@@ -462,7 +462,7 @@
<value>Åвōύţ !</value>
</data>
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
<value>Ѕеηð ę℮đвäçк !!! </value>
<value>Ѕеηð ƒę℮đвäçк !!! </value>
</data>
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
<value>ΦΚ </value>
@@ -472,11 +472,11 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
<value>Ѕοџŗсė Çŏđе !!!</value>
<value>Ѕοџŗсė ¢ŏđе !!!</value>
<comment>A hyperlink name for the Terminal's documentation</comment>
</data>
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
@@ -484,15 +484,15 @@
<comment>A hyperlink name for user documentation</comment>
</data>
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
<value>Ŗеľ℮àşε πòτéš !!! </value>
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Ţћĩřð-Ρářŧγ οŧīĉęŝ !!! !!!</value>
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -579,10 +579,10 @@
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
</data>
<data name="CommandPaletteControlName" xml:space="preserve">
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
</data>
<data name="TabSwitcherControlName" xml:space="preserve">
<value>Τăь Ѕωîťςћêг !!! </value>
<value>Τăь ѕωîťςћêг !!! </value>
</data>
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
@@ -731,10 +731,10 @@
<value>Μą×ìmϊżé !!</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
<value>Ŕèšŧòяё ďǿẃи !!! </value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
<value>Ċòмmāńδ рªľėτťë !!! !</value>
</data>
<data name="NotificationIconFocusTerminal" xml:space="preserve">
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
@@ -754,7 +754,7 @@
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
</data>
<data name="ExportTabText" xml:space="preserve">
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
<value>Ė×φōŗŧ ţєхŧ !!!</value>
</data>
<data name="ExportFailure" xml:space="preserve">
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
@@ -766,7 +766,7 @@
<value>₣ìпđ !</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>Ρĺáīň Тěхт !!!</value>
<value>Ρĺáīň тěхт !!!</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
@@ -775,7 +775,7 @@
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
</data>
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
</data>
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
@@ -835,10 +835,10 @@
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Ёмφţγ... !!</value>
<value>Ёмφţγ !</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Ĉĺοŝе Ρаиę !!!</value>
<value>Ĉĺοŝе φаиę !!!</value>
</data>
<data name="ClosePaneToolTip" xml:space="preserve">
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
@@ -848,13 +848,13 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
@@ -893,7 +893,7 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>

View File

@@ -191,43 +191,43 @@
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>Ćļôŝέ... !!</value>
<value>Ćļôŝέ !</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Сĺôšę Ťăв !!!</value>
<value>Сĺôšę ťăв !!!</value>
</data>
<data name="PaneClose" xml:space="preserve">
<value>Ćŀöśё Раņé !!!</value>
<value>Ćŀöśё ρаņé !!!</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>Šрľīτ Τàв !!!</value>
<value>Šрľīτ τàв !!!</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>Šрŀіт Ρªňë !!!</value>
<value>Šрŀіт φªňë !!!</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Ẅёв Şĕаŕčĥ !!!</value>
<value>Ẅёв şĕаŕčĥ !!!</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Ċõŀόř... !!</value>
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Ċµѕťøм... !!!</value>
<value>Ċµѕťøм !</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Яěšěŧ !</value>
</data>
<data name="RenameTabText" xml:space="preserve">
<value>Γεñамē Ťãв !!!</value>
<value>Γεñамē ťãв !!!</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ Τàв !!! </value>
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
@@ -462,7 +462,7 @@
<value>Åвōύţ !</value>
</data>
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
<value>Ѕеηð ę℮đвäçк !!! </value>
<value>Ѕеηð ƒę℮đвäçк !!! </value>
</data>
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
<value>ΦΚ </value>
@@ -472,11 +472,11 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
<value>Ѕοџŗсė Çŏđе !!!</value>
<value>Ѕοџŗсė ¢ŏđе !!!</value>
<comment>A hyperlink name for the Terminal's documentation</comment>
</data>
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
@@ -484,15 +484,15 @@
<comment>A hyperlink name for user documentation</comment>
</data>
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
<value>Ŗеľ℮àşε πòτéš !!! </value>
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Ţћĩřð-Ρářŧγ οŧīĉęŝ !!! !!!</value>
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -579,10 +579,10 @@
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
</data>
<data name="CommandPaletteControlName" xml:space="preserve">
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
</data>
<data name="TabSwitcherControlName" xml:space="preserve">
<value>Τăь Ѕωîťςћêг !!! </value>
<value>Τăь ѕωîťςћêг !!! </value>
</data>
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
@@ -731,10 +731,10 @@
<value>Μą×ìmϊżé !!</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
<value>Ŕèšŧòяё ďǿẃи !!! </value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
<value>Ċòмmāńδ рªľėτťë !!! !</value>
</data>
<data name="NotificationIconFocusTerminal" xml:space="preserve">
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
@@ -754,7 +754,7 @@
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
</data>
<data name="ExportTabText" xml:space="preserve">
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
<value>Ė×φōŗŧ ţєхŧ !!!</value>
</data>
<data name="ExportFailure" xml:space="preserve">
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
@@ -766,7 +766,7 @@
<value>₣ìпđ !</value>
</data>
<data name="PlainText" xml:space="preserve">
<value>Ρĺáīň Тěхт !!!</value>
<value>Ρĺáīň тěхт !!!</value>
</data>
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
@@ -775,7 +775,7 @@
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
</data>
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
</data>
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
@@ -835,10 +835,10 @@
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Ёмφţγ... !!</value>
<value>Ёмφţγ !</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Ĉĺοŝе Ρаиę !!!</value>
<value>Ĉĺοŝе φаиę !!!</value>
</data>
<data name="ClosePaneToolTip" xml:space="preserve">
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
@@ -848,13 +848,13 @@
<comment>Text used to identify the reset button</comment>
</data>
<data name="MoveTabToNewWindowText" xml:space="preserve">
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
</data>
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
</data>
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
</data>
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
@@ -893,7 +893,7 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>

View File

@@ -193,7 +193,7 @@
<value>Закрыть вкладки справа</value>
</data>
<data name="TabCloseOther" xml:space="preserve">
<value>Закрыть другие вкладки</value>
<value>Закрыть остальные вкладки</value>
</data>
<data name="TabClose" xml:space="preserve">
<value>Закрыть вкладку</value>
@@ -211,10 +211,10 @@
<value>Поиск в Интернете</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>Цвет...</value>
<value>Изменить цвет вкладки</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>Настраиваемый...</value>
<value>Настраиваемый</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>Сбросить</value>
@@ -464,7 +464,7 @@
<comment>This is the heading for a version number label</comment>
</data>
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
<value>Начало работы</value>
<value>Приступая к работе</value>
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
@@ -484,7 +484,7 @@
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>Уведомления сторонних производителей</value>
<value>Уведомления третьих лиц</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -723,7 +723,7 @@
<value>Развернуть</value>
</data>
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
<value>Восстановить размер</value>
<value>Кнопка "Свернуть в окно"</value>
</data>
<data name="CommandPaletteMenuItem" xml:space="preserve">
<value>Палитра команд</value>
@@ -827,7 +827,7 @@
<value>Закрыть эту вкладку</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>Пусто...</value>
<value>Очистить</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>Закрыть панель</value>

View File

@@ -187,7 +187,7 @@
<value>多个窗格</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>关闭</value>
<value>关闭</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>关闭右侧标签页</value>
@@ -208,13 +208,13 @@
<value>拆分窗格</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Web 搜索</value>
<value>网络搜索</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>颜色...</value>
<value>更改选项卡颜色</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>自定义...</value>
<value>自定义</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>重置</value>
@@ -223,7 +223,7 @@
<value>重命名选项卡</value>
</data>
<data name="DuplicateTabText" xml:space="preserve">
<value>复制选项卡</value>
<value>复制标签页</value>
</data>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>找到一个具有无效 "backgroundImage" 的配置文件。将该配置文件设置为默认设置为不包含背景图像。请确保在设置 "backgroundImage" 时,该值是指向图像的有效文件路径。</value>
@@ -480,7 +480,7 @@
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>隐私策</value>
<value>隐私策</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
@@ -827,7 +827,7 @@
<value>关闭此选项卡</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>空白...</value>
<value>空</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>关闭窗格</value>

View File

@@ -187,7 +187,7 @@
<value>多個窗格</value>
</data>
<data name="TabCloseSubMenu" xml:space="preserve">
<value>關閉...</value>
<value>關閉</value>
</data>
<data name="TabCloseAfter" xml:space="preserve">
<value>關閉右側的索引標籤</value>
@@ -202,19 +202,19 @@
<value>關閉窗格</value>
</data>
<data name="SplitTabText" xml:space="preserve">
<value>分割 Tab</value>
<value>分割索引標籤</value>
</data>
<data name="SplitPaneText" xml:space="preserve">
<value>分割窗格</value>
</data>
<data name="SearchWebText" xml:space="preserve">
<value>Web 搜尋</value>
<value>網頁搜尋</value>
</data>
<data name="TabColorChoose" xml:space="preserve">
<value>色彩...</value>
<value>變更索引標籤色彩</value>
</data>
<data name="TabColorCustomButton.Content" xml:space="preserve">
<value>自訂...</value>
<value>自訂</value>
</data>
<data name="TabColorClearButton.Content" xml:space="preserve">
<value>重設</value>
@@ -468,7 +468,7 @@
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
</data>
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
<value>原始程式碼</value>
<value>原始碼</value>
<comment>A hyperlink name for the Terminal's documentation</comment>
</data>
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
@@ -480,11 +480,11 @@
<comment>A hyperlink name for the Terminal's release notes</comment>
</data>
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
<value>隱私權原則</value>
<value>隱私權政策</value>
<comment>A hyperlink name for the Terminal's privacy policy</comment>
</data>
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
<value>第三方聲明</value>
<value>第三方注意事項</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
@@ -827,7 +827,7 @@
<value>關閉此索引標籤</value>
</data>
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
<value>空白...</value>
<value>空</value>
</data>
<data name="ClosePaneText" xml:space="preserve">
<value>關閉窗格</value>

View File

@@ -881,7 +881,10 @@ namespace winrt::TerminalApp::implementation
}
}
CommandPalette().Visibility(Visibility::Collapsed);
if (const auto p = CommandPaletteElement())
{
p.Visibility(Visibility::Collapsed);
}
_UpdateTabView();
}

View File

@@ -8,6 +8,7 @@
#include "RenameWindowRequestedArgs.g.cpp"
#include "RequestMoveContentArgs.g.cpp"
#include "RequestReceiveContentArgs.g.cpp"
#include "LaunchPositionRequest.g.cpp"
#include <filesystem>
@@ -1946,12 +1947,18 @@ namespace winrt::TerminalApp::implementation
layout.LaunchMode({ mode });
// Only save the content size because the tab size will be added on load.
const auto contentWidth = ::base::saturated_cast<float>(_tabContent.ActualWidth());
const auto contentHeight = ::base::saturated_cast<float>(_tabContent.ActualHeight());
const auto contentWidth = static_cast<float>(_tabContent.ActualWidth());
const auto contentHeight = static_cast<float>(_tabContent.ActualHeight());
const winrt::Windows::Foundation::Size windowSize{ contentWidth, contentHeight };
layout.InitialSize(windowSize);
// We don't actually know our own position. So we have to ask the window
// layer for that.
const auto launchPosRequest{ winrt::make<LaunchPositionRequest>() };
RequestLaunchPosition.raise(*this, launchPosRequest);
layout.InitialPosition(launchPosRequest.Position());
ApplicationState::SharedInstance().AppendPersistedWindowLayout(layout);
}
@@ -2351,8 +2358,8 @@ namespace winrt::TerminalApp::implementation
{
return;
}
const auto contentWidth = ::base::saturated_cast<float>(_tabContent.ActualWidth());
const auto contentHeight = ::base::saturated_cast<float>(_tabContent.ActualHeight());
const auto contentWidth = static_cast<float>(_tabContent.ActualWidth());
const auto contentHeight = static_cast<float>(_tabContent.ActualHeight());
const winrt::Windows::Foundation::Size availableSpace{ contentWidth, contentHeight };
const auto realSplitType = activeTab->PreCalculateCanSplit(splitDirection, splitSize, availableSpace);
@@ -3145,7 +3152,8 @@ namespace winrt::TerminalApp::implementation
TerminalConnection::ITerminalConnection existingConnection)
{
if (const auto& newTerminalArgs{ contentArgs.try_as<NewTerminalArgs>() })
const auto& newTerminalArgs{ contentArgs.try_as<NewTerminalArgs>() };
if (contentArgs == nullptr || newTerminalArgs != nullptr || contentArgs.Type().empty())
{
// Terminals are of course special, and have to deal with debug taps, duplicating the tab, etc.
return _MakeTerminalPane(newTerminalArgs, sourceTab, existingConnection);

View File

@@ -10,6 +10,7 @@
#include "RenameWindowRequestedArgs.g.h"
#include "RequestMoveContentArgs.g.h"
#include "RequestReceiveContentArgs.g.h"
#include "LaunchPositionRequest.g.h"
#include "Toast.h"
#define DECLARE_ACTION_HANDLER(action) void _Handle##action(const IInspectable& sender, const Microsoft::Terminal::Settings::Model::ActionEventArgs& args);
@@ -79,6 +80,13 @@ namespace winrt::TerminalApp::implementation
_TabIndex{ tabIndex } {};
};
struct LaunchPositionRequest : LaunchPositionRequestT<LaunchPositionRequest>
{
LaunchPositionRequest() = default;
til::property<winrt::Microsoft::Terminal::Settings::Model::LaunchPosition> Position;
};
struct TerminalPage : TerminalPageT<TerminalPage>
{
public:
@@ -186,6 +194,8 @@ namespace winrt::TerminalApp::implementation
til::typed_event<Windows::Foundation::IInspectable, winrt::TerminalApp::RequestMoveContentArgs> RequestMoveContent;
til::typed_event<Windows::Foundation::IInspectable, winrt::TerminalApp::RequestReceiveContentArgs> RequestReceiveContent;
til::typed_event<IInspectable, winrt::TerminalApp::LaunchPositionRequest> RequestLaunchPosition;
WINRT_OBSERVABLE_PROPERTY(winrt::Windows::UI::Xaml::Media::Brush, TitlebarBrush, PropertyChanged.raise, nullptr);
WINRT_OBSERVABLE_PROPERTY(winrt::Windows::UI::Xaml::Media::Brush, FrameBrush, PropertyChanged.raise, nullptr);

View File

@@ -51,6 +51,11 @@ namespace TerminalApp
Boolean IsQuakeWindow();
};
runtimeclass LaunchPositionRequest
{
Microsoft.Terminal.Settings.Model.LaunchPosition Position;
}
[default_interface] runtimeclass TerminalPage : Windows.UI.Xaml.Controls.Page, Windows.UI.Xaml.Data.INotifyPropertyChanged, Microsoft.Terminal.UI.IDirectKeyListener
{
TerminalPage(WindowProperties properties, ContentManager manager);
@@ -98,5 +103,7 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<Object, RequestMoveContentArgs> RequestMoveContent;
event Windows.Foundation.TypedEventHandler<Object, RequestReceiveContentArgs> RequestReceiveContent;
event Windows.Foundation.TypedEventHandler<Object, LaunchPositionRequest> RequestLaunchPosition;
}
}

View File

@@ -449,9 +449,23 @@ namespace winrt::TerminalApp::implementation
{
ActionAndArgs newTabAction{};
INewContentArgs newContentArgs{ state.firstPane->GetTerminalArgsForPane(kind) };
// Special case here: if there was one pane (which results in no actions
// being generated), and it was a settings pane, then promote that to an
// open settings action. The openSettings action itself has additional machinery
// to prevent multiple top-level settings tabs.
const auto wasSettings = state.args.empty() &&
(newContentArgs && newContentArgs.Type() == L"settings");
if (wasSettings)
{
newTabAction.Action(ShortcutAction::OpenSettings);
newTabAction.Args(OpenSettingsArgs{ SettingsTarget::SettingsUI });
return std::vector<ActionAndArgs>{ std::move(newTabAction) };
}
newTabAction.Action(ShortcutAction::NewTab);
NewTabArgs newTabArgs{ state.firstPane->GetTerminalArgsForPane(kind) };
newTabAction.Args(newTabArgs);
newTabAction.Args(NewTabArgs{ newContentArgs });
state.args.emplace(state.args.begin(), std::move(newTabAction));
}

View File

@@ -562,9 +562,21 @@ namespace winrt::TerminalApp::implementation
{
winrt::Windows::Foundation::Size proposedSize{};
// In focus mode, we don't want to include our own tab row in the size
// of the window that we hand back. So we account for passing
// --focusMode on the commandline here, and the mode in the settings.
// Below, we'll also account for if focus mode was persisted into the
// session for restoration.
bool focusMode = _appArgs.GetLaunchMode().value_or(_settings.GlobalSettings().LaunchMode()) == LaunchMode::FocusMode;
const auto scale = static_cast<float>(dpi) / static_cast<float>(USER_DEFAULT_SCREEN_DPI);
if (const auto layout = LoadPersistedLayout())
{
if (layout.LaunchMode())
{
focusMode = layout.LaunchMode().Value() == LaunchMode::FocusMode;
}
if (layout.InitialSize())
{
proposedSize = layout.InitialSize().Value();
@@ -602,7 +614,7 @@ namespace winrt::TerminalApp::implementation
// GH#2061 - If the global setting "Always show tab bar" is
// set or if "Show tabs in title bar" is set, then we'll need to add
// the height of the tab bar here.
if (_settings.GlobalSettings().ShowTabsInTitlebar())
if (_settings.GlobalSettings().ShowTabsInTitlebar() && !focusMode)
{
// In the past, we used to actually instantiate a TitlebarControl
// and use Measure() to determine the DesiredSize of the control, to
@@ -620,7 +632,7 @@ namespace winrt::TerminalApp::implementation
static constexpr auto titlebarHeight = 40;
proposedSize.Height += (titlebarHeight)*scale;
}
else if (_settings.GlobalSettings().AlwaysShowTabs())
else if (_settings.GlobalSettings().AlwaysShowTabs() && !focusMode)
{
// Same comment as above, but with a TabRowControl.
//

View File

@@ -231,6 +231,8 @@ namespace winrt::TerminalApp::implementation
FORWARDED_TYPED_EVENT(RequestMoveContent, Windows::Foundation::IInspectable, winrt::TerminalApp::RequestMoveContentArgs, _root, RequestMoveContent);
FORWARDED_TYPED_EVENT(RequestReceiveContent, Windows::Foundation::IInspectable, winrt::TerminalApp::RequestReceiveContentArgs, _root, RequestReceiveContent);
FORWARDED_TYPED_EVENT(RequestLaunchPosition, Windows::Foundation::IInspectable, winrt::TerminalApp::LaunchPositionRequest, _root, RequestLaunchPosition);
#ifdef UNIT_TESTING
friend class TerminalAppLocalTests::CommandlineTest;
#endif

View File

@@ -137,6 +137,7 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<Object, RequestMoveContentArgs> RequestMoveContent;
event Windows.Foundation.TypedEventHandler<Object, RequestReceiveContentArgs> RequestReceiveContent;
event Windows.Foundation.TypedEventHandler<Object, LaunchPositionRequest> RequestLaunchPosition;
void AttachContent(String content, UInt32 tabIndex);
void SendContentToOther(RequestReceiveContentArgs args);

View File

@@ -44,12 +44,12 @@ namespace winrt::TerminalApp::implementation
});
}
double TitlebarControl::CaptionButtonWidth()
float TitlebarControl::CaptionButtonWidth()
{
// Divide by three, since we know there are only three buttons. When
// Windows 12 comes along and adds another, we can update this /s
static auto width{ MinMaxCloseControl().ActualWidth() / 3.0 };
return width;
const auto minMaxCloseWidth = MinMaxCloseControl().ActualWidth();
return static_cast<float>(minMaxCloseWidth) / 3.0f;
}
IInspectable TitlebarControl::Content()

View File

@@ -15,7 +15,7 @@ namespace winrt::TerminalApp::implementation
void PressButton(CaptionButton button);
winrt::fire_and_forget ClickButton(CaptionButton button);
void ReleaseButtons();
double CaptionButtonWidth();
float CaptionButtonWidth();
IInspectable Content();
void Content(IInspectable content);

View File

@@ -27,7 +27,7 @@ namespace TerminalApp
void PressButton(CaptionButton button);
void ClickButton(CaptionButton button);
void ReleaseButtons();
Double CaptionButtonWidth { get; };
Single CaptionButtonWidth { get; };
IInspectable Content;
Windows.UI.Xaml.Controls.Border DragBar { get; };

View File

@@ -962,7 +962,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
// - the user's cloud shell settings
WDJ::JsonObject AzureConnection::_GetCloudShellUserSettings()
{
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2020-04-01-preview", _resourceUri) };
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2023-02-01-preview", _resourceUri) };
return _SendRequestReturningJson(uri, nullptr);
}
@@ -972,7 +972,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
// - the uri for the cloud shell
winrt::hstring AzureConnection::_GetCloudShell()
{
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/consoles/default?api-version=2020-04-01-preview", _resourceUri) };
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/consoles/default?api-version=2023-02-01-preview", _resourceUri) };
WWH::HttpStringContent content{
LR"-({"properties": {"osType": "linux"}})-",

View File

@@ -29,19 +29,6 @@ using namespace winrt::Windows::Graphics::Display;
using namespace winrt::Windows::System;
using namespace winrt::Windows::ApplicationModel::DataTransfer;
// The minimum delay between updates to the scroll bar's values.
// The updates are throttled to limit power usage.
constexpr const auto ScrollBarUpdateInterval = std::chrono::milliseconds(8);
// The minimum delay between updating the TSF input control.
constexpr const auto TsfRedrawInterval = std::chrono::milliseconds(100);
// The minimum delay between updating the locations of regex patterns
constexpr const auto UpdatePatternLocationsInterval = std::chrono::milliseconds(500);
// The delay before performing the search after change of search criteria
constexpr const auto SearchAfterChangeDelay = std::chrono::milliseconds(200);
namespace winrt::Microsoft::Terminal::Control::implementation
{
static winrt::Microsoft::Terminal::Core::OptionalColor OptionalFromColor(const til::color& c) noexcept
@@ -99,28 +86,25 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// GH#8969: pre-seed working directory to prevent potential races
_terminal->SetWorkingDirectory(_settings->StartingDirectory());
auto pfnCopyToClipboard = std::bind(&ControlCore::_terminalCopyToClipboard, this, std::placeholders::_1);
auto pfnCopyToClipboard = [this](auto&& PH1) { _terminalCopyToClipboard(std::forward<decltype(PH1)>(PH1)); };
_terminal->SetCopyToClipboardCallback(pfnCopyToClipboard);
auto pfnWarningBell = std::bind(&ControlCore::_terminalWarningBell, this);
auto pfnWarningBell = [this] { _terminalWarningBell(); };
_terminal->SetWarningBellCallback(pfnWarningBell);
auto pfnTitleChanged = std::bind(&ControlCore::_terminalTitleChanged, this, std::placeholders::_1);
auto pfnTitleChanged = [this](auto&& PH1) { _terminalTitleChanged(std::forward<decltype(PH1)>(PH1)); };
_terminal->SetTitleChangedCallback(pfnTitleChanged);
auto pfnScrollPositionChanged = std::bind(&ControlCore::_terminalScrollPositionChanged, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
auto pfnScrollPositionChanged = [this](auto&& PH1, auto&& PH2, auto&& PH3) { _terminalScrollPositionChanged(std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2), std::forward<decltype(PH3)>(PH3)); };
_terminal->SetScrollPositionChangedCallback(pfnScrollPositionChanged);
auto pfnTerminalCursorPositionChanged = std::bind(&ControlCore::_terminalCursorPositionChanged, this);
_terminal->SetCursorPositionChangedCallback(pfnTerminalCursorPositionChanged);
auto pfnTerminalTaskbarProgressChanged = std::bind(&ControlCore::_terminalTaskbarProgressChanged, this);
auto pfnTerminalTaskbarProgressChanged = [this] { _terminalTaskbarProgressChanged(); };
_terminal->TaskbarProgressChangedCallback(pfnTerminalTaskbarProgressChanged);
auto pfnShowWindowChanged = std::bind(&ControlCore::_terminalShowWindowChanged, this, std::placeholders::_1);
auto pfnShowWindowChanged = [this](auto&& PH1) { _terminalShowWindowChanged(std::forward<decltype(PH1)>(PH1)); };
_terminal->SetShowWindowCallback(pfnShowWindowChanged);
auto pfnPlayMidiNote = std::bind(&ControlCore::_terminalPlayMidiNote, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
auto pfnPlayMidiNote = [this](auto&& PH1, auto&& PH2, auto&& PH3) { _terminalPlayMidiNote(std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2), std::forward<decltype(PH3)>(PH3)); };
_terminal->SetPlayMidiNoteCallback(pfnPlayMidiNote);
auto pfnCompletionsChanged = [=](auto&& menuJson, auto&& replaceLength) { _terminalCompletionsChanged(menuJson, replaceLength); };
@@ -167,35 +151,22 @@ namespace winrt::Microsoft::Terminal::Control::implementation
_dispatcher = controller.DispatcherQueue();
}
// A few different events should be throttled, so they don't fire absolutely all the time:
// * _tsfTryRedrawCanvas: When the cursor position moves, we need to
// inform TSF, so it can move the canvas for the composition. We
// throttle this so that we're not hopping across the process boundary
// every time that the cursor moves.
// * _updatePatternLocations: When there's new output, or we scroll the
// viewport, we should re-check if there are any visible hyperlinks.
// But we don't really need to do this every single time text is
// output, we can limit this update to once every 500ms.
// * _updateScrollBar: Same idea as the TSF update - we don't _really_
// need to hop across the process boundary every time text is output.
// We can throttle this to once every 8ms, which will get us out of
// the way of the main output & rendering threads.
const auto shared = _shared.lock();
shared->tsfTryRedrawCanvas = std::make_shared<ThrottledFuncTrailing<>>(
_dispatcher,
TsfRedrawInterval,
[weakThis = get_weak()]() {
if (auto core{ weakThis.get() }; !core->_IsClosing())
{
core->CursorPositionChanged.raise(*core, nullptr);
}
});
// Raises an OutputIdle event once there hasn't been any output for at least 100ms.
// It also updates all regex patterns in the viewport.
//
// NOTE: Calling UpdatePatternLocations from a background
// thread is a workaround for us to hit GH#12607 less often.
shared->updatePatternLocations = std::make_unique<til::throttled_func_trailing<>>(
UpdatePatternLocationsInterval,
[weakTerminal = std::weak_ptr{ _terminal }]() {
shared->outputIdle = std::make_unique<til::debounced_func_trailing<>>(
std::chrono::milliseconds{ 100 },
[weakTerminal = std::weak_ptr{ _terminal }, weakThis = get_weak(), dispatcher = _dispatcher]() {
dispatcher.TryEnqueue(DispatcherQueuePriority::Normal, [weakThis]() {
if (const auto self = weakThis.get(); self && !self->_IsClosing())
{
self->OutputIdle.raise(*self, nullptr);
}
});
if (const auto t = weakTerminal.lock())
{
const auto lock = t->LockForWriting();
@@ -203,11 +174,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
});
// Scrollbar updates are also expensive (XAML), so we'll throttle them as well.
shared->updateScrollBar = std::make_shared<ThrottledFuncTrailing<Control::ScrollPositionChangedArgs>>(
_dispatcher,
ScrollBarUpdateInterval,
std::chrono::milliseconds{ 8 },
[weakThis = get_weak()](const auto& update) {
if (auto core{ weakThis.get() }; !core->_IsClosing())
if (auto core{ weakThis.get() }; core && !core->_IsClosing())
{
core->ScrollPositionChanged.raise(*core, update);
}
@@ -232,8 +204,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// thread. These will be recreated in _setupDispatcherAndCallbacks, when
// we're re-attached to a new control (on a possibly new UI thread).
const auto shared = _shared.lock();
shared->tsfTryRedrawCanvas.reset();
shared->updatePatternLocations.reset();
shared->outputIdle.reset();
shared->updateScrollBar.reset();
}
@@ -453,7 +424,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - wstr: the string of characters to write to the terminal connection.
// Return Value:
// - <none>
void ControlCore::SendInput(const winrt::hstring& wstr)
void ControlCore::SendInput(const std::wstring_view wstr)
{
_sendInputToConnection(wstr);
}
@@ -686,13 +657,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
const auto shared = _shared.lock_shared();
if (shared->updatePatternLocations)
if (shared->outputIdle)
{
(*shared->updatePatternLocations)();
(*shared->outputIdle)();
}
}
void ControlCore::AdjustOpacity(const double adjustment)
void ControlCore::AdjustOpacity(const float adjustment)
{
if (adjustment == 0)
{
@@ -709,11 +680,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - focused (default == true): Whether the window is focused or unfocused.
// Return Value:
// - <none>
void ControlCore::_setOpacity(const double opacity, bool focused)
void ControlCore::_setOpacity(const float opacity, bool focused)
{
const auto newOpacity = std::clamp(opacity,
0.0,
1.0);
const auto newOpacity = std::clamp(opacity, 0.0f, 1.0f);
if (newOpacity == Opacity())
{
@@ -728,7 +697,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
_runtimeFocusedOpacity = focused ? newOpacity : _runtimeFocusedOpacity;
// Manually turn off acrylic if they turn off transparency.
_runtimeUseAcrylic = newOpacity < 1.0 && _settings->UseAcrylic();
_runtimeUseAcrylic = newOpacity < 1.0f && _settings->UseAcrylic();
// Update the renderer as well. It might need to fall back from
// cleartype -> grayscale if the BG is transparent / acrylic.
@@ -896,7 +865,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Method Description:
// - Updates the appearance of the current terminal.
// - INVARIANT: This method can only be called if the caller DOES NOT HAVE writing lock on the terminal.
void ControlCore::ApplyAppearance(const bool& focused)
void ControlCore::ApplyAppearance(const bool focused)
{
const auto lock = _terminal->LockForWriting();
const auto& newAppearance{ focused ? _settings->FocusedAppearance() : _settings->UnfocusedAppearance() };
@@ -915,10 +884,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Incase EnableUnfocusedAcrylic is disabled and Focused Acrylic is set to true,
// the terminal should ignore the unfocused opacity from settings.
// The Focused Opacity from settings should be ignored if overridden at runtime.
bool useFocusedRuntimeOpacity = focused || (!_settings->EnableUnfocusedAcrylic() && UseAcrylic());
double newOpacity = useFocusedRuntimeOpacity ?
FocusedOpacity() :
newAppearance->Opacity();
const auto useFocusedRuntimeOpacity = focused || (!_settings->EnableUnfocusedAcrylic() && UseAcrylic());
const auto newOpacity = useFocusedRuntimeOpacity ? FocusedOpacity() : newAppearance->Opacity();
_setOpacity(newOpacity, focused);
// No need to update Acrylic if UnfocusedAcrylic is disabled
@@ -992,26 +959,23 @@ namespace winrt::Microsoft::Terminal::Control::implementation
if (_renderEngine)
{
std::unordered_map<std::wstring_view, uint32_t> featureMap;
if (const auto fontFeatures = _settings->FontFeatures())
{
featureMap.reserve(fontFeatures.Size());
for (const auto& [tag, param] : fontFeatures)
static constexpr auto cloneMap = [](const IFontFeatureMap& map) {
std::unordered_map<std::wstring_view, float> clone;
if (map)
{
featureMap.emplace(tag, param);
clone.reserve(map.Size());
for (const auto& [tag, param] : map)
{
clone.emplace(tag, param);
}
}
}
std::unordered_map<std::wstring_view, float> axesMap;
if (const auto fontAxes = _settings->FontAxes())
{
axesMap.reserve(fontAxes.Size());
return clone;
};
for (const auto& [axis, value] : fontAxes)
{
axesMap.emplace(axis, value);
}
}
const auto fontFeatures = _settings->FontFeatures();
const auto fontAxes = _settings->FontAxes();
const auto featureMap = cloneMap(fontFeatures);
const auto axesMap = cloneMap(fontAxes);
// TODO: MSFT:20895307 If the font doesn't exist, this doesn't
// actually fail. We need a way to gracefully fallback.
@@ -1037,7 +1001,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const auto fontWeight = _settings->FontWeight();
_desiredFont = { fontFace, 0, fontWeight.Weight, newSize, CP_UTF8 };
_actualFont = { fontFace, 0, fontWeight.Weight, _desiredFont.GetEngineSize(), CP_UTF8, false };
_actualFontFaceName = { fontFace };
_desiredFont.SetEnableBuiltinGlyphs(_builtinGlyphs);
_desiredFont.SetEnableColorGlyphs(_colorGlyphs);
@@ -1120,9 +1083,20 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// If this function succeeds with S_FALSE, then the terminal didn't
// actually change size. No need to notify the connection of this no-op.
const auto hr = _terminal->UserResize({ vp.Width(), vp.Height() });
if (SUCCEEDED(hr) && hr != S_FALSE)
if (FAILED(hr) || hr == S_FALSE)
{
_connection.Resize(vp.Height(), vp.Width());
return;
}
_connection.Resize(vp.Height(), vp.Width());
// TermControl will call Search() once the OutputIdle even fires after 100ms.
// Until then we need to hide the now-stale search results from the renderer.
ClearSearch();
const auto shared = _shared.lock_shared();
if (shared->outputIdle)
{
(*shared->outputIdle)();
}
}
@@ -1435,17 +1409,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
{
const auto fontSize = _actualFont.GetSize();
return {
::base::saturated_cast<float>(fontSize.width),
::base::saturated_cast<float>(fontSize.height)
static_cast<float>(fontSize.width),
static_cast<float>(fontSize.height)
};
}
winrt::hstring ControlCore::FontFaceName() const noexcept
{
// This getter used to return _actualFont.GetFaceName(), however GetFaceName() returns a STL
// string and we need to return a WinRT string. This would require an additional allocation.
// This method is called 10/s by TSFInputControl at the time of writing.
return _actualFontFaceName;
}
uint16_t ControlCore::FontWeight() const noexcept
{
@@ -1616,17 +1583,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
void ControlCore::_terminalCursorPositionChanged()
{
// When the buffer's cursor moves, start the throttled func to
// eventually dispatch a CursorPositionChanged event.
const auto shared = _shared.lock_shared();
if (shared->tsfTryRedrawCanvas)
{
shared->tsfTryRedrawCanvas->Run();
}
}
void ControlCore::_terminalTaskbarProgressChanged()
{
TaskbarProgressChanged.raise(*this, nullptr);
@@ -1695,76 +1651,88 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - text: the text to search
// - goForward: boolean that represents if the current search direction is forward
// - caseSensitive: boolean that represents if the current search is case sensitive
// - resetOnly: If true, only Reset() will be called, if anything. FindNext() will never be called.
// Return Value:
// - <none>
void ControlCore::Search(const winrt::hstring& text, const bool goForward, const bool caseSensitive)
SearchResults ControlCore::Search(const std::wstring_view& text, const bool goForward, const bool caseSensitive, const bool resetOnly)
{
const auto lock = _terminal->LockForWriting();
const auto searchInvalidated = _searcher.IsStale(*_terminal.get(), text, !caseSensitive);
if (_searcher.ResetIfStale(*GetRenderData(), text, !goForward, !caseSensitive))
if (searchInvalidated || !resetOnly)
{
_searcher.HighlightResults();
_searcher.MoveToCurrentSelection();
_cachedSearchResultRows = {};
}
else
{
_searcher.FindNext();
}
std::vector<til::point_span> oldResults;
const auto foundMatch = _searcher.SelectCurrent();
auto foundResults = winrt::make_self<implementation::FoundResultsArgs>(foundMatch);
if (foundMatch)
{
// this is used for search,
// DO NOT call _updateSelectionUI() here.
// We don't want to show the markers so manually tell it to clear it.
_terminal->SetBlockSelection(false);
UpdateSelectionMarkers.raise(*this, winrt::make<implementation::UpdateSelectionMarkersEventArgs>(true));
foundResults->TotalMatches(gsl::narrow<int32_t>(_searcher.Results().size()));
foundResults->CurrentMatch(gsl::narrow<int32_t>(_searcher.CurrentMatch()));
_terminal->AlwaysNotifyOnBufferRotation(true);
}
_renderer->TriggerSelection();
// Raise a FoundMatch event, which the control will use to notify
// narrator if there was any results in the buffer
FoundMatch.raise(*this, *foundResults);
}
Windows::Foundation::Collections::IVector<int32_t> ControlCore::SearchResultRows()
{
const auto lock = _terminal->LockForReading();
if (!_cachedSearchResultRows)
{
auto results = std::vector<int32_t>();
auto lastRow = til::CoordTypeMin;
for (const auto& match : _searcher.Results())
if (searchInvalidated)
{
const auto row{ match.start.y };
if (row != lastRow)
oldResults = _searcher.ExtractResults();
_searcher.Reset(*_terminal.get(), text, !caseSensitive, !goForward);
if (SnapSearchResultToSelection())
{
results.push_back(row);
lastRow = row;
_searcher.MoveToCurrentSelection();
SnapSearchResultToSelection(false);
}
_terminal->SetSearchHighlights(_searcher.Results());
}
else
{
_searcher.FindNext(!goForward);
}
_cachedSearchResultRows = winrt::single_threaded_vector<int32_t>(std::move(results));
if (const auto idx = _searcher.CurrentMatch(); idx >= 0)
{
_terminal->SetSearchHighlightFocused(gsl::narrow<size_t>(idx));
}
_renderer->TriggerSearchHighlight(oldResults);
}
return _cachedSearchResultRows;
int32_t totalMatches = 0;
int32_t currentMatch = 0;
if (const auto idx = _searcher.CurrentMatch(); idx >= 0)
{
totalMatches = gsl::narrow<int32_t>(_searcher.Results().size());
currentMatch = gsl::narrow<int32_t>(idx);
}
return {
.TotalMatches = totalMatches,
.CurrentMatch = currentMatch,
.SearchInvalidated = searchInvalidated,
};
}
const std::vector<til::point_span>& ControlCore::SearchResultRows() const noexcept
{
return _searcher.Results();
}
void ControlCore::ClearSearch()
{
_terminal->AlwaysNotifyOnBufferRotation(false);
const auto lock = _terminal->LockForWriting();
_terminal->SetSearchHighlights({});
_terminal->SetSearchHighlightFocused({});
_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())
@@ -1795,6 +1763,38 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return;
}
FILETIME lastWriteTime;
SYSTEMTIME lastWriteSystemTime;
if (!GetFileTime(file.get(), nullptr, nullptr, &lastWriteTime) ||
!FileTimeToSystemTime(&lastWriteTime, &lastWriteSystemTime))
{
return;
}
wchar_t dateBuf[256];
const auto dateLen = GetDateFormatEx(nullptr, 0, &lastWriteSystemTime, nullptr, &dateBuf[0], ARRAYSIZE(dateBuf), nullptr);
wchar_t timeBuf[256];
const auto timeLen = GetTimeFormatEx(nullptr, 0, &lastWriteSystemTime, nullptr, &timeBuf[0], ARRAYSIZE(timeBuf));
std::wstring message;
if (dateLen > 0 && timeLen > 0)
{
const auto msg = RS_(L"SessionRestoreMessage");
const std::wstring_view date{ &dateBuf[0], gsl::narrow_cast<size_t>(dateLen) };
const std::wstring_view time{ &timeBuf[0], gsl::narrow_cast<size_t>(timeLen) };
// This escape sequence string
// * sets the color to white on a bright black background ("\x1b[100;37m")
// * prints " [Restored <date> <time>] <spaces until end of line> "
// * resets the color ("\x1b[m")
// * newlines
// * clears the screen ("\x1b[2J")
// The last step is necessary because we launch ConPTY without PSEUDOCONSOLE_INHERIT_CURSOR by default.
// This will cause ConPTY to emit a \x1b[2J sequence on startup to ensure it and the terminal are in-sync.
// If we didn't do a \x1b[2J ourselves as well, the user would briefly see the last state of the terminal,
// before it's quickly scrolled away once ConPTY has finished starting up, which looks weird.
message = fmt::format(FMT_COMPILE(L"\x1b[100;37m [{} {} {}]\x1b[K\x1b[m\r\n\x1b[2J"), msg, date, time);
}
wchar_t buffer[32 * 1024];
DWORD read = 0;
@@ -1820,9 +1820,17 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
// This pushes the restored contents up into the scrollback.
const auto lock = _terminal->LockForWriting();
_terminal->Write(L"\x1b[2J");
{
const auto lock = _terminal->LockForWriting();
// Normally the cursor should already be at the start of the line, but let's be absolutely sure it is.
if (_terminal->GetCursorPosition().x != 0)
{
_terminal->Write(L"\r\n");
}
_terminal->Write(message);
}
}
void ControlCore::_rendererWarning(const HRESULT hr, wil::zwstring_view parameter)
@@ -1987,93 +1995,98 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
else if (_settings->RepositionCursorWithMouse()) // This is also mode==Char && !shiftEnabled
{
// If we're handling a single left click, without shift pressed, and
// outside mouse mode, AND the user has RepositionCursorWithMouse turned
// on, let's try to move the cursor.
//
// We'll only move the cursor if the user has clicked after the last
// mark, if there is one. That means the user also needs to set up
// shell integration to enable this feature.
//
// As noted in GH #8573, there's plenty of edge cases with this
// approach, but it's good enough to bring value to 90% of use cases.
const auto cursorPos{ _terminal->GetCursorPosition() };
_repositionCursorWithMouse(terminalPosition);
}
_updateSelectionUI();
}
// Does the current buffer line have a mark on it?
const auto& marks{ _terminal->GetMarkExtents() };
if (!marks.empty())
void ControlCore::_repositionCursorWithMouse(const til::point terminalPosition)
{
// If we're handling a single left click, without shift pressed, and
// outside mouse mode, AND the user has RepositionCursorWithMouse turned
// on, let's try to move the cursor.
//
// We'll only move the cursor if the user has clicked after the last
// mark, if there is one. That means the user also needs to set up
// shell integration to enable this feature.
//
// As noted in GH #8573, there's plenty of edge cases with this
// approach, but it's good enough to bring value to 90% of use cases.
const auto cursorPos{ _terminal->GetCursorPosition() };
// Does the current buffer line have a mark on it?
const auto& marks{ _terminal->GetMarkExtents() };
if (!marks.empty())
{
const auto& last{ marks.back() };
const auto [start, end] = last.GetExtent();
const auto bufferSize = _terminal->GetTextBuffer().GetSize();
auto lastNonSpace = _terminal->GetTextBuffer().GetLastNonSpaceCharacter();
bufferSize.IncrementInBounds(lastNonSpace, true);
// If the user clicked off to the right side of the prompt, we
// want to send keystrokes to the last character in the prompt +1.
//
// We don't want to send too many here. In CMD, if the user's
// last command is longer than what they've currently typed, and
// they press right arrow at the end of the prompt, COOKED_READ
// will fill in characters from the previous command.
//
// By only sending keypresses to the end of the command + 1, we
// should leave the cursor at the very end of the prompt,
// without adding any characters from a previous command.
// terminalPosition is viewport-relative.
const auto bufferPos = _terminal->GetViewport().Origin() + terminalPosition;
if (bufferPos.y > lastNonSpace.y)
{
const auto& last{ marks.back() };
const auto [start, end] = last.GetExtent();
const auto bufferSize = _terminal->GetTextBuffer().GetSize();
auto lastNonSpace = _terminal->GetTextBuffer().GetLastNonSpaceCharacter();
bufferSize.IncrementInBounds(lastNonSpace, true);
// Clicked under the prompt. Bail.
return;
}
// If the user clicked off to the right side of the prompt, we
// want to send keystrokes to the last character in the prompt +1.
//
// We don't want to send too many here. In CMD, if the user's
// last command is longer than what they've currently typed, and
// they press right arrow at the end of the prompt, COOKED_READ
// will fill in characters from the previous command.
//
// By only sending keypresses to the end of the command + 1, we
// should leave the cursor at the very end of the prompt,
// without adding any characters from a previous command.
// Limit the click to 1 past the last character on the last line.
const auto clampedClick = std::min(bufferPos, lastNonSpace);
// terminalPosition is viewport-relative.
const auto bufferPos = _terminal->GetViewport().Origin() + terminalPosition;
if (bufferPos.y > lastNonSpace.y)
if (clampedClick >= last.end)
{
// Get the distance between the cursor and the click, in cells.
// First, make sure to iterate from the first point to the
// second. The user may have clicked _earlier_ in the
// buffer!
auto goRight = clampedClick > cursorPos;
const auto startPoint = goRight ? cursorPos : clampedClick;
const auto endPoint = goRight ? clampedClick : cursorPos;
const auto delta = _terminal->GetTextBuffer().GetCellDistance(startPoint, endPoint);
const WORD key = goRight ? VK_RIGHT : VK_LEFT;
std::wstring buffer;
const auto append = [&](TerminalInput::OutputType&& out) {
if (out)
{
buffer.append(std::move(*out));
}
};
// Send an up and a down once per cell. This won't
// accurately handle wide characters, or continuation
// prompts, or cases where a single escape character in the
// command (e.g. ^[) takes up two cells.
for (size_t i = 0u; i < delta; i++)
{
// Clicked under the prompt. Bail.
return;
append(_terminal->SendKeyEvent(key, 0, {}, true));
append(_terminal->SendKeyEvent(key, 0, {}, false));
}
// Limit the click to 1 past the last character on the last line.
const auto clampedClick = std::min(bufferPos, lastNonSpace);
if (clampedClick >= end)
{
// Get the distance between the cursor and the click, in cells.
// First, make sure to iterate from the first point to the
// second. The user may have clicked _earlier_ in the
// buffer!
auto goRight = clampedClick > cursorPos;
const auto startPoint = goRight ? cursorPos : clampedClick;
const auto endPoint = goRight ? clampedClick : cursorPos;
const auto delta = _terminal->GetTextBuffer().GetCellDistance(startPoint, endPoint);
const WORD key = goRight ? VK_RIGHT : VK_LEFT;
std::wstring buffer;
const auto append = [&](TerminalInput::OutputType&& out) {
if (out)
{
buffer.append(std::move(*out));
}
};
// Send an up and a down once per cell. This won't
// accurately handle wide characters, or continuation
// prompts, or cases where a single escape character in the
// command (e.g. ^[) takes up two cells.
for (size_t i = 0u; i < delta; i++)
{
append(_terminal->SendKeyEvent(key, 0, {}, true));
append(_terminal->SendKeyEvent(key, 0, {}, false));
}
{
// Sending input requires that we're unlocked, because
// writing the input pipe may block indefinitely.
const auto suspension = _terminal->SuspendLock();
_sendInputToConnection(buffer);
}
// Sending input requires that we're unlocked, because
// writing the input pipe may block indefinitely.
const auto suspension = _terminal->SuspendLock();
_sendInputToConnection(buffer);
}
}
}
_updateSelectionUI();
}
// Method Description:
@@ -2129,9 +2142,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Start the throttled update of where our hyperlinks are.
const auto shared = _shared.lock_shared();
if (shared->updatePatternLocations)
if (shared->outputIdle)
{
(*shared->updatePatternLocations)();
(*shared->outputIdle)();
}
}
catch (...)
@@ -2141,6 +2154,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
::Microsoft::Console::Render::Renderer* ControlCore::GetRenderer() const noexcept
{
return _renderer.get();
}
uint64_t ControlCore::SwapChainHandle() const
{
// This is only ever called by TermControl::AttachContent, which occurs
@@ -2340,7 +2358,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return _settings->HasUnfocusedAppearance();
}
void ControlCore::AdjustOpacity(const double opacityAdjust, const bool relative)
void ControlCore::AdjustOpacity(const float opacityAdjust, const bool relative)
{
if (relative)
{
@@ -2593,12 +2611,27 @@ namespace winrt::Microsoft::Terminal::Control::implementation
CompletionsChanged.raise(*this, *args);
}
// Select the region of text between [s.start, s.end), in buffer space
void ControlCore::_selectSpan(til::point_span s)
{
// s.end is an _exclusive_ point. We need an inclusive one. But
// decrement in bounds wants an inclusive one. If you pass an exclusive
// one, then it might assert at you for being out of bounds. So we also
// take care of the case that the end point is outside the viewport
// manually.
const auto bufferSize{ _terminal->GetTextBuffer().GetSize() };
bufferSize.DecrementInBounds(s.end);
til::point inclusiveEnd = s.end;
if (s.end.x == bufferSize.Width())
{
inclusiveEnd = til::point{ std::max(0, s.end.x - 1), s.end.y };
}
else
{
bufferSize.DecrementInBounds(inclusiveEnd);
}
_terminal->SelectNewRegion(s.start, s.end);
_terminal->SelectNewRegion(s.start, inclusiveEnd);
_renderer->TriggerSelection();
}

View File

@@ -91,7 +91,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void Detach();
void UpdateSettings(const Control::IControlSettings& settings, const IControlAppearance& newAppearance);
void ApplyAppearance(const bool& focused);
void ApplyAppearance(const bool focused);
Control::IControlSettings Settings();
Control::IControlAppearance FocusedAppearance() const;
Control::IControlAppearance UnfocusedAppearance() const;
@@ -100,6 +100,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
winrt::Microsoft::Terminal::Core::Scheme ColorScheme() const noexcept;
void ColorScheme(const winrt::Microsoft::Terminal::Core::Scheme& scheme);
::Microsoft::Console::Render::Renderer* GetRenderer() const noexcept;
uint64_t SwapChainHandle() const;
void AttachToNewControl(const Microsoft::Terminal::Control::IKeyBindings& keyBindings);
@@ -113,13 +114,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
winrt::Windows::Foundation::Size FontSizeInDips() const;
winrt::Windows::Foundation::Size FontSize() const noexcept;
winrt::hstring FontFaceName() const noexcept;
uint16_t FontWeight() const noexcept;
til::color ForegroundColor() const;
til::color BackgroundColor() const;
void SendInput(const winrt::hstring& wstr);
void SendInput(std::wstring_view wstr);
void PasteText(const winrt::hstring& hstr);
bool CopySelectionToClipboard(bool singleLine, const Windows::Foundation::IReference<CopyFormat>& formats);
void SelectAll();
@@ -136,7 +136,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void LostFocus();
void ToggleShaderEffects();
void AdjustOpacity(const double adjustment);
void AdjustOpacity(const float adjustment);
void ResumeRendering();
void SetHoveredCell(Core::Point terminalPosition);
@@ -219,10 +219,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void SetSelectionAnchor(const til::point position);
void SetEndSelectionPoint(const til::point position);
void Search(const winrt::hstring& text, const bool goForward, const bool caseSensitive);
SearchResults Search(const std::wstring_view& text, bool goForward, bool caseSensitive, bool reset);
const std::vector<til::point_span>& SearchResultRows() const noexcept;
void ClearSearch();
Windows::Foundation::Collections::IVector<int32_t> SearchResultRows();
void SnapSearchResultToSelection(bool snap) noexcept;
bool SnapSearchResultToSelection() const noexcept;
void LeftClickOnTerminal(const til::point terminalPosition,
const int numberOfClicks,
@@ -241,9 +242,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
hstring ReadEntireBuffer() const;
Control::CommandHistoryContext CommandHistory() const;
static bool IsVintageOpacityAvailable() noexcept;
void AdjustOpacity(const double opacity, const bool relative);
void AdjustOpacity(const float opacity, const bool relative);
void WindowVisibilityChanged(const bool showOrHide);
@@ -258,8 +257,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
bool ShouldShowSelectCommand();
bool ShouldShowSelectOutput();
RUNTIME_SETTING(double, Opacity, _settings->Opacity());
RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity());
RUNTIME_SETTING(float, Opacity, _settings->Opacity());
RUNTIME_SETTING(float, FocusedOpacity, FocusedAppearance().Opacity());
RUNTIME_SETTING(bool, UseAcrylic, _settings->UseAcrylic());
// -------------------------------- WinRT Events ---------------------------------
@@ -271,7 +270,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
til::typed_event<> TabColorChanged;
til::typed_event<> BackgroundColorChanged;
til::typed_event<IInspectable, Control::ScrollPositionChangedArgs> ScrollPositionChanged;
til::typed_event<> CursorPositionChanged;
til::typed_event<> TaskbarProgressChanged;
til::typed_event<> ConnectionStateChanged;
til::typed_event<> HoveredHyperlinkChanged;
@@ -280,8 +278,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
til::typed_event<IInspectable, Control::RendererWarningArgs> RendererWarning;
til::typed_event<IInspectable, Control::NoticeEventArgs> RaiseNotice;
til::typed_event<IInspectable, Control::TransparencyChangedEventArgs> TransparencyChanged;
til::typed_event<> ReceivedOutput;
til::typed_event<IInspectable, Control::FoundResultsArgs> FoundMatch;
til::typed_event<> OutputIdle;
til::typed_event<IInspectable, Control::ShowWindowArgs> ShowWindowChanged;
til::typed_event<IInspectable, Control::UpdateSelectionMarkersEventArgs> UpdateSelectionMarkers;
til::typed_event<IInspectable, Control::OpenHyperlinkEventArgs> OpenHyperlink;
@@ -296,8 +293,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
private:
struct SharedState
{
std::shared_ptr<ThrottledFuncTrailing<>> tsfTryRedrawCanvas;
std::unique_ptr<til::throttled_func_trailing<>> updatePatternLocations;
std::unique_ptr<til::debounced_func_trailing<>> outputIdle;
std::shared_ptr<ThrottledFuncTrailing<Control::ScrollPositionChangedArgs>> updateScrollBar;
};
@@ -321,12 +317,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
std::unique_ptr<::Microsoft::Console::Render::Renderer> _renderer{ nullptr };
::Search _searcher;
bool _snapSearchResultToSelection;
winrt::handle _lastSwapChainHandle{ nullptr };
FontInfoDesired _desiredFont;
FontInfo _actualFont;
winrt::hstring _actualFontFaceName;
bool _builtinGlyphs = true;
bool _colorGlyphs = true;
CSSLengthPercentage _cellWidth;
@@ -356,8 +352,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
til::point _contextMenuBufferPosition{ 0, 0 };
Windows::Foundation::Collections::IVector<int32_t> _cachedSearchResultRows{ nullptr };
void _setupDispatcherAndCallbacks();
bool _setFontSizeUnderLock(float fontSize);
@@ -376,7 +370,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void _terminalScrollPositionChanged(const int viewTop,
const int viewHeight,
const int bufferSize);
void _terminalCursorPositionChanged();
void _terminalTaskbarProgressChanged();
void _terminalShowWindowChanged(bool showOrHide);
void _terminalPlayMidiNote(const int noteNumber,
@@ -401,12 +394,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void _updateAntiAliasingMode();
void _connectionOutputHandler(const hstring& hstr);
void _updateHoveredCell(const std::optional<til::point> terminalPosition);
void _setOpacity(const double opacity, const bool focused = true);
void _setOpacity(const float opacity, const bool focused = true);
bool _isBackgroundTransparent();
void _focusChanged(bool focused);
void _selectSpan(til::point_span s);
void _repositionCursorWithMouse(const til::point terminalPosition);
void _contextMenuSelectMark(
const til::point& pos,

View File

@@ -49,6 +49,13 @@ namespace Microsoft.Terminal.Control
Boolean EndAtRightBoundary;
};
struct SearchResults
{
Int32 TotalMatches;
Int32 CurrentMatch;
Boolean SearchInvalidated;
};
[default_interface] runtimeclass SelectionColor
{
SelectionColor();
@@ -87,9 +94,8 @@ namespace Microsoft.Terminal.Control
UInt64 SwapChainHandle { get; };
Windows.Foundation.Size FontSize { get; };
String FontFaceName { get; };
UInt16 FontWeight { get; };
Double Opacity { get; };
Single Opacity { get; };
Boolean UseAcrylic { get; };
Boolean TryMarkModeKeybinding(Int16 vkey,
@@ -128,9 +134,9 @@ namespace Microsoft.Terminal.Control
void ResumeRendering();
void BlinkAttributeTick();
void Search(String text, Boolean goForward, Boolean caseSensitive);
SearchResults Search(String text, Boolean goForward, Boolean caseSensitive, Boolean reset);
void ClearSearch();
IVector<Int32> SearchResultRows { get; };
Boolean SnapSearchResultToSelection;
Microsoft.Terminal.Core.Color ForegroundColor { get; };
Microsoft.Terminal.Core.Color BackgroundColor { get; };
@@ -149,7 +155,7 @@ namespace Microsoft.Terminal.Control
String ReadEntireBuffer();
CommandHistoryContext CommandHistory();
void AdjustOpacity(Double Opacity, Boolean relative);
void AdjustOpacity(Single Opacity, Boolean relative);
void WindowVisibilityChanged(Boolean showOrHide);
void ColorSelection(SelectionColor fg, SelectionColor bg, Microsoft.Terminal.Core.MatchMode matchMode);
@@ -171,15 +177,13 @@ namespace Microsoft.Terminal.Control
// These events are always called from the UI thread (bugs aside)
event Windows.Foundation.TypedEventHandler<Object, FontSizeChangedArgs> FontSizeChanged;
event Windows.Foundation.TypedEventHandler<Object, ScrollPositionChangedArgs> ScrollPositionChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> CursorPositionChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> ConnectionStateChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> HoveredHyperlinkChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> SwapChainChanged;
event Windows.Foundation.TypedEventHandler<Object, RendererWarningArgs> RendererWarning;
event Windows.Foundation.TypedEventHandler<Object, NoticeEventArgs> RaiseNotice;
event Windows.Foundation.TypedEventHandler<Object, TransparencyChangedEventArgs> TransparencyChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> ReceivedOutput;
event Windows.Foundation.TypedEventHandler<Object, FoundResultsArgs> FoundMatch;
event Windows.Foundation.TypedEventHandler<Object, Object> OutputIdle;
event Windows.Foundation.TypedEventHandler<Object, UpdateSelectionMarkersEventArgs> UpdateSelectionMarkers;
event Windows.Foundation.TypedEventHandler<Object, OpenHyperlinkEventArgs> OpenHyperlink;
event Windows.Foundation.TypedEventHandler<Object, Object> CloseTerminalRequested;

View File

@@ -518,7 +518,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void ControlInteractivity::_mouseTransparencyHandler(const int32_t mouseDelta) const
{
// Transparency is on a scale of [0.0,1.0], so only increment by .01.
const auto effectiveDelta = mouseDelta < 0 ? -.01 : .01;
const auto effectiveDelta = mouseDelta < 0 ? -.01f : .01f;
_core->AdjustOpacity(effectiveDelta);
}
@@ -554,7 +554,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// underneath us. We wouldn't know - we don't want the overhead of
// another ScrollPositionChanged handler. If the scrollbar should be
// somewhere other than where it is currently, then start from that row.
const auto currentInternalRow = ::base::saturated_cast<int>(::std::round(_internalScrollbarPosition));
const auto currentInternalRow = std::lround(_internalScrollbarPosition);
const auto currentCoreRow = _core->ScrollOffset();
const auto currentOffset = currentInternalRow == currentCoreRow ?
_internalScrollbarPosition :
@@ -564,13 +564,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// However, for us, the signs are flipped.
// With one of the precision mice, one click is always a multiple of 120 (WHEEL_DELTA),
// but the "smooth scrolling" mode results in non-int values
const auto rowDelta = mouseDelta / (-1.0 * WHEEL_DELTA);
const auto rowDelta = mouseDelta / (-1.0f * WHEEL_DELTA);
// WHEEL_PAGESCROLL is a Win32 constant that represents the "scroll one page
// at a time" setting. If we ignore it, we will scroll a truly absurd number
// of rows.
const auto rowsToScroll{ _rowsToScroll == WHEEL_PAGESCROLL ? ::base::saturated_cast<double>(_core->ViewHeight()) : _rowsToScroll };
auto newValue = (rowsToScroll * rowDelta) + (currentOffset);
const auto rowsToScroll{ _rowsToScroll == WHEEL_PAGESCROLL ? _core->ViewHeight() : _rowsToScroll };
const auto newValue = rowsToScroll * rowDelta + currentOffset;
// Update the Core's viewport position, and raise a
// ScrollPositionChanged event to update the scrollbar
@@ -600,17 +600,17 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - newValue: The new top of the viewport
// Return Value:
// - <none>
void ControlInteractivity::UpdateScrollbar(const double newValue)
void ControlInteractivity::UpdateScrollbar(const float newValue)
{
// Set this as the new value of our internal scrollbar representation.
// We're doing this so we can accumulate fractional amounts of a row to
// scroll each time the mouse scrolls.
_internalScrollbarPosition = std::clamp<double>(newValue, 0.0, _core->BufferHeight());
_internalScrollbarPosition = std::clamp(newValue, 0.0f, static_cast<float>(_core->BufferHeight()));
// If the new scrollbar position, rounded to an int, is at a different
// row, then actually update the scroll position in the core, and raise
// a ScrollPositionChanged to inform the control.
auto viewTop = ::base::saturated_cast<int>(::std::round(_internalScrollbarPosition));
const auto viewTop = std::lround(_internalScrollbarPosition);
if (viewTop != _core->ScrollOffset())
{
_core->UserScrollViewport(viewTop);

View File

@@ -78,7 +78,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const Core::Point pixelPosition,
const Control::MouseButtonState state);
void UpdateScrollbar(const double newValue);
void UpdateScrollbar(const float newValue);
#pragma endregion
@@ -110,8 +110,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
std::unique_ptr<::Microsoft::Console::Render::UiaEngine> _uiaEngine;
winrt::com_ptr<ControlCore> _core{ nullptr };
unsigned int _rowsToScroll;
double _internalScrollbarPosition{ 0.0 };
UINT _rowsToScroll = 3;
float _internalScrollbarPosition = 0;
// If this is set, then we assume we are in the middle of panning the
// viewport via touch input.

View File

@@ -64,7 +64,7 @@ namespace Microsoft.Terminal.Control
Microsoft.Terminal.Core.Point pixelPosition,
MouseButtonState state);
void UpdateScrollbar(Double newValue);
void UpdateScrollbar(Single newValue);
Boolean ManglePathsForWsl { get; };

View File

@@ -10,7 +10,7 @@ Licensed under the MIT license.
#include <conattrs.hpp>
#include "ControlAppearance.h"
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, uint32_t>;
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
using IFontAxesMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
namespace winrt::Microsoft::Terminal::Control::implementation

View File

@@ -12,7 +12,6 @@
#include "ScrollPositionChangedArgs.g.cpp"
#include "RendererWarningArgs.g.cpp"
#include "TransparencyChangedEventArgs.g.cpp"
#include "FoundResultsArgs.g.cpp"
#include "ShowWindowArgs.g.cpp"
#include "UpdateSelectionMarkersEventArgs.g.cpp"
#include "CompletionsChangedEventArgs.g.cpp"

View File

@@ -12,7 +12,6 @@
#include "ScrollPositionChangedArgs.g.h"
#include "RendererWarningArgs.g.h"
#include "TransparencyChangedEventArgs.g.h"
#include "FoundResultsArgs.g.h"
#include "ShowWindowArgs.g.h"
#include "UpdateSelectionMarkersEventArgs.g.h"
#include "CompletionsChangedEventArgs.g.h"
@@ -133,25 +132,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
struct TransparencyChangedEventArgs : public TransparencyChangedEventArgsT<TransparencyChangedEventArgs>
{
public:
TransparencyChangedEventArgs(const double opacity) :
TransparencyChangedEventArgs(const float opacity) :
_Opacity(opacity)
{
}
WINRT_PROPERTY(double, Opacity);
};
struct FoundResultsArgs : public FoundResultsArgsT<FoundResultsArgs>
{
public:
FoundResultsArgs(const bool foundMatch) :
_FoundMatch(foundMatch)
{
}
WINRT_PROPERTY(bool, FoundMatch);
WINRT_PROPERTY(int32_t, TotalMatches);
WINRT_PROPERTY(int32_t, CurrentMatch);
WINRT_PROPERTY(float, Opacity);
};
struct ShowWindowArgs : public ShowWindowArgsT<ShowWindowArgs>

View File

@@ -75,15 +75,14 @@ namespace Microsoft.Terminal.Control
runtimeclass TransparencyChangedEventArgs
{
Double Opacity { get; };
Single Opacity { get; };
}
runtimeclass FoundResultsArgs
enum SearchState
{
Boolean FoundMatch { get; };
Int32 TotalMatches { get; };
Int32 CurrentMatch { get; };
}
Inactive = 0,
Active = 1,
};
runtimeclass ShowWindowArgs
{

View File

@@ -1090,9 +1090,9 @@ til::rect HwndTerminal::GetPadding() const noexcept
return {};
}
double HwndTerminal::GetScaleFactor() const noexcept
float HwndTerminal::GetScaleFactor() const noexcept
{
return static_cast<double>(_currentDpi) / static_cast<double>(USER_DEFAULT_SCREEN_DPI);
return static_cast<float>(_currentDpi) / static_cast<float>(USER_DEFAULT_SCREEN_DPI);
}
void HwndTerminal::ChangeViewport(const til::inclusive_rect& NewWindow)

View File

@@ -146,7 +146,7 @@ private:
// Inherited via IControlAccessibilityInfo
til::size GetFontSize() const noexcept override;
til::rect GetBounds() const noexcept override;
double GetScaleFactor() const noexcept override;
float GetScaleFactor() const noexcept override;
void ChangeViewport(const til::inclusive_rect& NewWindow) override;
HRESULT GetHostUiaProvider(IRawElementProviderSimple** provider) noexcept override;
til::rect GetPadding() const noexcept override;

View File

@@ -7,12 +7,12 @@ namespace Microsoft.Terminal.Control
{
Microsoft.Terminal.Core.Color SelectionBackground { get; };
String BackgroundImage { get; };
Double BackgroundImageOpacity { get; };
Single BackgroundImageOpacity { get; };
Windows.UI.Xaml.Media.Stretch BackgroundImageStretchMode { get; };
Windows.UI.Xaml.HorizontalAlignment BackgroundImageHorizontalAlignment { get; };
Windows.UI.Xaml.VerticalAlignment BackgroundImageVerticalAlignment { get; };
// IntenseIsBold and IntenseIsBright are in Core Appearance
Double Opacity { get; };
Single Opacity { get; };
Boolean UseAcrylic { get; };
// Experimental settings

View File

@@ -40,7 +40,7 @@ namespace Microsoft.Terminal.Control
Single FontSize { get; };
Windows.UI.Text.FontWeight FontWeight { get; };
String Padding { get; };
Windows.Foundation.Collections.IMap<String, UInt32> FontFeatures { get; };
Windows.Foundation.Collections.IMap<String, Single> FontFeatures { get; };
Windows.Foundation.Collections.IMap<String, Single> FontAxes { get; };
Boolean EnableBuiltinGlyphs { get; };
Boolean EnableColorGlyphs { get; };

View File

@@ -169,14 +169,14 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return _controlPadding;
}
double InteractivityAutomationPeer::GetScaleFactor() const noexcept
float InteractivityAutomationPeer::GetScaleFactor() const noexcept
{
return DisplayInformation::GetForCurrentView().RawPixelsPerViewPixel();
return static_cast<float>(DisplayInformation::GetForCurrentView().RawPixelsPerViewPixel());
}
void InteractivityAutomationPeer::ChangeViewport(const til::inclusive_rect& NewWindow)
{
_interactivity->UpdateScrollbar(NewWindow.top);
_interactivity->UpdateScrollbar(static_cast<float>(NewWindow.top));
}
#pragma endregion

View File

@@ -66,7 +66,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
virtual til::size GetFontSize() const noexcept override;
virtual til::rect GetBounds() const noexcept override;
virtual til::rect GetPadding() const noexcept override;
virtual double GetScaleFactor() const noexcept override;
virtual float GetScaleFactor() const noexcept override;
virtual void ChangeViewport(const til::inclusive_rect& NewWindow) override;
virtual HRESULT GetHostUiaProvider(IRawElementProviderSimple** provider) override;
#pragma endregion

View File

@@ -296,4 +296,8 @@ Installieren Sie entweder die fehlende Schriftart, oder wählen Sie eine andere
<value>Ausgabe auswählen</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Wiederhergestellt</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@ Please either install the missing font or choose another one.</value>
<value>Select output</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Restored</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@ Instale la fuente que falta o elija otra.</value>
<value>Seleccionar salida</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Se ha restaurado</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@ Installez la police manquante ou choisissez-en une autre.</value>
<value>Sélectionner la sortie</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Restaurée</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@ Installare il tipo di carattere mancante o sceglierne un altro.</value>
<value>Seleziona output</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Ripristinato</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>出力の選択</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>復元済み</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>출력 선택</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>복원됨</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@ Instale a fonte ausente ou escolha outra.</value>
<value>Selecionar saída</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Restaurado</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>Ŝ℮ĺèčť οùτφųţ !!! </value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Яєŝťòяёď !!</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>Ŝ℮ĺèčť οùτφųţ !!! </value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Яєŝťòяёď !!</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>Ŝ℮ĺèčť οùτφųţ !!! </value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Яєŝťòяёď !!</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>Выбрать вывод</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>Восстановлено</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>选择输出</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>已还原</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -296,4 +296,8 @@
<value>選取輸出</value>
<comment>The tooltip for a button for selecting all of a command's output</comment>
</data>
<data name="SessionRestoreMessage" xml:space="preserve">
<value>已還原</value>
<comment>"Restored" as in "This content was restored"</comment>
</data>
</root>

View File

@@ -26,18 +26,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
});
this->CharacterReceived({ this, &SearchBoxControl::_CharacterHandler });
this->KeyDown({ this, &SearchBoxControl::_KeyDownHandler });
this->RegisterPropertyChangedCallback(UIElement::VisibilityProperty(), [this](auto&&, auto&&) {
// Once the control is visible again we trigger SearchChanged event.
// We do this since we probably have a value from the previous search,
// and in such case logically the search changes from "nothing" to this value.
// A good example for SearchChanged event consumer is Terminal Control.
// Once the Search Box is open we want the Terminal Control
// to immediately perform the search with the value appearing in the box.
if (Visibility() == Visibility::Visible)
{
SearchChanged.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
}
});
_focusableElements.insert(TextBox());
_focusableElements.insert(CloseButton());
@@ -207,6 +195,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
winrt::hstring SearchBoxControl::Text()
{
return TextBox().Text();
}
// Method Description:
// - Check if the current search direction is forward
// Arguments:
@@ -214,7 +207,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Return Value:
// - bool: the current search direction, determined by the
// states of the two direction buttons
bool SearchBoxControl::_GoForward()
bool SearchBoxControl::GoForward()
{
return GoForwardButton().IsChecked().GetBoolean();
}
@@ -226,7 +219,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Return Value:
// - bool: whether the current search is case sensitive (case button is checked )
// or not
bool SearchBoxControl::_CaseSensitive()
bool SearchBoxControl::CaseSensitive()
{
return CaseSensitivityButton().IsChecked().GetBoolean();
}
@@ -252,11 +245,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const auto state = CoreWindow::GetForCurrentThread().GetKeyState(winrt::Windows::System::VirtualKey::Shift);
if (WI_IsFlagSet(state, CoreVirtualKeyStates::Down))
{
Search.raise(TextBox().Text(), !_GoForward(), _CaseSensitive());
Search.raise(Text(), !GoForward(), CaseSensitive());
}
else
{
Search.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
Search.raise(Text(), GoForward(), CaseSensitive());
}
e.Handled(true);
}
@@ -347,7 +340,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
// kick off search
Search.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
Search.raise(Text(), GoForward(), CaseSensitive());
}
// Method Description:
@@ -368,7 +361,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
// kick off search
Search.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
Search.raise(Text(), GoForward(), CaseSensitive());
}
// Method Description:
@@ -406,7 +399,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - <none>
void SearchBoxControl::TextBoxTextChanged(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::RoutedEventArgs const& /*e*/)
{
SearchChanged.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
SearchChanged.raise(Text(), GoForward(), CaseSensitive());
}
// Method Description:
@@ -418,7 +411,23 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// - <none>
void SearchBoxControl::CaseSensitivityButtonClicked(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::RoutedEventArgs const& /*e*/)
{
SearchChanged.raise(TextBox().Text(), _GoForward(), _CaseSensitive());
SearchChanged.raise(Text(), GoForward(), CaseSensitive());
}
// Method Description:
// - Handler for searchbox pointer-pressed.
// - Marks pointer events as handled so they don't bubble up to the terminal.
void SearchBoxControl::SearchBoxPointerPressedHandler(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::PointerRoutedEventArgs const& e)
{
e.Handled(true);
}
// Method Description:
// - Handler for searchbox pointer-released.
// - Marks pointer events as handled so they don't bubble up to the terminal.
void SearchBoxControl::SearchBoxPointerReleasedHandler(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::PointerRoutedEventArgs const& e)
{
e.Handled(true);
}
// Method Description:
@@ -519,18 +528,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
// Method Description:
// - Enables / disables results navigation buttons
// Arguments:
// - enable: if true, the buttons should be enabled
// Return Value:
// - <none>
void SearchBoxControl::NavigationEnabled(bool enabled)
// - Removes the status message in the status box.
void SearchBoxControl::ClearStatus()
{
GoBackwardButton().IsEnabled(enabled);
GoForwardButton().IsEnabled(enabled);
}
bool SearchBoxControl::NavigationEnabled()
{
return GoBackwardButton().IsEnabled() || GoForwardButton().IsEnabled();
StatusBox().Text(L"");
}
}

View File

@@ -35,12 +35,14 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void Open(std::function<void()> callback);
void Close();
winrt::hstring Text();
bool GoForward();
bool CaseSensitive();
void SetFocusOnTextbox();
void PopulateTextbox(const winrt::hstring& text);
bool ContainsFocus();
void SetStatus(int32_t totalMatches, int32_t currentMatch);
bool NavigationEnabled();
void NavigationEnabled(bool enabled);
void ClearStatus();
void GoBackwardClicked(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::UI::Xaml::RoutedEventArgs& /*e*/);
void GoForwardClicked(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::UI::Xaml::RoutedEventArgs& /*e*/);
@@ -48,6 +50,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void TextBoxTextChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
void CaseSensitivityButtonClicked(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
void SearchBoxPointerPressedHandler(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::PointerRoutedEventArgs const& e);
void SearchBoxPointerReleasedHandler(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::PointerRoutedEventArgs const& e);
til::event<SearchHandler> Search;
til::event<SearchHandler> SearchChanged;
@@ -74,8 +78,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
static double _TextWidth(winrt::hstring text, double fontSize);
double _GetStatusMaxWidth();
bool _GoForward();
bool _CaseSensitive();
void _KeyDownHandler(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::Input::KeyRoutedEventArgs& e);
void _CharacterHandler(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::UI::Xaml::Input::CharacterReceivedRoutedEventArgs& e);
};

View File

@@ -12,11 +12,10 @@ namespace Microsoft.Terminal.Control
void PopulateTextbox(String text);
Boolean ContainsFocus();
void SetStatus(Int32 totalMatches, Int32 currentMatch);
void ClearStatus();
Windows.Foundation.Rect ContentClipRect{ get; };
Double OpenAnimationStartPoint{ get; };
Boolean NavigationEnabled;
event SearchHandler Search;
event SearchHandler SearchChanged;
event Windows.Foundation.TypedEventHandler<SearchBoxControl, Windows.UI.Xaml.RoutedEventArgs> Closed;

View File

@@ -181,6 +181,8 @@
BorderThickness="{ThemeResource FlyoutBorderThemeThickness}"
CornerRadius="{ThemeResource OverlayCornerRadius}"
Orientation="Horizontal"
PointerPressed="SearchBoxPointerPressedHandler"
PointerReleased="SearchBoxPointerReleasedHandler"
Shadow="{StaticResource SharedShadow}"
Translation="0,0,16">
<StackPanel.RenderTransform>

View File

@@ -1,440 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "TSFInputControl.h"
#include "TSFInputControl.g.cpp"
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Graphics::Display;
using namespace winrt::Windows::UI::Core;
using namespace winrt::Windows::UI::Text;
using namespace winrt::Windows::UI::Text::Core;
using namespace winrt::Windows::UI::Xaml;
namespace winrt::Microsoft::Terminal::Control::implementation
{
TSFInputControl::TSFInputControl()
{
InitializeComponent();
// Create a CoreTextEditingContext for since we are acting like a custom edit control
auto manager = CoreTextServicesManager::GetForCurrentView();
_editContext = manager.CreateEditContext();
// InputPane is manually shown inside of TermControl.
_editContext.InputPaneDisplayPolicy(CoreTextInputPaneDisplayPolicy::Manual);
// Set the input scope to AlphanumericHalfWidth in order to facilitate those CJK input methods to open in English mode by default.
// AlphanumericHalfWidth scope doesn't prevent input method from switching to composition mode, it accepts any character too.
// Besides, Text scope turns on typing intelligence, but that doesn't work in this project.
_editContext.InputScope(CoreTextInputScope::AlphanumericHalfWidth);
_textRequestedRevoker = _editContext.TextRequested(winrt::auto_revoke, { this, &TSFInputControl::_textRequestedHandler });
_selectionRequestedRevoker = _editContext.SelectionRequested(winrt::auto_revoke, { this, &TSFInputControl::_selectionRequestedHandler });
_focusRemovedRevoker = _editContext.FocusRemoved(winrt::auto_revoke, { this, &TSFInputControl::_focusRemovedHandler });
_textUpdatingRevoker = _editContext.TextUpdating(winrt::auto_revoke, { this, &TSFInputControl::_textUpdatingHandler });
_selectionUpdatingRevoker = _editContext.SelectionUpdating(winrt::auto_revoke, { this, &TSFInputControl::_selectionUpdatingHandler });
_formatUpdatingRevoker = _editContext.FormatUpdating(winrt::auto_revoke, { this, &TSFInputControl::_formatUpdatingHandler });
_layoutRequestedRevoker = _editContext.LayoutRequested(winrt::auto_revoke, { this, &TSFInputControl::_layoutRequestedHandler });
_compositionStartedRevoker = _editContext.CompositionStarted(winrt::auto_revoke, { this, &TSFInputControl::_compositionStartedHandler });
_compositionCompletedRevoker = _editContext.CompositionCompleted(winrt::auto_revoke, { this, &TSFInputControl::_compositionCompletedHandler });
}
// Method Description:
// - Prepares this TSFInputControl to be removed from the UI hierarchy.
void TSFInputControl::Close()
{
// Explicitly disconnect the LayoutRequested handler -- it can cause problems during application teardown.
// See GH#4159 for more info.
// Also disconnect compositionCompleted and textUpdating explicitly. It seems to occasionally cause problems if
// a composition is active during application teardown.
_layoutRequestedRevoker.revoke();
_compositionCompletedRevoker.revoke();
_textUpdatingRevoker.revoke();
}
// Method Description:
// - NotifyFocusEnter handler for notifying CoreEditTextContext of focus enter
// when TerminalControl receives focus.
// Arguments:
// - <none>
// Return Value:
// - <none>
void TSFInputControl::NotifyFocusEnter()
{
_editContext.NotifyFocusEnter();
_focused = true;
}
// Method Description:
// - NotifyFocusEnter handler for notifying CoreEditTextContext of focus leaving.
// when TerminalControl no longer has focus.
// Arguments:
// - <none>
// Return Value:
// - <none>
void TSFInputControl::NotifyFocusLeave()
{
_editContext.NotifyFocusLeave();
_focused = false;
}
// Method Description:
// - Clears the input buffer and tells the text server to clear their buffer as well.
// Also clears the TextBlock and sets the active text starting point to 0.
// Arguments:
// - <none>
// Return Value:
// - <none>
void TSFInputControl::ClearBuffer()
{
if (!_inputBuffer.empty())
{
_inputBuffer.clear();
_selection = {};
_activeTextStart = 0;
_editContext.NotifyTextChanged({ 0, INT32_MAX }, 0, _selection);
TextBlock().Text({});
}
}
// Method Description:
// - Redraw the canvas if certain dimensions have changed since the last
// redraw. This includes the Terminal cursor position, the Canvas width, and the TextBlock height.
// Arguments:
// - <none>
// Return Value:
// - <none>
void TSFInputControl::TryRedrawCanvas()
try
{
if (!_focused || !Canvas())
{
return;
}
// Get the cursor position in text buffer position
auto cursorArgs = winrt::make_self<CursorPositionEventArgs>();
CurrentCursorPosition.raise(*this, *cursorArgs);
const til::point cursorPos{ til::math::flooring, cursorArgs->CurrentPosition() };
const auto actualCanvasWidth{ Canvas().ActualWidth() };
const auto actualTextBlockHeight{ TextBlock().ActualHeight() };
const auto actualWindowBounds{ CoreWindow::GetForCurrentThread().Bounds() };
if (_currentTerminalCursorPos == cursorPos &&
_currentCanvasWidth == actualCanvasWidth &&
_currentTextBlockHeight == actualTextBlockHeight &&
_currentWindowBounds == actualWindowBounds)
{
return;
}
_currentTerminalCursorPos = cursorPos;
_currentCanvasWidth = actualCanvasWidth;
_currentTextBlockHeight = actualTextBlockHeight;
_currentWindowBounds = actualWindowBounds;
_RedrawCanvas();
}
CATCH_LOG()
// Method Description:
// - Redraw the Canvas and update the current Text Bounds and Control Bounds for
// the CoreTextEditContext.
// Arguments:
// - <none>
// Return Value:
// - <none>
void TSFInputControl::_RedrawCanvas()
{
// Get Font Info as we use this is the pixel size for characters in the display
auto fontArgs = winrt::make_self<FontInfoEventArgs>();
CurrentFontInfo.raise(*this, *fontArgs);
const til::size fontSize{ til::math::flooring, fontArgs->FontSize() };
// Convert text buffer cursor position to client coordinate position
// within the window. This point is in _pixels_
const auto clientCursorPos{ _currentTerminalCursorPos * fontSize };
// Get scale factor for view
const auto scaleFactor = DisplayInformation::GetForCurrentView().RawPixelsPerViewPixel();
const til::point clientCursorInDips{ til::math::flooring, clientCursorPos.x / scaleFactor, clientCursorPos.y / scaleFactor };
// Position our TextBlock at the cursor position
Canvas().SetLeft(TextBlock(), clientCursorInDips.x);
Canvas().SetTop(TextBlock(), clientCursorInDips.y);
// calculate FontSize in pixels from Points
const double fontSizePx = (fontSize.height * 72) / USER_DEFAULT_SCREEN_DPI;
const auto unscaledFontSizePx = fontSizePx / scaleFactor;
// Make sure to unscale the font size to correct for DPI! XAML needs
// things in DIPs, and the fontSize is in pixels.
TextBlock().FontSize(unscaledFontSizePx);
TextBlock().FontFamily(Media::FontFamily(fontArgs->FontFace()));
TextBlock().FontWeight(fontArgs->FontWeight());
// TextBlock's actual dimensions right after initialization is 0w x 0h. So,
// if an IME is displayed before TextBlock has text (like showing the emoji picker
// using Win+.), it'll be placed higher than intended.
TextBlock().MinWidth(unscaledFontSizePx);
TextBlock().MinHeight(unscaledFontSizePx);
_currentTextBlockHeight = std::max(unscaledFontSizePx, _currentTextBlockHeight);
const auto widthToTerminalEnd = _currentCanvasWidth - clientCursorInDips.x;
// Make sure that we're setting the MaxWidth to a positive number - a
// negative number here will crash us in mysterious ways with a useless
// stack trace
const auto newMaxWidth = std::max<double>(0.0, widthToTerminalEnd);
TextBlock().MaxWidth(newMaxWidth);
// Get window in screen coordinates, this is the entire window including
// tabs. THIS IS IN DIPs
const til::point windowOrigin{ til::math::flooring, _currentWindowBounds.X, _currentWindowBounds.Y };
// Get the offset (margin + tabs, etc..) of the control within the window
const til::point controlOrigin{ til::math::flooring,
this->TransformToVisual(nullptr).TransformPoint(Point(0, 0)) };
// The controlAbsoluteOrigin is the origin of the control relative to
// the origin of the displays. THIS IS IN DIPs
const auto controlAbsoluteOrigin{ windowOrigin + controlOrigin };
// Convert the control origin to pixels
const auto scaledFrameOrigin = til::point{ til::math::flooring, controlAbsoluteOrigin.x * scaleFactor, controlAbsoluteOrigin.y * scaleFactor };
// Get the location of the cursor in the display, in pixels.
auto screenCursorPos{ scaledFrameOrigin + clientCursorPos };
// GH #5007 - make sure to account for wrapping the IME composition at
// the right side of the viewport.
const auto textBlockHeight = ::base::ClampMul(_currentTextBlockHeight, scaleFactor);
// Get the bounds of the composition text, in pixels.
const til::rect textBounds{ til::point{ screenCursorPos.x, screenCursorPos.y },
til::size{ 0, textBlockHeight } };
_currentTextBounds = textBounds.to_winrt_rect();
_currentControlBounds = Rect(static_cast<float>(screenCursorPos.x),
static_cast<float>(screenCursorPos.y),
0.0f,
static_cast<float>(fontSize.height));
}
// Method Description:
// - Handler for LayoutRequested event by CoreEditContext responsible
// for returning the current position the IME should be placed
// in screen coordinates on the screen. TSFInputControls internal
// XAML controls (TextBlock/Canvas) are also positioned and updated.
// NOTE: documentation says application should handle this event
// Arguments:
// - sender: CoreTextEditContext sending the request.
// - args: CoreTextLayoutRequestedEventArgs to be updated with position information.
// Return Value:
// - <none>
void TSFInputControl::_layoutRequestedHandler(CoreTextEditContext sender, const CoreTextLayoutRequestedEventArgs& args)
{
auto request = args.Request();
TryRedrawCanvas();
// Set the text block bounds
request.LayoutBounds().TextBounds(_currentTextBounds);
// Set the control bounds of the whole control
request.LayoutBounds().ControlBounds(_currentControlBounds);
}
// Method Description:
// - Handler for CompositionStarted event by CoreEditContext responsible
// for making internal TSFInputControl controls visible.
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextCompositionStartedEventArgs. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_compositionStartedHandler(CoreTextEditContext sender, const CoreTextCompositionStartedEventArgs& /*args*/)
{
_inComposition = true;
}
// Method Description:
// - Handler for CompositionCompleted event by CoreEditContext responsible
// for making internal TSFInputControl controls visible.
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextCompositionCompletedEventArgs. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_compositionCompletedHandler(CoreTextEditContext sender, const CoreTextCompositionCompletedEventArgs& /*args*/)
{
_inComposition = false;
_SendAndClearText();
}
// Method Description:
// - Handler for FocusRemoved event by CoreEditContext responsible
// for removing focus for the TSFInputControl control accordingly
// when focus was forcibly removed from text input control.
// NOTE: Documentation says application should handle this event
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - object: CoreTextCompositionStartedEventArgs. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_focusRemovedHandler(CoreTextEditContext sender, const winrt::Windows::Foundation::IInspectable& /*object*/)
{
}
// Method Description:
// - Handler for TextRequested event by CoreEditContext responsible
// for returning the range of text requested.
// NOTE: Documentation says application should handle this event
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextTextRequestedEventArgs to be updated with requested range text.
// Return Value:
// - <none>
void TSFInputControl::_textRequestedHandler(CoreTextEditContext sender, const CoreTextTextRequestedEventArgs& args)
{
try
{
const auto range = args.Request().Range();
const auto text = _inputBuffer.substr(
range.StartCaretPosition,
range.EndCaretPosition - range.StartCaretPosition);
args.Request().Text(text);
}
CATCH_LOG();
}
// Method Description:
// - Handler for SelectionRequested event by CoreEditContext responsible
// for returning the currently selected text.
// TSFInputControl currently doesn't allow selection, so nothing happens.
// NOTE: Documentation says application should handle this event
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextSelectionRequestedEventArgs for providing data for the SelectionRequested event. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_selectionRequestedHandler(CoreTextEditContext sender, const CoreTextSelectionRequestedEventArgs& args)
{
args.Request().Selection(_selection);
}
// Method Description:
// - Handler for SelectionUpdating event by CoreEditContext responsible
// for handling modifications to the range of text currently selected.
// TSFInputControl doesn't currently allow selection, so nothing happens.
// NOTE: Documentation says application should set its selection range accordingly
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextSelectionUpdatingEventArgs for providing data for the SelectionUpdating event. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_selectionUpdatingHandler(CoreTextEditContext sender, const CoreTextSelectionUpdatingEventArgs& args)
{
_selection = args.Selection();
args.Result(CoreTextSelectionUpdatingResult::Succeeded);
}
// Method Description:
// - Handler for TextUpdating event by CoreEditContext responsible
// for handling text updates.
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextTextUpdatingEventArgs contains new text to update buffer with.
// Return Value:
// - <none>
void TSFInputControl::_textUpdatingHandler(CoreTextEditContext sender, const CoreTextTextUpdatingEventArgs& args)
{
try
{
const auto incomingText = args.Text();
const auto range = args.Range();
_inputBuffer = _inputBuffer.replace(
range.StartCaretPosition,
range.EndCaretPosition - range.StartCaretPosition,
incomingText);
_selection = args.NewSelection();
// GH#5054: Pressing backspace might move the caret before the _activeTextStart.
_activeTextStart = std::min(_activeTextStart, _inputBuffer.size());
// Emojis/Kaomojis/Symbols chosen through the IME without starting composition
// will be sent straight through to the terminal.
if (!_inComposition)
{
_SendAndClearText();
}
else
{
Canvas().Visibility(Visibility::Visible);
const auto text = _inputBuffer.substr(_activeTextStart);
TextBlock().Text(text);
}
// Notify the TSF that the update succeeded
args.Result(CoreTextTextUpdatingResult::Succeeded);
}
catch (...)
{
LOG_CAUGHT_EXCEPTION();
// indicate updating failed.
args.Result(CoreTextTextUpdatingResult::Failed);
}
}
void TSFInputControl::_SendAndClearText()
{
const auto text = _inputBuffer.substr(_activeTextStart);
if (text.empty())
{
return;
}
CompositionCompleted.raise(text);
_activeTextStart = _inputBuffer.size();
TextBlock().Text({});
// After we reset the TextBlock to empty string, we want to make sure
// ActualHeight reflects the respective height. It seems that ActualHeight
// isn't updated until there's new text in the TextBlock, so the next time a user
// invokes "Win+." for the emoji picker IME, it would end up
// using the pre-reset TextBlock().ActualHeight().
TextBlock().UpdateLayout();
// hide the controls until text input starts again
Canvas().Visibility(Visibility::Collapsed);
}
// Method Description:
// - Handler for FormatUpdating event by CoreEditContext responsible
// for handling different format updates for a particular range of text.
// TSFInputControl doesn't do anything with this event.
// Arguments:
// - sender: CoreTextEditContext sending the request. Not used in method.
// - args: CoreTextFormatUpdatingEventArgs Provides data for the FormatUpdating event. Not used in method.
// Return Value:
// - <none>
void TSFInputControl::_formatUpdatingHandler(CoreTextEditContext sender, const CoreTextFormatUpdatingEventArgs& /*args*/)
{
}
}

View File

@@ -1,92 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#include "TSFInputControl.g.h"
#include "CursorPositionEventArgs.g.h"
#include "FontInfoEventArgs.g.h"
namespace winrt::Microsoft::Terminal::Control::implementation
{
struct CursorPositionEventArgs :
public CursorPositionEventArgsT<CursorPositionEventArgs>
{
public:
CursorPositionEventArgs() = default;
WINRT_PROPERTY(Windows::Foundation::Point, CurrentPosition);
};
struct FontInfoEventArgs :
public FontInfoEventArgsT<FontInfoEventArgs>
{
public:
FontInfoEventArgs() = default;
WINRT_PROPERTY(Windows::Foundation::Size, FontSize);
WINRT_PROPERTY(winrt::hstring, FontFace);
WINRT_PROPERTY(Windows::UI::Text::FontWeight, FontWeight);
};
struct TSFInputControl : TSFInputControlT<TSFInputControl>
{
public:
TSFInputControl();
void NotifyFocusEnter();
void NotifyFocusLeave();
void ClearBuffer();
void TryRedrawCanvas();
void Close();
// -------------------------------- WinRT Events ---------------------------------
til::typed_event<Control::TSFInputControl, Control::CursorPositionEventArgs> CurrentCursorPosition;
til::typed_event<Control::TSFInputControl, Control::FontInfoEventArgs> CurrentFontInfo;
til::event<Control::CompositionCompletedEventArgs> CompositionCompleted;
private:
void _layoutRequestedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextLayoutRequestedEventArgs& args);
void _compositionStartedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextCompositionStartedEventArgs& args);
void _compositionCompletedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextCompositionCompletedEventArgs& args);
void _focusRemovedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::Foundation::IInspectable& object);
void _selectionRequestedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextSelectionRequestedEventArgs& args);
void _textRequestedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextTextRequestedEventArgs& args);
void _selectionUpdatingHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextSelectionUpdatingEventArgs& args);
void _textUpdatingHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextTextUpdatingEventArgs& args);
void _formatUpdatingHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextFormatUpdatingEventArgs& args);
void _SendAndClearText();
void _RedrawCanvas();
winrt::Windows::UI::Text::Core::CoreTextEditContext::TextRequested_revoker _textRequestedRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::SelectionRequested_revoker _selectionRequestedRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::FocusRemoved_revoker _focusRemovedRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::TextUpdating_revoker _textUpdatingRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::SelectionUpdating_revoker _selectionUpdatingRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::FormatUpdating_revoker _formatUpdatingRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::LayoutRequested_revoker _layoutRequestedRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::CompositionStarted_revoker _compositionStartedRevoker;
winrt::Windows::UI::Text::Core::CoreTextEditContext::CompositionCompleted_revoker _compositionCompletedRevoker;
Windows::UI::Text::Core::CoreTextEditContext _editContext{ nullptr };
std::wstring _inputBuffer;
winrt::Windows::UI::Text::Core::CoreTextRange _selection{};
size_t _activeTextStart = 0;
bool _inComposition = false;
bool _focused = false;
til::point _currentTerminalCursorPos{};
double _currentCanvasWidth = 0.0;
double _currentTextBlockHeight = 0.0;
winrt::Windows::Foundation::Rect _currentControlBounds{};
winrt::Windows::Foundation::Rect _currentTextBounds{};
winrt::Windows::Foundation::Rect _currentWindowBounds{};
};
}
namespace winrt::Microsoft::Terminal::Control::factory_implementation
{
BASIC_FACTORY(TSFInputControl);
}

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