mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-06 22:29:43 +00:00
Compare commits
1 Commits
dev/migrie
...
dev/duhowe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6fc9297f5 |
1
.github/actions/spelling/allow/allow.txt
vendored
1
.github/actions/spelling/allow/allow.txt
vendored
@@ -80,7 +80,6 @@ mnt
|
||||
mru
|
||||
nje
|
||||
noreply
|
||||
notwrapped
|
||||
ogonek
|
||||
ok'd
|
||||
overlined
|
||||
|
||||
6
.github/actions/spelling/allow/microsoft.txt
vendored
6
.github/actions/spelling/allow/microsoft.txt
vendored
@@ -1,8 +1,6 @@
|
||||
ACLs
|
||||
ADMINS
|
||||
advapi
|
||||
akv
|
||||
AKV
|
||||
altform
|
||||
altforms
|
||||
appendwttlogging
|
||||
@@ -16,7 +14,6 @@ autoexec
|
||||
backplating
|
||||
bitmaps
|
||||
BOMs
|
||||
checkcflags
|
||||
COMPUTERNAME
|
||||
CPLs
|
||||
cpptools
|
||||
@@ -35,7 +32,6 @@ DWINRT
|
||||
enablewttlogging
|
||||
HOMESHARE
|
||||
Intelli
|
||||
issecret
|
||||
IVisual
|
||||
libucrt
|
||||
libucrtd
|
||||
@@ -78,7 +74,6 @@ sid
|
||||
Skype
|
||||
SRW
|
||||
sxs
|
||||
symbolrequestprod
|
||||
Sysinternals
|
||||
sysnative
|
||||
systemroot
|
||||
@@ -104,4 +99,3 @@ wtl
|
||||
wtt
|
||||
wttlog
|
||||
Xamarin
|
||||
xfgcheck
|
||||
|
||||
1
.github/actions/spelling/expect/alphabet.txt
vendored
1
.github/actions/spelling/expect/alphabet.txt
vendored
@@ -1,3 +1,4 @@
|
||||
AAAa
|
||||
AAAAA
|
||||
AAAAAAAAAAAAA
|
||||
AAAAAABBBBBBCCC
|
||||
|
||||
73
.github/actions/spelling/expect/expect.txt
vendored
73
.github/actions/spelling/expect/expect.txt
vendored
@@ -1,4 +1,3 @@
|
||||
aaaaabbb
|
||||
aabbcc
|
||||
ABANDONFONT
|
||||
abbcc
|
||||
@@ -10,7 +9,6 @@ ACCESSTOKEN
|
||||
acidev
|
||||
ACIOSS
|
||||
ACover
|
||||
acp
|
||||
actctx
|
||||
ACTCTXW
|
||||
ADDALIAS
|
||||
@@ -68,10 +66,10 @@ ASBSET
|
||||
asdfghjkl
|
||||
ASetting
|
||||
ASingle
|
||||
ASYNCDONTCARE
|
||||
ASYNCWINDOWPOS
|
||||
atch
|
||||
ATest
|
||||
ATTRCOLOR
|
||||
aumid
|
||||
Authenticode
|
||||
AUTOBUDDY
|
||||
@@ -94,8 +92,6 @@ backported
|
||||
backstory
|
||||
barbaz
|
||||
Bazz
|
||||
bbb
|
||||
bbccb
|
||||
BBDM
|
||||
bbwe
|
||||
bcount
|
||||
@@ -125,6 +121,8 @@ Blt
|
||||
BLUESCROLL
|
||||
BODGY
|
||||
BOLDFONT
|
||||
BOOLIFY
|
||||
bools
|
||||
Borland
|
||||
boutput
|
||||
boxheader
|
||||
@@ -155,6 +153,7 @@ cazamor
|
||||
CBash
|
||||
cbiex
|
||||
CBN
|
||||
CBoolean
|
||||
cbt
|
||||
CCCBB
|
||||
cch
|
||||
@@ -162,9 +161,12 @@ CCHAR
|
||||
CCmd
|
||||
ccolor
|
||||
CCom
|
||||
CComp
|
||||
CConsole
|
||||
CConversion
|
||||
CCRT
|
||||
cdd
|
||||
CEdit
|
||||
CELLSIZE
|
||||
cfae
|
||||
cfie
|
||||
@@ -174,17 +176,18 @@ CFuzz
|
||||
cgscrn
|
||||
chafa
|
||||
changelists
|
||||
chaof
|
||||
charinfo
|
||||
CHARSETINFO
|
||||
chh
|
||||
chshdng
|
||||
CHT
|
||||
Cic
|
||||
CLASSSTRING
|
||||
CLE
|
||||
cleartype
|
||||
CLICKACTIVE
|
||||
clickdown
|
||||
CLIENTID
|
||||
clipbrd
|
||||
CLIPCHILDREN
|
||||
CLIPSIBLINGS
|
||||
@@ -223,6 +226,7 @@ commdlg
|
||||
COMMITID
|
||||
componentization
|
||||
conapi
|
||||
conareainfo
|
||||
conattrs
|
||||
conbufferout
|
||||
concfg
|
||||
@@ -233,7 +237,8 @@ condrv
|
||||
conechokey
|
||||
conemu
|
||||
conhost
|
||||
CONIME
|
||||
conime
|
||||
conimeinfo
|
||||
conintegrity
|
||||
conintegrityuwp
|
||||
coninteractivitybase
|
||||
@@ -245,7 +250,6 @@ CONKBD
|
||||
conlibk
|
||||
conmsgl
|
||||
CONNECTINFO
|
||||
connyection
|
||||
CONOUT
|
||||
conprops
|
||||
conpropsp
|
||||
@@ -272,6 +276,7 @@ contentfiles
|
||||
conterm
|
||||
contsf
|
||||
contypes
|
||||
convarea
|
||||
conwinuserrefs
|
||||
coordnew
|
||||
COPYCOLOR
|
||||
@@ -306,6 +311,7 @@ csrutil
|
||||
CSTYLE
|
||||
CSwitch
|
||||
CTerminal
|
||||
CText
|
||||
ctl
|
||||
ctlseqs
|
||||
CTRLEVENT
|
||||
@@ -313,7 +319,7 @@ CTRLFREQUENCY
|
||||
CTRLKEYSHORTCUTS
|
||||
Ctrls
|
||||
CTRLVOLUME
|
||||
CUAS
|
||||
Ctxt
|
||||
CUF
|
||||
cupxy
|
||||
CURRENTFONT
|
||||
@@ -477,6 +483,7 @@ DISABLEDELAYEDEXPANSION
|
||||
DISABLENOSCROLL
|
||||
DISPATCHNOTIFY
|
||||
DISPLAYATTRIBUTE
|
||||
DISPLAYATTRIBUTEPROPERTY
|
||||
DISPLAYCHANGE
|
||||
distros
|
||||
dlg
|
||||
@@ -552,6 +559,7 @@ entrypoints
|
||||
ENU
|
||||
ENUMLOGFONT
|
||||
ENUMLOGFONTEX
|
||||
enumranges
|
||||
EOK
|
||||
EPres
|
||||
EQU
|
||||
@@ -610,6 +618,7 @@ FINDDOWN
|
||||
FINDSTRINGEXACT
|
||||
FINDUP
|
||||
FIter
|
||||
FIXEDCONVERTED
|
||||
FIXEDFILEINFO
|
||||
Flg
|
||||
flyouts
|
||||
@@ -724,8 +733,9 @@ Greyscale
|
||||
gridline
|
||||
gset
|
||||
gsl
|
||||
GTP
|
||||
guc
|
||||
GUIDATOM
|
||||
guidatom
|
||||
GValue
|
||||
GWL
|
||||
GWLP
|
||||
@@ -824,6 +834,7 @@ IEnd
|
||||
IEnum
|
||||
IFACEMETHODIMP
|
||||
ification
|
||||
IGNOREEND
|
||||
IGNORELANGUAGE
|
||||
IHosted
|
||||
iid
|
||||
@@ -847,6 +858,7 @@ inkscape
|
||||
INLINEPREFIX
|
||||
inproc
|
||||
Inputkeyinfo
|
||||
INPUTPROCESSORPROFILE
|
||||
Inputreadhandledata
|
||||
INSERTMODE
|
||||
INTERACTIVITYBASE
|
||||
@@ -858,7 +870,9 @@ INVALIDARG
|
||||
INVALIDATERECT
|
||||
Ioctl
|
||||
ipch
|
||||
ipp
|
||||
IProperty
|
||||
IPSINK
|
||||
ipsp
|
||||
IShell
|
||||
ISwap
|
||||
@@ -878,6 +892,7 @@ JOBOBJECT
|
||||
JOBOBJECTINFOCLASS
|
||||
JPN
|
||||
jsoncpp
|
||||
Jsons
|
||||
jsprovider
|
||||
jumplist
|
||||
KAttrs
|
||||
@@ -907,7 +922,6 @@ KLMNOPQRSTY
|
||||
KOK
|
||||
KPRIORITY
|
||||
KVM
|
||||
kyouhaishaheiku
|
||||
langid
|
||||
LANGUAGELIST
|
||||
lasterror
|
||||
@@ -970,6 +984,7 @@ lpdw
|
||||
lpelfe
|
||||
lpfn
|
||||
LPFNADDPROPSHEETPAGE
|
||||
lpl
|
||||
LPMEASUREITEMSTRUCT
|
||||
LPMINMAXINFO
|
||||
lpmsg
|
||||
@@ -1045,7 +1060,6 @@ MENUITEMINFO
|
||||
MENUSELECT
|
||||
messageext
|
||||
metaproj
|
||||
Mgrs
|
||||
microsoftpublicsymbols
|
||||
midl
|
||||
mii
|
||||
@@ -1100,6 +1114,7 @@ muxes
|
||||
myapplet
|
||||
mybranch
|
||||
mydir
|
||||
MYMAX
|
||||
Mypair
|
||||
Myval
|
||||
NAMELENGTH
|
||||
@@ -1143,7 +1158,6 @@ NOCOPYBITS
|
||||
NODUP
|
||||
noexcepts
|
||||
NOFONT
|
||||
NOHIDDENTEXT
|
||||
NOINTEGRALHEIGHT
|
||||
NOINTERFACE
|
||||
NOLINKINFO
|
||||
@@ -1167,7 +1181,6 @@ NORMALDISPLAY
|
||||
NOSCRATCH
|
||||
NOSEARCH
|
||||
noselect
|
||||
NOSELECTION
|
||||
NOSENDCHANGING
|
||||
NOSIZE
|
||||
NOSNAPSHOT
|
||||
@@ -1258,7 +1271,6 @@ packageuwp
|
||||
PACKAGEVERSIONNUMBER
|
||||
PACKCOORD
|
||||
PACKVERSION
|
||||
pacp
|
||||
pagedown
|
||||
pageup
|
||||
PAINTPARAMS
|
||||
@@ -1270,6 +1282,7 @@ parms
|
||||
PATCOPY
|
||||
pathcch
|
||||
PATTERNID
|
||||
pcat
|
||||
pcb
|
||||
pcch
|
||||
PCCHAR
|
||||
@@ -1293,9 +1306,9 @@ PCSTR
|
||||
PCWCH
|
||||
PCWCHAR
|
||||
PCWSTR
|
||||
pda
|
||||
pdbs
|
||||
pdbstr
|
||||
pdcs
|
||||
PDPs
|
||||
pdtobj
|
||||
pdw
|
||||
@@ -1325,7 +1338,6 @@ PIDLIST
|
||||
pids
|
||||
pii
|
||||
piml
|
||||
pimpl
|
||||
pinvoke
|
||||
pipename
|
||||
pipestr
|
||||
@@ -1357,6 +1369,7 @@ POSXSCROLL
|
||||
POSYSCROLL
|
||||
PPEB
|
||||
ppf
|
||||
ppguid
|
||||
ppidl
|
||||
PPROC
|
||||
ppropvar
|
||||
@@ -1386,7 +1399,7 @@ PROCESSINFOCLASS
|
||||
PRODEXT
|
||||
PROPERTYID
|
||||
PROPERTYKEY
|
||||
propertyval
|
||||
PROPERTYVAL
|
||||
propsheet
|
||||
PROPSHEETHEADER
|
||||
PROPSHEETPAGE
|
||||
@@ -1418,11 +1431,8 @@ ptch
|
||||
ptsz
|
||||
PTYIn
|
||||
PUCHAR
|
||||
pvar
|
||||
pwch
|
||||
PWDDMCONSOLECONTEXT
|
||||
Pwease
|
||||
pweview
|
||||
pws
|
||||
pwstr
|
||||
pwsz
|
||||
@@ -1506,7 +1516,6 @@ rgn
|
||||
rgp
|
||||
rgpwsz
|
||||
rgrc
|
||||
rguid
|
||||
rgw
|
||||
RIGHTALIGN
|
||||
RIGHTBUTTON
|
||||
@@ -1514,7 +1523,6 @@ riid
|
||||
RIS
|
||||
roadmap
|
||||
robomac
|
||||
rodata
|
||||
rosetta
|
||||
RRF
|
||||
rrr
|
||||
@@ -1637,6 +1645,7 @@ sidebyside
|
||||
SIF
|
||||
SIGDN
|
||||
Signtool
|
||||
SINGLEFLAG
|
||||
SINGLETHREADED
|
||||
siup
|
||||
sixel
|
||||
@@ -1709,7 +1718,6 @@ SYMED
|
||||
SYNCPAINT
|
||||
syscalls
|
||||
SYSCHAR
|
||||
SYSCOLOR
|
||||
SYSCOMMAND
|
||||
SYSDEADCHAR
|
||||
SYSKEYDOWN
|
||||
@@ -1721,7 +1729,6 @@ sysparams
|
||||
sysparamsext
|
||||
SYSTEMHAND
|
||||
SYSTEMMENU
|
||||
SYSTEMTIME
|
||||
tabview
|
||||
TAdd
|
||||
taef
|
||||
@@ -1776,6 +1783,7 @@ TEXTMETRIC
|
||||
TEXTMETRICW
|
||||
textmode
|
||||
texttests
|
||||
TFCAT
|
||||
TFunction
|
||||
THUMBPOSITION
|
||||
THUMBTRACK
|
||||
@@ -1806,6 +1814,7 @@ Tpqrst
|
||||
tracelogging
|
||||
traceviewpp
|
||||
trackbar
|
||||
TRACKCOMPOSITION
|
||||
trackpad
|
||||
transitioning
|
||||
Trd
|
||||
@@ -1829,6 +1838,8 @@ TTM
|
||||
TTo
|
||||
tvpp
|
||||
tvtseq
|
||||
Txtev
|
||||
typechecked
|
||||
TYUI
|
||||
UAC
|
||||
uap
|
||||
@@ -1846,8 +1857,10 @@ UIACCESS
|
||||
uiacore
|
||||
uiautomationcore
|
||||
uielem
|
||||
UIELEMENTENABLEDONLY
|
||||
UINTs
|
||||
ul
|
||||
ulcch
|
||||
uld
|
||||
uldash
|
||||
uldb
|
||||
@@ -1901,7 +1914,6 @@ UVWXY
|
||||
UVWXYZ
|
||||
uwa
|
||||
uwp
|
||||
uwu
|
||||
uxtheme
|
||||
Vanara
|
||||
vararg
|
||||
@@ -1942,6 +1954,7 @@ vstest
|
||||
VSTS
|
||||
VSTT
|
||||
vswhere
|
||||
vtapi
|
||||
vtapp
|
||||
VTE
|
||||
VTID
|
||||
@@ -1975,7 +1988,6 @@ wdm
|
||||
webpage
|
||||
websites
|
||||
wekyb
|
||||
wewoad
|
||||
wex
|
||||
wextest
|
||||
wextestclass
|
||||
@@ -2005,6 +2017,7 @@ WINDOWALPHA
|
||||
windowdpiapi
|
||||
WINDOWEDGE
|
||||
windowext
|
||||
windowime
|
||||
WINDOWINFO
|
||||
windowio
|
||||
windowmetrics
|
||||
@@ -2055,6 +2068,7 @@ WNDCLASSW
|
||||
Wndproc
|
||||
WNegative
|
||||
WNull
|
||||
wnwb
|
||||
workarea
|
||||
WOutside
|
||||
WOWARM
|
||||
@@ -2093,6 +2107,7 @@ WTs
|
||||
WTSOFTFONT
|
||||
wtw
|
||||
wtypes
|
||||
Wubi
|
||||
WUX
|
||||
WVerify
|
||||
WWith
|
||||
@@ -2119,7 +2134,9 @@ xes
|
||||
XFG
|
||||
XFile
|
||||
XFORM
|
||||
XIn
|
||||
xin
|
||||
xinchaof
|
||||
xinxinchaof
|
||||
XManifest
|
||||
XMath
|
||||
xorg
|
||||
|
||||
2
.github/workflows/addToProject.yml
vendored
2
.github/workflows/addToProject.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
name: Add issue to project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/add-to-project@v1.0.1
|
||||
- uses: actions/add-to-project@v0.5.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/microsoft/projects/159
|
||||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
||||
|
||||
@@ -171,7 +171,6 @@ 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}
|
||||
@@ -413,7 +412,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}") = "Microsoft.Terminal.UI", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UIHelpers", "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
|
||||
@@ -478,7 +477,6 @@ 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
|
||||
@@ -2445,7 +2443,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} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
|
||||
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
|
||||
{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}
|
||||
|
||||
@@ -30,18 +30,9 @@ 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
|
||||
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
|
||||
symbolPublishingProject: $(SymbolPublishingProject)
|
||||
${{ if eq(true, parameters.publishToAzure) }}:
|
||||
extraPublishJobs:
|
||||
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self
|
||||
|
||||
@@ -78,15 +78,6 @@ 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 }}
|
||||
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
|
||||
symbolPublishingProject: $(SymbolPublishingProject)
|
||||
|
||||
@@ -27,9 +27,6 @@ parameters:
|
||||
- name: publishArtifacts
|
||||
type: boolean
|
||||
default: true
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -100,15 +97,10 @@ jobs:
|
||||
flattenFolders: true
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@5
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
|
||||
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
|
||||
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
|
||||
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
|
||||
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
|
||||
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
|
||||
@@ -65,9 +65,6 @@ parameters:
|
||||
- name: removeAllNonSignedFiles
|
||||
type: boolean
|
||||
default: false
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -145,10 +142,6 @@ jobs:
|
||||
|
||||
- template: .\steps-restore-nuget.yml
|
||||
|
||||
- pwsh: |-
|
||||
.\build\scripts\Set-LatestVCToolsVersion.ps1
|
||||
displayName: Work around DD-1541167 (VCToolsVersion)
|
||||
|
||||
- ${{ parameters.beforeBuildSteps }}
|
||||
|
||||
- task: VSBuild@1
|
||||
@@ -159,6 +152,7 @@ jobs:
|
||||
/p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=${{ parameters.branding }};PGOBuildMode=${{ parameters.pgoBuildMode }}
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
/bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
/graph
|
||||
$(BuildTargetParameter)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
@@ -242,15 +236,10 @@ 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@5
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit Signing Request
|
||||
inputs:
|
||||
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
|
||||
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
|
||||
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
|
||||
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
|
||||
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
|
||||
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: '$(Terminal.BinDir)'
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(Build.SourcesDirectory)/ESRPSigningConfig.json'
|
||||
|
||||
@@ -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@6
|
||||
- task: AzureFileCopy@5
|
||||
displayName: Publish to Storage Account
|
||||
inputs:
|
||||
sourcePath: _out/*
|
||||
|
||||
@@ -32,9 +32,6 @@ parameters:
|
||||
- name: afterBuildSteps
|
||||
type: stepList
|
||||
default: []
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -97,15 +94,10 @@ jobs:
|
||||
displayName: Create msixbundle
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@5
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.msixbundle to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
|
||||
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
|
||||
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
|
||||
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
|
||||
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
|
||||
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(System.ArtifactsDirectory)\bundle
|
||||
Pattern: $(BundleStemName)*.msixbundle
|
||||
UseMinimatch: true
|
||||
|
||||
@@ -27,9 +27,6 @@ parameters:
|
||||
- name: publishArtifacts
|
||||
type: boolean
|
||||
default: true
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -85,15 +82,10 @@ jobs:
|
||||
versionEnvVar: XES_PACKAGEVERSIONNUMBER
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@5
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
|
||||
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
|
||||
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
|
||||
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
|
||||
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
|
||||
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
parameters:
|
||||
- name: includePublicSymbolServer
|
||||
type: boolean
|
||||
default: false
|
||||
- name: pool
|
||||
type: object
|
||||
default: []
|
||||
- name: dependsOn
|
||||
type: object
|
||||
default: null
|
||||
- name: artifactStem
|
||||
type: string
|
||||
default: ''
|
||||
- name: jobName
|
||||
type: string
|
||||
default: PublishSymbols
|
||||
- name: symbolExpiryTime
|
||||
type: string
|
||||
default: 36530 # This is the default from PublishSymbols@2
|
||||
- name: variables
|
||||
type: object
|
||||
default: {}
|
||||
- name: subscription
|
||||
type: string
|
||||
- name: symbolProject
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
${{ if eq(parameters.includePublicSymbolServer, true) }}:
|
||||
displayName: Publish Symbols to Internal and MSDL
|
||||
${{ else }}:
|
||||
displayName: Publish Symbols Internally
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
${{ insert }}: ${{ parameters.variables }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download all PDBs from all prior build phases
|
||||
inputs:
|
||||
itemPattern: '**/*.pdb'
|
||||
targetPath: '$(Build.SourcesDirectory)/bin'
|
||||
|
||||
- powershell: |-
|
||||
Get-PackageProvider -Name NuGet -ForceBootstrap
|
||||
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
|
||||
displayName: Install Azure Module Dependencies
|
||||
|
||||
# Transit the Azure token from the Service Connection into a secret variable for the rest of the pipeline to use.
|
||||
- task: AzurePowerShell@5
|
||||
displayName: Generate an Azure Token
|
||||
inputs:
|
||||
azureSubscription: ${{ parameters.subscription }}
|
||||
azurePowerShellVersion: LatestVersion
|
||||
pwsh: true
|
||||
ScriptType: InlineScript
|
||||
Inline: |-
|
||||
$AzToken = (Get-AzAccessToken -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token
|
||||
Write-Host "##vso[task.setvariable variable=SymbolAccessToken;issecret=true]$AzToken"
|
||||
|
||||
|
||||
- task: PublishSymbols@2
|
||||
displayName: Publish Symbols (to current Azure DevOps tenant)
|
||||
continueOnError: True
|
||||
inputs:
|
||||
SymbolsFolder: '$(Build.SourcesDirectory)/bin'
|
||||
SearchPattern: '**/*.pdb'
|
||||
IndexSources: false
|
||||
DetailedLog: true
|
||||
SymbolsMaximumWaitTime: 30
|
||||
SymbolServerType: 'TeamServices'
|
||||
SymbolsProduct: 'Windows Terminal Converged Symbols'
|
||||
SymbolsVersion: '$(XES_APPXMANIFESTVERSION)'
|
||||
SymbolsArtifactName: 'WindowsTerminal_$(XES_APPXMANIFESTVERSION)'
|
||||
SymbolExpirationInDays: ${{ parameters.symbolExpiryTime }}
|
||||
env:
|
||||
LIB: $(Build.SourcesDirectory)
|
||||
|
||||
- pwsh: |-
|
||||
# Prepare the defaults for IRM
|
||||
$PSDefaultParameterValues['Invoke-RestMethod:Headers'] = @{ Authorization = "Bearer $(SymbolAccessToken)" }
|
||||
$PSDefaultParameterValues['Invoke-RestMethod:ContentType'] = "application/json"
|
||||
$PSDefaultParameterValues['Invoke-RestMethod:Method'] = "POST"
|
||||
|
||||
$BaseUri = "https://symbolrequestprod.trafficmanager.net/projects/${{ parameters.symbolProject }}/requests"
|
||||
|
||||
# Prepare the request
|
||||
$expiration = (Get-Date).Add([TimeSpan]::FromDays(${{ parameters.symbolExpiryTime }}))
|
||||
$createRequestBody = @{
|
||||
requestName = "WindowsTerminal_$(XES_APPXMANIFESTVERSION)";
|
||||
expirationTime = $expiration.ToString();
|
||||
}
|
||||
Write-Host "##[debug]Starting request $($createRequestBody.requestName) with expiration date of $($createRequestBody.expirationTime)"
|
||||
Invoke-RestMethod -Uri "$BaseUri" -Body ($createRequestBody | ConvertTo-Json -Compress) -Verbose
|
||||
|
||||
# Request symbol publication
|
||||
$publishRequestBody = @{
|
||||
publishToInternalServer = $true;
|
||||
publishToPublicServer = $${{ parameters.includePublicSymbolServer }};
|
||||
}
|
||||
Write-Host "##[debug]Submitting request $($createRequestBody.requestName) ($($publishRequestBody | ConvertTo-Json -Compress))"
|
||||
Invoke-RestMethod -Uri "$BaseUri/$($createRequestBody.requestName)" -Body ($publishRequestBody | ConvertTo-Json -Compress) -Verbose
|
||||
displayName: Publish Symbols using internal REST API
|
||||
@@ -33,7 +33,7 @@ parameters:
|
||||
- arm64
|
||||
- name: codeSign
|
||||
type: boolean
|
||||
default: false
|
||||
default: true
|
||||
- name: generateSbom
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
@@ -52,17 +52,10 @@ parameters:
|
||||
- name: publishVpackToWindows
|
||||
type: boolean
|
||||
default: false
|
||||
- name: symbolPublishingSubscription
|
||||
type: string
|
||||
- name: symbolPublishingProject
|
||||
type: string
|
||||
|
||||
- name: extraPublishJobs
|
||||
type: object
|
||||
default: []
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
@@ -85,7 +78,6 @@ 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'
|
||||
@@ -111,8 +103,6 @@ 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)
|
||||
@@ -128,7 +118,6 @@ 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
|
||||
@@ -148,8 +137,6 @@ 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)
|
||||
@@ -165,7 +152,6 @@ 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
|
||||
@@ -182,8 +168,6 @@ 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)
|
||||
@@ -219,7 +203,6 @@ 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: |-
|
||||
@@ -236,8 +219,6 @@ 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)
|
||||
@@ -247,15 +228,12 @@ 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)
|
||||
@@ -265,22 +243,18 @@ extends:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # this is handled by onebranch
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
|
||||
- stage: Publish
|
||||
displayName: Publish
|
||||
dependsOn: [Build]
|
||||
jobs:
|
||||
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
|
||||
- template: ./build/pipelines/templates-v2/job-publish-symbols.yml@self
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
|
||||
symbolPatGoesInTaskInputs: true # onebranch tries to muck with the PAT variable, so we need to change how it get the PAT
|
||||
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
|
||||
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)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
$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"
|
||||
@@ -65,6 +65,9 @@
|
||||
* `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 don’t 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
|
||||
|
||||
@@ -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": {
|
||||
"^[\\x20-\\x7E]{4}$": {
|
||||
"^(([A-Za-z0-9]){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": {
|
||||
"^[\\x20-\\x7E]{4}$": {
|
||||
"^([A-Za-z]{4})$": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
@@ -1501,10 +1501,8 @@
|
||||
"const": "multipleActions"
|
||||
},
|
||||
"actions": {
|
||||
"$ref": "#/$defs/ShortcutAction",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/ShortcutAction"
|
||||
},
|
||||
"minItems": 1,
|
||||
"description": "A list of other actions."
|
||||
}
|
||||
@@ -1893,14 +1891,6 @@
|
||||
],
|
||||
"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": [
|
||||
@@ -1938,10 +1928,6 @@
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2079,9 +2065,6 @@
|
||||
{
|
||||
"$ref": "#/$defs/SwitchToTabAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/ScrollToMarkAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/MoveFocusAction"
|
||||
},
|
||||
@@ -2217,10 +2200,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"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\"",
|
||||
@@ -2232,15 +2211,7 @@
|
||||
"commands": {
|
||||
"description": "List of commands to execute",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": {
|
||||
"$ref": "#/$defs/Keybinding/properties/command"
|
||||
},
|
||||
"name": {
|
||||
"$ref": "#/$defs/Keybinding/properties/name"
|
||||
}
|
||||
}
|
||||
"$ref": "#/$defs/Keybinding/properties/command"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
@@ -2801,35 +2772,20 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"autoMarkPrompts": {
|
||||
"experimental.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.
@@ -8,5 +8,5 @@ Please consult the [license](https://raw.githubusercontent.com/microsoft/cascadi
|
||||
|
||||
### Fonts Included
|
||||
|
||||
* Cascadia Code, Cascadia Mono (2404.23)
|
||||
* from microsoft/cascadia-code@1034791e5fc6e060a448d2b29cd94a6c683edb36
|
||||
* Cascadia Code, Cascadia Mono (2111.01)
|
||||
* from microsoft/cascadia-code@de36d62e777d34d3bed92a7e23988e5d61e0ba02
|
||||
|
||||
@@ -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, float>;
|
||||
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, uint32_t>;
|
||||
using IFontAxesMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
|
||||
|
||||
namespace winrt::SampleApp::implementation
|
||||
|
||||
@@ -23,24 +23,21 @@ enum class LineRendition : uint8_t
|
||||
|
||||
constexpr til::inclusive_rect ScreenToBufferLine(const til::inclusive_rect& line, const LineRendition lineRendition)
|
||||
{
|
||||
// Use shift right to quickly divide the Left and Right by 2 for double width lines.
|
||||
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
|
||||
return { line.left >> scale, line.top, line.right >> scale, line.bottom };
|
||||
}
|
||||
|
||||
constexpr til::point ScreenToBufferLineInclusive(const til::point& line, const LineRendition lineRendition)
|
||||
constexpr til::point ScreenToBufferLine(const til::point& line, const LineRendition lineRendition)
|
||||
{
|
||||
// Use shift right to quickly divide the Left and Right by 2 for double width lines.
|
||||
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
|
||||
return { line.x >> scale, line.y };
|
||||
}
|
||||
|
||||
constexpr til::rect BufferToScreenLine(const til::rect& line, const LineRendition lineRendition)
|
||||
{
|
||||
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
|
||||
return { line.left << scale, line.top, line.right << scale, line.bottom };
|
||||
}
|
||||
|
||||
constexpr til::inclusive_rect BufferToScreenLine(const til::inclusive_rect& line, const LineRendition lineRendition)
|
||||
{
|
||||
// Use shift left to quickly multiply the Left and Right by 2 for double width lines.
|
||||
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
|
||||
return { line.left << scale, line.top, (line.right << scale) + scale, line.bottom };
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*++
|
||||
Copyright (c) Microsoft Corporation
|
||||
Licensed under the MIT license.
|
||||
|
||||
Module Name:
|
||||
- marks.hpp
|
||||
|
||||
Abstract:
|
||||
- Definitions for types that are used for "scroll marks" and shell integration
|
||||
in the buffer.
|
||||
- Scroll marks are identified by the existence of "ScrollbarData" on a ROW in the buffer.
|
||||
- Shell integration will then also markup the buffer with special
|
||||
TextAttributes, to identify regions of text as the Prompt, the Command, the
|
||||
Output, etc.
|
||||
- MarkExtents are used to abstract away those regions of text, so a caller
|
||||
doesn't need to iterate over the buffer themselves.
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
enum class MarkCategory : uint8_t
|
||||
{
|
||||
Default = 0,
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Success = 3,
|
||||
Prompt = 4
|
||||
};
|
||||
|
||||
// This is the data that's stored on each ROW, to suggest that there's something
|
||||
// interesting on this row to show in the scrollbar. Also used in conjunction
|
||||
// with shell integration - when a prompt is added through shell integration,
|
||||
// we'll also add a scrollbar mark as a quick "bookmark" to the start of that
|
||||
// command.
|
||||
struct ScrollbarData
|
||||
{
|
||||
MarkCategory category{ MarkCategory::Default };
|
||||
|
||||
// Scrollbar marks may have been given a color, or not.
|
||||
std::optional<til::color> color;
|
||||
|
||||
// Prompts without an exit code haven't had a matching FTCS CommandEnd
|
||||
// called yet. Any value other than 0 is an error.
|
||||
std::optional<uint32_t> exitCode;
|
||||
// Future consideration: stick the literal command as a string on here, if
|
||||
// we were given it with the 633;E sequence.
|
||||
};
|
||||
|
||||
// Helper struct for describing the bounds of a command and it's output,
|
||||
// * The Prompt is between the start & end
|
||||
// * The Command is between the end & commandEnd
|
||||
// * The Output is between the commandEnd & outputEnd
|
||||
//
|
||||
// These are not actually stored in the buffer. The buffer can produce them for
|
||||
// callers, to make reasoning about regions of the buffer easier.
|
||||
struct MarkExtents
|
||||
{
|
||||
// Data from the row
|
||||
ScrollbarData data;
|
||||
|
||||
til::point start;
|
||||
til::point end; // exclusive
|
||||
std::optional<til::point> commandEnd;
|
||||
std::optional<til::point> outputEnd;
|
||||
|
||||
// MarkCategory category{ MarkCategory::Info };
|
||||
// Other things we may want to think about in the future are listed in
|
||||
// GH#11000
|
||||
|
||||
bool HasCommand() const noexcept
|
||||
{
|
||||
return commandEnd.has_value() && *commandEnd != end;
|
||||
}
|
||||
bool HasOutput() const noexcept
|
||||
{
|
||||
return outputEnd.has_value() && *outputEnd != *commandEnd;
|
||||
}
|
||||
std::pair<til::point, til::point> GetExtent() const
|
||||
{
|
||||
til::point realEnd{ til::coalesce_value(outputEnd, commandEnd, end) };
|
||||
return std::make_pair(start, realEnd);
|
||||
}
|
||||
};
|
||||
|
||||
// Another helper, for when callers would like to know just about the data of
|
||||
// the scrollbar, but don't actually need all the extents of prompts.
|
||||
struct ScrollMark
|
||||
{
|
||||
til::CoordType row{ 0 };
|
||||
ScrollbarData data;
|
||||
};
|
||||
@@ -230,7 +230,6 @@ void ROW::Reset(const TextAttribute& attr) noexcept
|
||||
_lineRendition = LineRendition::SingleWidth;
|
||||
_wrapForced = false;
|
||||
_doubleBytePadded = false;
|
||||
_promptData = std::nullopt;
|
||||
_init();
|
||||
}
|
||||
|
||||
@@ -349,6 +348,12 @@ void ROW::_init() noexcept
|
||||
#pragma warning(push)
|
||||
}
|
||||
|
||||
void ROW::TransferAttributes(const til::small_rle<TextAttribute, uint16_t, 1>& attr, til::CoordType newWidth)
|
||||
{
|
||||
_attr = attr;
|
||||
_attr.resize_trailing_extent(gsl::narrow<uint16_t>(newWidth));
|
||||
}
|
||||
|
||||
void ROW::CopyFrom(const ROW& source)
|
||||
{
|
||||
_lineRendition = source._lineRendition;
|
||||
@@ -360,8 +365,7 @@ void ROW::CopyFrom(const ROW& source)
|
||||
};
|
||||
CopyTextFrom(state);
|
||||
|
||||
_attr = source.Attributes();
|
||||
_attr.resize_trailing_extent(_columnCount);
|
||||
TransferAttributes(source.Attributes(), _columnCount);
|
||||
}
|
||||
|
||||
// Returns the previous possible cursor position, preceding the given column.
|
||||
@@ -914,7 +918,7 @@ const til::small_rle<TextAttribute, uint16_t, 1>& ROW::Attributes() const noexce
|
||||
|
||||
TextAttribute ROW::GetAttrByColumn(const til::CoordType column) const
|
||||
{
|
||||
return _attr.at(_clampedColumn(column));
|
||||
return _attr.at(_clampedUint16(column));
|
||||
}
|
||||
|
||||
std::vector<uint16_t> ROW::GetHyperlinks() const
|
||||
@@ -1097,6 +1101,12 @@ 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
|
||||
{
|
||||
@@ -1171,45 +1181,3 @@ CharToColumnMapper ROW::_createCharToColumnMapper(ptrdiff_t offset) const noexce
|
||||
const auto guessedColumn = gsl::narrow_cast<til::CoordType>(clamp(offset, 0, _columnCount));
|
||||
return CharToColumnMapper{ _chars.data(), _charOffsets.data(), lastChar, guessedColumn };
|
||||
}
|
||||
|
||||
const std::optional<ScrollbarData>& ROW::GetScrollbarData() const noexcept
|
||||
{
|
||||
return _promptData;
|
||||
}
|
||||
void ROW::SetScrollbarData(std::optional<ScrollbarData> data) noexcept
|
||||
{
|
||||
_promptData = data;
|
||||
}
|
||||
|
||||
void ROW::StartPrompt() noexcept
|
||||
{
|
||||
if (!_promptData.has_value())
|
||||
{
|
||||
// You'd be tempted to write:
|
||||
//
|
||||
// _promptData = ScrollbarData{
|
||||
// .category = MarkCategory::Prompt,
|
||||
// .color = std::nullopt,
|
||||
// .exitCode = std::nullopt,
|
||||
// };
|
||||
//
|
||||
// But that's not very optimal! Read this thread for a breakdown of how
|
||||
// weird std::optional can be some times:
|
||||
//
|
||||
// https://github.com/microsoft/terminal/pull/16937#discussion_r1553660833
|
||||
|
||||
_promptData.emplace(MarkCategory::Prompt);
|
||||
}
|
||||
}
|
||||
|
||||
void ROW::EndOutput(std::optional<unsigned int> error) noexcept
|
||||
{
|
||||
if (_promptData.has_value())
|
||||
{
|
||||
_promptData->exitCode = error;
|
||||
if (error.has_value())
|
||||
{
|
||||
_promptData->category = *error == 0 ? MarkCategory::Success : MarkCategory::Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "LineRendition.hpp"
|
||||
#include "OutputCell.hpp"
|
||||
#include "OutputCellIterator.hpp"
|
||||
#include "Marks.hpp"
|
||||
|
||||
class ROW;
|
||||
class TextBuffer;
|
||||
@@ -132,6 +131,7 @@ public:
|
||||
til::CoordType GetReadableColumnCount() const noexcept;
|
||||
|
||||
void Reset(const TextAttribute& attr) noexcept;
|
||||
void TransferAttributes(const til::small_rle<TextAttribute, uint16_t, 1>& attr, til::CoordType newWidth);
|
||||
void CopyFrom(const ROW& source);
|
||||
|
||||
til::CoordType NavigateToPrevious(til::CoordType column) const noexcept;
|
||||
@@ -167,11 +167,6 @@ public:
|
||||
auto AttrBegin() const noexcept { return _attr.begin(); }
|
||||
auto AttrEnd() const noexcept { return _attr.end(); }
|
||||
|
||||
const std::optional<ScrollbarData>& GetScrollbarData() const noexcept;
|
||||
void SetScrollbarData(std::optional<ScrollbarData> data) noexcept;
|
||||
void StartPrompt() noexcept;
|
||||
void EndOutput(std::optional<unsigned int> error) noexcept;
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
friend constexpr bool operator==(const ROW& a, const ROW& b) noexcept;
|
||||
friend class RowTests;
|
||||
@@ -230,6 +225,8 @@ 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>
|
||||
@@ -302,8 +299,6 @@ private:
|
||||
bool _wrapForced = false;
|
||||
// Occurs when the user runs out of text to support a double byte character and we're forced to the next line
|
||||
bool _doubleBytePadded = false;
|
||||
|
||||
std::optional<ScrollbarData> _promptData = std::nullopt;
|
||||
};
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// Keeping TextColor compact helps us keeping TextAttribute compact,
|
||||
// which in turn ensures that our buffer memory usage is low.
|
||||
static_assert(sizeof(TextAttribute) == 18);
|
||||
static_assert(sizeof(TextAttribute) == 16);
|
||||
static_assert(alignof(TextAttribute) == 2);
|
||||
// Ensure that we can memcpy() and memmove() the struct for performance.
|
||||
static_assert(std::is_trivially_copyable_v<TextAttribute>);
|
||||
@@ -434,5 +434,4 @@ void TextAttribute::SetStandardErase() noexcept
|
||||
{
|
||||
_attrs = CharacterAttributes::Normal;
|
||||
_hyperlinkId = 0;
|
||||
_markKind = MarkKind::None;
|
||||
}
|
||||
|
||||
@@ -38,15 +38,6 @@ enum class UnderlineStyle
|
||||
Max = DashedUnderlined
|
||||
};
|
||||
|
||||
// We only need a few bits, but uint8_t apparently doesn't satisfy std::has_unique_object_representations_v
|
||||
enum class MarkKind : uint16_t
|
||||
{
|
||||
None = 0,
|
||||
Prompt = 1,
|
||||
Command = 2,
|
||||
Output = 3,
|
||||
};
|
||||
|
||||
class TextAttribute final
|
||||
{
|
||||
public:
|
||||
@@ -55,8 +46,7 @@ public:
|
||||
_foreground{},
|
||||
_background{},
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{},
|
||||
_markKind{ MarkKind::None }
|
||||
_underlineColor{}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,8 +55,7 @@ public:
|
||||
_foreground{ gsl::at(s_legacyForegroundColorMap, wLegacyAttr & FG_ATTRS) },
|
||||
_background{ gsl::at(s_legacyBackgroundColorMap, (wLegacyAttr & BG_ATTRS) >> 4) },
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{},
|
||||
_markKind{ MarkKind::None }
|
||||
_underlineColor{}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -77,8 +66,7 @@ public:
|
||||
_foreground{ rgbForeground },
|
||||
_background{ rgbBackground },
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{ rgbUnderline },
|
||||
_markKind{ MarkKind::None }
|
||||
_underlineColor{ rgbUnderline }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -87,8 +75,7 @@ public:
|
||||
_foreground{ foreground },
|
||||
_background{ background },
|
||||
_hyperlinkId{ hyperlinkId },
|
||||
_underlineColor{ underlineColor },
|
||||
_markKind{ MarkKind::None }
|
||||
_underlineColor{ underlineColor }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -148,15 +135,6 @@ public:
|
||||
return _attrs;
|
||||
}
|
||||
|
||||
constexpr void SetMarkAttributes(const MarkKind attrs) noexcept
|
||||
{
|
||||
_markKind = attrs;
|
||||
}
|
||||
constexpr MarkKind GetMarkAttributes() const noexcept
|
||||
{
|
||||
return _markKind;
|
||||
}
|
||||
|
||||
bool IsHyperlink() const noexcept;
|
||||
|
||||
TextColor GetForeground() const noexcept;
|
||||
@@ -224,7 +202,6 @@ private:
|
||||
TextColor _foreground; // sizeof: 4, alignof: 1
|
||||
TextColor _background; // sizeof: 4, alignof: 1
|
||||
TextColor _underlineColor; // sizeof: 4, alignof: 1
|
||||
MarkKind _markKind; // sizeof: 2, alignof: 1
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
friend class TextBufferTests;
|
||||
|
||||
@@ -6,87 +6,19 @@
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -124,16 +56,11 @@ 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)
|
||||
{
|
||||
return dest;
|
||||
memcpy(dest, src, sizeof(UText));
|
||||
}
|
||||
|
||||
memcpy(dest, src, sizeof(UText));
|
||||
if (const auto buf = accessBuffer(dest))
|
||||
{
|
||||
buf->AddRef();
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
@@ -155,9 +82,7 @@ try
|
||||
|
||||
for (til::CoordType y = range.begin; y < range.end; ++y)
|
||||
{
|
||||
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();
|
||||
length += textBuffer.GetRowByOffset(y).GetText().size();
|
||||
}
|
||||
|
||||
accessLength(ut) = length;
|
||||
@@ -201,13 +126,11 @@ 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
|
||||
@@ -215,17 +138,12 @@ try
|
||||
--y;
|
||||
if (y < range.begin)
|
||||
{
|
||||
assert(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& row = textBuffer.GetRowByOffset(y);
|
||||
text = row.GetText();
|
||||
wasWrapForced = row.WasWrapForced();
|
||||
|
||||
text = textBuffer.GetRowByOffset(y).GetText();
|
||||
limit = start;
|
||||
// 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;
|
||||
start -= text.size();
|
||||
} while (neededIndex < start);
|
||||
}
|
||||
else
|
||||
@@ -235,32 +153,15 @@ try
|
||||
++y;
|
||||
if (y >= range.end)
|
||||
{
|
||||
assert(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& row = textBuffer.GetRowByOffset(y);
|
||||
text = row.GetText();
|
||||
wasWrapForced = row.WasWrapForced();
|
||||
|
||||
text = textBuffer.GetRowByOffset(y).GetText();
|
||||
start = limit;
|
||||
// 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;
|
||||
limit += text.size();
|
||||
} 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;
|
||||
@@ -355,32 +256,18 @@ 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).
|
||||
Microsoft::Console::ICU::unique_utext Microsoft::Console::ICU::UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept
|
||||
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).
|
||||
unique_utext ut{ UTEXT_INITIALIZER };
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
utext_setup(&ut, 0, &status);
|
||||
FAIL_FAST_IF(status > U_ZERO_ERROR);
|
||||
|
||||
UText ut = UTEXT_INITIALIZER;
|
||||
ut.providerProperties = (1 << UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE) | (1 << UTEXT_PROVIDER_STABLE_CHUNKS);
|
||||
ut.pFuncs = &utextFuncs;
|
||||
ut.context = &textBuffer;
|
||||
|
||||
@@ -10,9 +10,8 @@ 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>;
|
||||
|
||||
unique_utext UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,11 @@ void Cursor::_RedrawCursor() noexcept
|
||||
// - <none>
|
||||
void Cursor::_RedrawCursorAlways() noexcept
|
||||
{
|
||||
_parentBuffer.NotifyPaintFrame();
|
||||
try
|
||||
{
|
||||
_parentBuffer.TriggerRedrawCursor(_cPosition);
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
|
||||
void Cursor::SetPosition(const til::point cPosition) noexcept
|
||||
|
||||
@@ -8,26 +8,28 @@
|
||||
|
||||
using namespace Microsoft::Console::Types;
|
||||
|
||||
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)
|
||||
bool Search::ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive)
|
||||
{
|
||||
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 = textBuffer.GetLastMutationId();
|
||||
_lastMutationId = lastMutationId;
|
||||
|
||||
_results = textBuffer.SearchText(needle, caseInsensitive);
|
||||
_index = reverse ? gsl::narrow_cast<ptrdiff_t>(_results.size()) - 1 : 0;
|
||||
_step = reverse ? -1 : 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,9 +93,8 @@ void Search::MovePastPoint(const til::point anchor) noexcept
|
||||
_index = (index + count) % count;
|
||||
}
|
||||
|
||||
void Search::FindNext(bool reverse) noexcept
|
||||
void Search::FindNext() noexcept
|
||||
{
|
||||
_step = reverse ? -1 : 1;
|
||||
if (const auto count{ gsl::narrow_cast<ptrdiff_t>(_results.size()) })
|
||||
{
|
||||
_index = (_index + _step + count) % count;
|
||||
@@ -110,6 +111,28 @@ 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
|
||||
|
||||
@@ -135,11 +158,6 @@ 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;
|
||||
|
||||
@@ -25,19 +25,18 @@ class Search final
|
||||
public:
|
||||
Search() = default;
|
||||
|
||||
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);
|
||||
bool ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive);
|
||||
|
||||
void MoveToCurrentSelection();
|
||||
void MoveToPoint(til::point anchor) noexcept;
|
||||
void MovePastPoint(til::point anchor) noexcept;
|
||||
void FindNext(bool reverse) noexcept;
|
||||
void FindNext() 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:
|
||||
|
||||
@@ -562,7 +562,7 @@ til::point TextBuffer::NavigateCursor(til::point position, til::CoordType distan
|
||||
|
||||
// This function is intended for writing regular "lines" of text as it'll set the wrap flag on the given row.
|
||||
// You can continue calling the function on the same row as long as state.columnEnd < state.columnLimit.
|
||||
void TextBuffer::Replace(til::CoordType row, const TextAttribute& attributes, RowWriteState& state)
|
||||
void TextBuffer::Write(til::CoordType row, const TextAttribute& attributes, RowWriteState& state)
|
||||
{
|
||||
auto& r = GetMutableRowByOffset(row);
|
||||
r.ReplaceText(state);
|
||||
@@ -570,36 +570,6 @@ void TextBuffer::Replace(til::CoordType row, const TextAttribute& attributes, Ro
|
||||
TriggerRedraw(Viewport::FromExclusive({ state.columnBeginDirty, row, state.columnEndDirty, row + 1 }));
|
||||
}
|
||||
|
||||
void TextBuffer::Insert(til::CoordType row, const TextAttribute& attributes, RowWriteState& state)
|
||||
{
|
||||
auto& r = GetMutableRowByOffset(row);
|
||||
auto& scratch = GetScratchpadRow();
|
||||
|
||||
scratch.CopyFrom(r);
|
||||
|
||||
r.ReplaceText(state);
|
||||
r.ReplaceAttributes(state.columnBegin, state.columnEnd, attributes);
|
||||
|
||||
// Restore trailing text from our backup in scratch.
|
||||
RowWriteState restoreState{
|
||||
.text = scratch.GetText(state.columnBegin, state.columnLimit),
|
||||
.columnBegin = state.columnEnd,
|
||||
.columnLimit = state.columnLimit,
|
||||
};
|
||||
r.ReplaceText(restoreState);
|
||||
|
||||
// Restore trailing attributes as well.
|
||||
if (const auto copyAmount = restoreState.columnEnd - restoreState.columnBegin; copyAmount > 0)
|
||||
{
|
||||
auto& rowAttr = r.Attributes();
|
||||
const auto& scratchAttr = scratch.Attributes();
|
||||
const auto restoreAttr = scratchAttr.slice(gsl::narrow<uint16_t>(state.columnBegin), gsl::narrow<uint16_t>(state.columnBegin + copyAmount));
|
||||
rowAttr.replace(gsl::narrow<uint16_t>(restoreState.columnBegin), gsl::narrow<uint16_t>(restoreState.columnEnd), restoreAttr);
|
||||
}
|
||||
|
||||
TriggerRedraw(Viewport::FromExclusive({ state.columnBeginDirty, row, restoreState.columnEndDirty, row + 1 }));
|
||||
}
|
||||
|
||||
// Fills an area of the buffer with a given fill character(s) and attributes.
|
||||
void TextBuffer::FillRect(const til::rect& rect, const std::wstring_view& fill, const TextAttribute& attributes)
|
||||
{
|
||||
@@ -1113,8 +1083,11 @@ void TextBuffer::SetCurrentLineRendition(const LineRendition lineRendition, cons
|
||||
// And if it's no longer single width, the right half of the row should be erased.
|
||||
if (lineRendition != LineRendition::SingleWidth)
|
||||
{
|
||||
const auto fillChar = L' ';
|
||||
const auto fillOffset = GetLineWidth(rowIndex);
|
||||
FillRect({ fillOffset, rowIndex, til::CoordTypeMax, rowIndex + 1 }, L" ", fillAttributes);
|
||||
const auto fillLength = gsl::narrow<size_t>(GetSize().Width() - fillOffset);
|
||||
const OutputCellIterator fillData{ fillChar, fillAttributes, fillLength };
|
||||
row.WriteCells(fillData, fillOffset, false);
|
||||
// We also need to make sure the cursor is clamped within the new width.
|
||||
GetCursor().SetPosition(ClampPositionWithinLine(cursorPosition));
|
||||
}
|
||||
@@ -1205,6 +1178,7 @@ void TextBuffer::ClearScrollback(const til::CoordType start, const til::CoordTyp
|
||||
GetMutableRowByOffset(y).Reset(_initialAttributes);
|
||||
}
|
||||
|
||||
ScrollMarks(-start);
|
||||
ClearMarksInRange(til::point{ 0, height }, til::point{ _width, _height });
|
||||
}
|
||||
|
||||
@@ -1265,14 +1239,6 @@ Microsoft::Console::Render::Renderer& TextBuffer::GetRenderer() noexcept
|
||||
return _renderer;
|
||||
}
|
||||
|
||||
void TextBuffer::NotifyPaintFrame() noexcept
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
{
|
||||
_renderer.NotifyPaintFrame();
|
||||
}
|
||||
}
|
||||
|
||||
void TextBuffer::TriggerRedraw(const Viewport& viewport)
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
@@ -1281,6 +1247,14 @@ void TextBuffer::TriggerRedraw(const Viewport& viewport)
|
||||
}
|
||||
}
|
||||
|
||||
void TextBuffer::TriggerRedrawCursor(const til::point position)
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
{
|
||||
_renderer.TriggerRedrawCursor(&position);
|
||||
}
|
||||
}
|
||||
|
||||
void TextBuffer::TriggerRedrawAll()
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
@@ -1323,8 +1297,7 @@ void TextBuffer::TriggerNewTextNotification(const std::wstring_view newText)
|
||||
// - the delimiter class for the given char
|
||||
DelimiterClass TextBuffer::_GetDelimiterClassAt(const til::point pos, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
const auto realPos = ScreenToBufferPosition(pos);
|
||||
return GetRowByOffset(realPos.y).DelimiterClassAt(realPos.x, wordDelimiters);
|
||||
return GetRowByOffset(pos.y).DelimiterClassAt(pos.x, wordDelimiters);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1440,23 +1413,10 @@ 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)
|
||||
{
|
||||
if (result.x == bufferSize.Left())
|
||||
//prevent selection wrapping on whitespace selection
|
||||
if (isControlChar && result.x == bufferSize.Left())
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
bufferSize.DecrementInBounds(result);
|
||||
}
|
||||
@@ -1576,22 +1536,10 @@ 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 (result.x == bufferSize.RightInclusive())
|
||||
if (isControlChar && result.x == bufferSize.RightInclusive())
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
bufferSize.IncrementInBoundsCircular(result);
|
||||
}
|
||||
|
||||
@@ -1945,8 +1893,8 @@ std::vector<til::point_span> TextBuffer::GetTextSpans(til::point start, til::poi
|
||||
// equivalent buffer offsets, taking line rendition into account.
|
||||
if (!bufferCoordinates)
|
||||
{
|
||||
higherCoord = ScreenToBufferLineInclusive(higherCoord, GetLineRendition(higherCoord.y));
|
||||
lowerCoord = ScreenToBufferLineInclusive(lowerCoord, GetLineRendition(lowerCoord.y));
|
||||
higherCoord = ScreenToBufferLine(higherCoord, GetLineRendition(higherCoord.y));
|
||||
lowerCoord = ScreenToBufferLine(lowerCoord, GetLineRendition(lowerCoord.y));
|
||||
}
|
||||
|
||||
til::inclusive_rect asRect = { higherCoord.x, higherCoord.y, lowerCoord.x, lowerCoord.y };
|
||||
@@ -2020,10 +1968,25 @@ 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
|
||||
{
|
||||
const auto req = CopyRequest::FromConfig(*this, start, end, true, false, false, false);
|
||||
return GetPlainText(req);
|
||||
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;
|
||||
}
|
||||
|
||||
// Routine Description:
|
||||
@@ -2042,8 +2005,8 @@ std::tuple<til::CoordType, til::CoordType, bool> TextBuffer::_RowCopyHelper(cons
|
||||
if (req.blockSelection)
|
||||
{
|
||||
const auto lineRendition = row.GetLineRendition();
|
||||
const auto minX = req.bufferCoordinates ? req.minX : ScreenToBufferLineInclusive(til::point{ req.minX, iRow }, lineRendition).x;
|
||||
const auto maxX = req.bufferCoordinates ? req.maxX : ScreenToBufferLineInclusive(til::point{ req.maxX, iRow }, lineRendition).x;
|
||||
const auto minX = req.bufferCoordinates ? req.minX : ScreenToBufferLine(til::point{ req.minX, iRow }, lineRendition).x;
|
||||
const auto maxX = req.bufferCoordinates ? req.maxX : ScreenToBufferLine(til::point{ req.maxX, iRow }, lineRendition).x;
|
||||
|
||||
rowBeg = minX;
|
||||
rowEnd = maxX + 1; // +1 to get an exclusive end
|
||||
@@ -2051,8 +2014,8 @@ std::tuple<til::CoordType, til::CoordType, bool> TextBuffer::_RowCopyHelper(cons
|
||||
else
|
||||
{
|
||||
const auto lineRendition = row.GetLineRendition();
|
||||
const auto beg = req.bufferCoordinates ? req.beg : ScreenToBufferLineInclusive(req.beg, lineRendition);
|
||||
const auto end = req.bufferCoordinates ? req.end : ScreenToBufferLineInclusive(req.end, lineRendition);
|
||||
const auto beg = req.bufferCoordinates ? req.beg : ScreenToBufferLine(req.beg, lineRendition);
|
||||
const auto end = req.bufferCoordinates ? req.end : ScreenToBufferLine(req.end, lineRendition);
|
||||
|
||||
rowBeg = iRow != beg.y ? 0 : beg.x;
|
||||
rowEnd = iRow != end.y ? row.GetReadableColumnCount() : end.x + 1; // +1 to get an exclusive end
|
||||
@@ -2411,7 +2374,7 @@ std::string TextBuffer::GenRTF(const CopyRequest& req,
|
||||
|
||||
// \fsN: specifies font size in half-points. E.g. \fs20 results in a font
|
||||
// size of 10 pts. That's why, font size is multiplied by 2 here.
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\fs{}"), 2 * fontHeightPoints);
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\fs{}"), std::to_string(2 * fontHeightPoints));
|
||||
|
||||
// Set the background color for the page. But the standard way (\cbN) to do
|
||||
// this isn't supported in Word. However, the following control words sequence
|
||||
@@ -2538,7 +2501,8 @@ void TextBuffer::_AppendRTFText(std::string& contentBuilder, const std::wstring_
|
||||
{
|
||||
// Windows uses unsigned wchar_t - RTF uses signed ones.
|
||||
// '?' is the fallback ascii character.
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\u{}?"), std::bit_cast<int16_t>(codeUnit));
|
||||
const auto codeUnitRTFStr = std::to_string(std::bit_cast<int16_t>(codeUnit));
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\u{}?"), codeUnitRTFStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2785,8 +2749,10 @@ void TextBuffer::Serialize(const wchar_t* destination) const
|
||||
const auto fileSize = gsl::narrow<DWORD>(buffer.size() * sizeof(wchar_t));
|
||||
DWORD bytesWritten = 0;
|
||||
THROW_IF_WIN32_BOOL_FALSE(WriteFile(file.get(), buffer.data(), fileSize, &bytesWritten, nullptr));
|
||||
THROW_WIN32_IF_MSG(ERROR_WRITE_FAULT, bytesWritten != fileSize, "failed to write");
|
||||
buffer.clear();
|
||||
if (bytesWritten != fileSize)
|
||||
{
|
||||
THROW_WIN32_MSG(ERROR_WRITE_FAULT, "failed to write");
|
||||
}
|
||||
}
|
||||
|
||||
if (!moreRowsRemaining)
|
||||
@@ -2905,18 +2871,6 @@ void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const View
|
||||
oldRowLimit = std::max(oldRowLimit, oldCursorPos.x + 1);
|
||||
}
|
||||
|
||||
// Immediately copy this mark over to our new row. The positions of the
|
||||
// marks themselves will be preserved, since they're just text
|
||||
// attributes. But the "bookmark" needs to get moved to the new row too.
|
||||
// * If a row wraps as it reflows, that's fine - we want to leave the
|
||||
// mark on the row it started on.
|
||||
// * If the second row of a wrapped row had a mark, and it de-flows onto a
|
||||
// single row, that's fine! The mark was on that logical row.
|
||||
if (oldRow.GetScrollbarData().has_value())
|
||||
{
|
||||
newBuffer.GetMutableRowByOffset(newY).SetScrollbarData(oldRow.GetScrollbarData());
|
||||
}
|
||||
|
||||
til::CoordType oldX = 0;
|
||||
|
||||
// Copy oldRow into newBuffer until oldRow has been fully consumed.
|
||||
@@ -3036,6 +2990,9 @@ void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const View
|
||||
assert(newCursorPos.y >= 0 && newCursorPos.y < newHeight);
|
||||
newCursor.SetSize(oldCursor.GetSize());
|
||||
newCursor.SetPosition(newCursorPos);
|
||||
|
||||
newBuffer._marks = oldBuffer._marks;
|
||||
newBuffer._trimMarksOutsideBuffer();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -3185,82 +3142,9 @@ std::vector<til::point_span> TextBuffer::SearchText(const std::wstring_view& nee
|
||||
return results;
|
||||
}
|
||||
|
||||
// Collect up all the rows that were marked, and the data marked on that row.
|
||||
// This is what should be used for hot paths, like updating the scrollbar.
|
||||
std::vector<ScrollMark> TextBuffer::GetMarkRows() const
|
||||
const std::vector<ScrollMark>& TextBuffer::GetMarks() const noexcept
|
||||
{
|
||||
std::vector<ScrollMark> marks;
|
||||
const auto bottom = _estimateOffsetOfLastCommittedRow();
|
||||
for (auto y = 0; y <= bottom; y++)
|
||||
{
|
||||
const auto& row = GetRowByOffset(y);
|
||||
const auto& data{ row.GetScrollbarData() };
|
||||
if (data.has_value())
|
||||
{
|
||||
marks.emplace_back(y, *data);
|
||||
}
|
||||
}
|
||||
return marks;
|
||||
}
|
||||
|
||||
// Get all the regions for all the shell integration marks in the buffer.
|
||||
// Marks will be returned in top-down order.
|
||||
//
|
||||
// This possibly iterates over every run in the buffer, so don't do this on a
|
||||
// hot path. Just do this once per user input, if at all possible.
|
||||
//
|
||||
// Use `limit` to control how many you get, _starting from the bottom_. (e.g.
|
||||
// limit=1 will just give you the "most recent mark").
|
||||
std::vector<MarkExtents> TextBuffer::GetMarkExtents(size_t limit) const
|
||||
{
|
||||
if (limit == 0u)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<MarkExtents> marks{};
|
||||
const auto bottom = _estimateOffsetOfLastCommittedRow();
|
||||
auto lastPromptY = bottom;
|
||||
for (auto promptY = bottom; promptY >= 0; promptY--)
|
||||
{
|
||||
const auto& currRow = GetRowByOffset(promptY);
|
||||
auto& rowPromptData = currRow.GetScrollbarData();
|
||||
if (!rowPromptData.has_value())
|
||||
{
|
||||
// This row didn't start a prompt, don't even look here.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Future thought! In #11000 & #14792, we considered the possibility of
|
||||
// scrolling to only an error mark, or something like that. Perhaps in
|
||||
// the future, add a customizable filter that's a set of types of mark
|
||||
// to include?
|
||||
//
|
||||
// For now, skip any "Default" marks, since those came from the UI. We
|
||||
// just want the ones that correspond to shell integration.
|
||||
|
||||
if (rowPromptData->category == MarkCategory::Default)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// This row did start a prompt! Find the prompt that starts here.
|
||||
// Presumably, no rows below us will have prompts, so pass in the last
|
||||
// row with text as the bottom
|
||||
marks.push_back(_scrollMarkExtentForRow(promptY, lastPromptY));
|
||||
|
||||
// operator>=(T, optional<U>) will return true if the optional is
|
||||
// nullopt, unfortunately.
|
||||
if (marks.size() >= limit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
lastPromptY = promptY;
|
||||
}
|
||||
|
||||
std::reverse(marks.begin(), marks.end());
|
||||
return marks;
|
||||
return _marks;
|
||||
}
|
||||
|
||||
// Remove all marks between `start` & `end`, inclusive.
|
||||
@@ -3268,318 +3152,115 @@ void TextBuffer::ClearMarksInRange(
|
||||
const til::point start,
|
||||
const til::point end)
|
||||
{
|
||||
auto top = std::clamp(std::min(start.y, end.y), 0, _height - 1);
|
||||
auto bottom = std::clamp(std::max(start.y, end.y), 0, _estimateOffsetOfLastCommittedRow());
|
||||
|
||||
for (auto y = top; y <= bottom; y++)
|
||||
{
|
||||
auto& row = GetMutableRowByOffset(y);
|
||||
auto& runs = row.Attributes().runs();
|
||||
row.SetScrollbarData(std::nullopt);
|
||||
for (auto& [attr, length] : runs)
|
||||
{
|
||||
attr.SetMarkAttributes(MarkKind::None);
|
||||
}
|
||||
}
|
||||
}
|
||||
void TextBuffer::ClearAllMarks()
|
||||
{
|
||||
ClearMarksInRange({ 0, 0 }, { _width - 1, _height - 1 });
|
||||
}
|
||||
|
||||
// Collect up the extent of the prompt and possibly command and output for the
|
||||
// mark that starts on this row.
|
||||
MarkExtents TextBuffer::_scrollMarkExtentForRow(const til::CoordType rowOffset,
|
||||
const til::CoordType bottomInclusive) const
|
||||
{
|
||||
const auto& startRow = GetRowByOffset(rowOffset);
|
||||
const auto& rowPromptData = startRow.GetScrollbarData();
|
||||
assert(rowPromptData.has_value());
|
||||
|
||||
MarkExtents mark{
|
||||
.data = *rowPromptData,
|
||||
auto inRange = [&start, &end](const ScrollMark& m) {
|
||||
return (m.start >= start && m.start <= end) ||
|
||||
(m.end >= start && m.end <= end);
|
||||
};
|
||||
|
||||
bool startedPrompt = false;
|
||||
bool startedCommand = false;
|
||||
bool startedOutput = false;
|
||||
MarkKind lastMarkKind = MarkKind::Output;
|
||||
_marks.erase(std::remove_if(_marks.begin(),
|
||||
_marks.end(),
|
||||
inRange),
|
||||
_marks.end());
|
||||
}
|
||||
void TextBuffer::ClearAllMarks() noexcept
|
||||
{
|
||||
_marks.clear();
|
||||
}
|
||||
|
||||
const auto endThisMark = [&](auto x, auto y) {
|
||||
if (startedOutput)
|
||||
{
|
||||
mark.outputEnd = til::point{ x, y };
|
||||
}
|
||||
if (!startedOutput && startedCommand)
|
||||
{
|
||||
mark.commandEnd = til::point{ x, y };
|
||||
}
|
||||
if (!startedCommand)
|
||||
{
|
||||
mark.end = til::point{ x, y };
|
||||
}
|
||||
};
|
||||
auto x = 0;
|
||||
auto y = rowOffset;
|
||||
til::point lastMarkedText{ x, y };
|
||||
for (; y <= bottomInclusive; y++)
|
||||
// Adjust all the marks in the y-direction by `delta`. Positive values move the
|
||||
// marks down (the positive y direction). Negative values move up. This will
|
||||
// trim marks that are no longer have a start in the bounds of the buffer
|
||||
void TextBuffer::ScrollMarks(const int delta)
|
||||
{
|
||||
for (auto& mark : _marks)
|
||||
{
|
||||
// Now we need to iterate over text attributes. We need to find a
|
||||
// segment of Prompt attributes, we'll skip those. Then there should be
|
||||
// Command attributes. Collect up all of those, till we get to the next
|
||||
// Output attribute.
|
||||
mark.start.y += delta;
|
||||
|
||||
const auto& row = GetRowByOffset(y);
|
||||
const auto runs = row.Attributes().runs();
|
||||
x = 0;
|
||||
for (const auto& [attr, length] : runs)
|
||||
// If the mark had sub-regions, then move those pointers too
|
||||
if (mark.commandEnd.has_value())
|
||||
{
|
||||
const auto nextX = gsl::narrow_cast<uint16_t>(x + length);
|
||||
const auto markKind{ attr.GetMarkAttributes() };
|
||||
|
||||
if (markKind != MarkKind::None)
|
||||
{
|
||||
lastMarkedText = { nextX, y };
|
||||
|
||||
if (markKind == MarkKind::Prompt)
|
||||
{
|
||||
if (startedCommand || startedOutput)
|
||||
{
|
||||
// we got a _new_ prompt. bail out.
|
||||
break;
|
||||
}
|
||||
if (!startedPrompt)
|
||||
{
|
||||
// We entered the first prompt here
|
||||
startedPrompt = true;
|
||||
mark.start = til::point{ x, y };
|
||||
}
|
||||
endThisMark(lastMarkedText.x, lastMarkedText.y);
|
||||
}
|
||||
else if (markKind == MarkKind::Command && startedPrompt)
|
||||
{
|
||||
startedCommand = true;
|
||||
endThisMark(lastMarkedText.x, lastMarkedText.y);
|
||||
}
|
||||
else if ((markKind == MarkKind::Output) && startedPrompt)
|
||||
{
|
||||
startedOutput = true;
|
||||
if (!mark.commandEnd.has_value())
|
||||
{
|
||||
// immediately just end the command at the start here, so we can treat this whole run as output
|
||||
mark.commandEnd = mark.end;
|
||||
startedCommand = true;
|
||||
}
|
||||
|
||||
endThisMark(lastMarkedText.x, lastMarkedText.y);
|
||||
}
|
||||
// Otherwise, we've changed from any state -> any state, and it doesn't really matter.
|
||||
lastMarkKind = markKind;
|
||||
}
|
||||
// advance to next run of text
|
||||
x = nextX;
|
||||
(*mark.commandEnd).y += delta;
|
||||
}
|
||||
// we went over all the runs in this row, but we're not done yet. Keep iterating on the next row.
|
||||
}
|
||||
|
||||
// Okay, we're at the bottom of the buffer? Yea, just return what we found.
|
||||
if (!startedCommand)
|
||||
{
|
||||
// If we never got to a Command or Output run, then we never set .end.
|
||||
// Set it here to the last run we saw.
|
||||
endThisMark(lastMarkedText.x, lastMarkedText.y);
|
||||
}
|
||||
return mark;
|
||||
}
|
||||
|
||||
std::wstring TextBuffer::_commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const
|
||||
{
|
||||
std::wstring commandBuilder;
|
||||
MarkKind lastMarkKind = MarkKind::Prompt;
|
||||
for (auto y = rowOffset; y <= bottomInclusive; y++)
|
||||
{
|
||||
// Now we need to iterate over text attributes. We need to find a
|
||||
// segment of Prompt attributes, we'll skip those. Then there should be
|
||||
// Command attributes. Collect up all of those, till we get to the next
|
||||
// Output attribute.
|
||||
|
||||
const auto& row = GetRowByOffset(y);
|
||||
const auto runs = row.Attributes().runs();
|
||||
auto x = 0;
|
||||
for (const auto& [attr, length] : runs)
|
||||
if (mark.outputEnd.has_value())
|
||||
{
|
||||
const auto nextX = gsl::narrow_cast<uint16_t>(x + length);
|
||||
const auto markKind{ attr.GetMarkAttributes() };
|
||||
if (markKind != lastMarkKind)
|
||||
{
|
||||
if (lastMarkKind == MarkKind::Command)
|
||||
{
|
||||
// We've changed away from being in a command. We're done.
|
||||
// Return what we've gotten so far.
|
||||
return commandBuilder;
|
||||
}
|
||||
// Otherwise, we've changed from any state -> any state, and it doesn't really matter.
|
||||
lastMarkKind = markKind;
|
||||
}
|
||||
|
||||
if (markKind == MarkKind::Command)
|
||||
{
|
||||
commandBuilder += row.GetText(x, nextX);
|
||||
}
|
||||
// advance to next run of text
|
||||
x = nextX;
|
||||
}
|
||||
// we went over all the runs in this row, but we're not done yet. Keep iterating on the next row.
|
||||
}
|
||||
// Okay, we're at the bottom of the buffer? Yea, just return what we found.
|
||||
return commandBuilder;
|
||||
}
|
||||
|
||||
std::wstring TextBuffer::CurrentCommand() const
|
||||
{
|
||||
auto promptY = GetCursor().GetPosition().y;
|
||||
for (; promptY >= 0; promptY--)
|
||||
{
|
||||
const auto& currRow = GetRowByOffset(promptY);
|
||||
auto& rowPromptData = currRow.GetScrollbarData();
|
||||
if (!rowPromptData.has_value())
|
||||
{
|
||||
// This row didn't start a prompt, don't even look here.
|
||||
continue;
|
||||
}
|
||||
|
||||
// This row did start a prompt! Find the prompt that starts here.
|
||||
// Presumably, no rows below us will have prompts, so pass in the last
|
||||
// row with text as the bottom
|
||||
return _commandForRow(promptY, _estimateOffsetOfLastCommittedRow());
|
||||
}
|
||||
return L"";
|
||||
}
|
||||
|
||||
std::vector<std::wstring> TextBuffer::Commands() const
|
||||
{
|
||||
std::vector<std::wstring> commands{};
|
||||
const auto bottom = _estimateOffsetOfLastCommittedRow();
|
||||
auto lastPromptY = bottom;
|
||||
for (auto promptY = bottom; promptY >= 0; promptY--)
|
||||
{
|
||||
const auto& currRow = GetRowByOffset(promptY);
|
||||
auto& rowPromptData = currRow.GetScrollbarData();
|
||||
if (!rowPromptData.has_value())
|
||||
{
|
||||
// This row didn't start a prompt, don't even look here.
|
||||
continue;
|
||||
}
|
||||
|
||||
// This row did start a prompt! Find the prompt that starts here.
|
||||
// Presumably, no rows below us will have prompts, so pass in the last
|
||||
// row with text as the bottom
|
||||
auto foundCommand = _commandForRow(promptY, lastPromptY);
|
||||
if (!foundCommand.empty())
|
||||
{
|
||||
commands.emplace_back(std::move(foundCommand));
|
||||
}
|
||||
lastPromptY = promptY;
|
||||
}
|
||||
std::reverse(commands.begin(), commands.end());
|
||||
return commands;
|
||||
}
|
||||
|
||||
void TextBuffer::StartPrompt()
|
||||
{
|
||||
const auto currentRowOffset = GetCursor().GetPosition().y;
|
||||
auto& currentRow = GetMutableRowByOffset(currentRowOffset);
|
||||
currentRow.StartPrompt();
|
||||
|
||||
_currentAttributes.SetMarkAttributes(MarkKind::Prompt);
|
||||
}
|
||||
|
||||
bool TextBuffer::_createPromptMarkIfNeeded()
|
||||
{
|
||||
// We might get here out-of-order, without seeing a StartPrompt (FTCS A)
|
||||
// first. Since StartPrompt actually sets up the prompt mark on the ROW, we
|
||||
// need to do a bit of extra work here to start a new mark (if the last one
|
||||
// wasn't in an appropriate state).
|
||||
|
||||
const auto mostRecentMarks = GetMarkExtents(1u);
|
||||
if (!mostRecentMarks.empty())
|
||||
{
|
||||
const auto& mostRecentMark = til::at(mostRecentMarks, 0);
|
||||
if (!mostRecentMark.HasOutput())
|
||||
{
|
||||
// The most recent command mark _didn't_ have output yet. Great!
|
||||
// we'll leave it alone, and just start treating text as Command or Output.
|
||||
return false;
|
||||
}
|
||||
|
||||
// The most recent command mark had output. That suggests that either:
|
||||
// * shell integration wasn't enabled (but the user would still
|
||||
// like lines with enters to be marked as prompts)
|
||||
// * or we're in the middle of a command that's ongoing.
|
||||
|
||||
// If it does have a command, then we're still in the output of
|
||||
// that command.
|
||||
// --> the current attrs should already be set to Output.
|
||||
if (mostRecentMark.HasCommand())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// If the mark doesn't have any command - then we know we're
|
||||
// playing silly games with just marking whole lines as prompts,
|
||||
// then immediately going to output.
|
||||
// --> Below, we'll add a new mark to this row.
|
||||
}
|
||||
|
||||
// There were no marks at all!
|
||||
// --> add a new mark to this row, set all the attrs in this row
|
||||
// to be Prompt, and set the current attrs to Output.
|
||||
|
||||
auto& row = GetMutableRowByOffset(GetCursor().GetPosition().y);
|
||||
row.StartPrompt();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextBuffer::StartCommand()
|
||||
{
|
||||
const auto createdMark = _createPromptMarkIfNeeded();
|
||||
_currentAttributes.SetMarkAttributes(MarkKind::Command);
|
||||
return createdMark;
|
||||
}
|
||||
bool TextBuffer::StartOutput()
|
||||
{
|
||||
const auto createdMark = _createPromptMarkIfNeeded();
|
||||
_currentAttributes.SetMarkAttributes(MarkKind::Output);
|
||||
return createdMark;
|
||||
}
|
||||
|
||||
// Find the row above the cursor where this most recent prompt started, and set
|
||||
// the exit code on that row's scroll mark.
|
||||
void TextBuffer::EndCurrentCommand(std::optional<unsigned int> error)
|
||||
{
|
||||
_currentAttributes.SetMarkAttributes(MarkKind::None);
|
||||
|
||||
for (auto y = GetCursor().GetPosition().y; y >= 0; y--)
|
||||
{
|
||||
auto& currRow = GetMutableRowByOffset(y);
|
||||
auto& rowPromptData = currRow.GetScrollbarData();
|
||||
if (rowPromptData.has_value())
|
||||
{
|
||||
currRow.EndOutput(error);
|
||||
return;
|
||||
(*mark.outputEnd).y += delta;
|
||||
}
|
||||
}
|
||||
_trimMarksOutsideBuffer();
|
||||
}
|
||||
|
||||
void TextBuffer::SetScrollbarData(ScrollbarData mark, til::CoordType y)
|
||||
// Method Description:
|
||||
// - Add a mark to our list of marks, and treat it as the active "prompt". For
|
||||
// the sake of shell integration, we need to know which mark represents the
|
||||
// current prompt/command/output. Internally, we'll always treat the _last_
|
||||
// mark in the list as the current prompt.
|
||||
// Arguments:
|
||||
// - m: the mark to add.
|
||||
void TextBuffer::StartPromptMark(const ScrollMark& m)
|
||||
{
|
||||
auto& row = GetMutableRowByOffset(y);
|
||||
row.SetScrollbarData(mark);
|
||||
_marks.push_back(m);
|
||||
}
|
||||
void TextBuffer::ManuallyMarkRowAsPrompt(til::CoordType y)
|
||||
// Method Description:
|
||||
// - Add a mark to our list of marks. Don't treat this as the active prompt.
|
||||
// This should be used for marks created by the UI or from other user input.
|
||||
// By inserting at the start of the list, we can separate out marks that were
|
||||
// generated by client programs vs ones created by the user.
|
||||
// Arguments:
|
||||
// - m: the mark to add.
|
||||
void TextBuffer::AddMark(const ScrollMark& m)
|
||||
{
|
||||
auto& row = GetMutableRowByOffset(y);
|
||||
for (auto& [attr, len] : row.Attributes().runs())
|
||||
_marks.insert(_marks.begin(), m);
|
||||
}
|
||||
|
||||
void TextBuffer::_trimMarksOutsideBuffer()
|
||||
{
|
||||
const til::CoordType height = _height;
|
||||
std::erase_if(_marks, [height](const auto& m) {
|
||||
return (m.start.y < 0) || (m.start.y >= height);
|
||||
});
|
||||
}
|
||||
|
||||
std::wstring_view TextBuffer::CurrentCommand() const
|
||||
{
|
||||
if (_marks.size() == 0)
|
||||
{
|
||||
attr.SetMarkAttributes(MarkKind::Prompt);
|
||||
return L"";
|
||||
}
|
||||
|
||||
const auto& curr{ _marks.back() };
|
||||
const auto& start{ curr.end };
|
||||
const auto& end{ GetCursor().GetPosition() };
|
||||
|
||||
const auto line = start.y;
|
||||
const auto& row = GetRowByOffset(line);
|
||||
return row.GetText(start.x, end.x);
|
||||
}
|
||||
|
||||
void TextBuffer::SetCurrentPromptEnd(const til::point pos) noexcept
|
||||
{
|
||||
if (_marks.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto& curr{ _marks.back() };
|
||||
curr.end = pos;
|
||||
}
|
||||
void TextBuffer::SetCurrentCommandEnd(const til::point pos) noexcept
|
||||
{
|
||||
if (_marks.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto& curr{ _marks.back() };
|
||||
curr.commandEnd = pos;
|
||||
}
|
||||
void TextBuffer::SetCurrentOutputEnd(const til::point pos, ::MarkCategory category) noexcept
|
||||
{
|
||||
if (_marks.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto& curr{ _marks.back() };
|
||||
curr.outputEnd = pos;
|
||||
curr.category = category;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ filling in the last row, and updating the screen.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "cursor.h"
|
||||
#include "Row.hpp"
|
||||
#include "TextAttribute.hpp"
|
||||
@@ -64,6 +66,41 @@ namespace Microsoft::Console::Render
|
||||
class Renderer;
|
||||
}
|
||||
|
||||
enum class MarkCategory
|
||||
{
|
||||
Prompt = 0,
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Success = 3,
|
||||
Info = 4
|
||||
};
|
||||
struct ScrollMark
|
||||
{
|
||||
std::optional<til::color> color;
|
||||
til::point start;
|
||||
til::point end; // exclusive
|
||||
std::optional<til::point> commandEnd;
|
||||
std::optional<til::point> outputEnd;
|
||||
|
||||
MarkCategory category{ MarkCategory::Info };
|
||||
// Other things we may want to think about in the future are listed in
|
||||
// GH#11000
|
||||
|
||||
bool HasCommand() const noexcept
|
||||
{
|
||||
return commandEnd.has_value() && *commandEnd != end;
|
||||
}
|
||||
bool HasOutput() const noexcept
|
||||
{
|
||||
return outputEnd.has_value() && *outputEnd != *commandEnd;
|
||||
}
|
||||
std::pair<til::point, til::point> GetExtent() const
|
||||
{
|
||||
til::point realEnd{ til::coalesce_value(outputEnd, commandEnd, end) };
|
||||
return std::make_pair(til::point{ start }, realEnd);
|
||||
}
|
||||
};
|
||||
|
||||
class TextBuffer final
|
||||
{
|
||||
public:
|
||||
@@ -105,8 +142,7 @@ public:
|
||||
til::point NavigateCursor(til::point position, til::CoordType distance) const;
|
||||
|
||||
// Text insertion functions
|
||||
void Replace(til::CoordType row, const TextAttribute& attributes, RowWriteState& state);
|
||||
void Insert(til::CoordType row, const TextAttribute& attributes, RowWriteState& state);
|
||||
void Write(til::CoordType row, const TextAttribute& attributes, RowWriteState& state);
|
||||
void FillRect(const til::rect& rect, const std::wstring_view& fill, const TextAttribute& attributes);
|
||||
|
||||
OutputCellIterator Write(const OutputCellIterator givenIt);
|
||||
@@ -167,8 +203,8 @@ public:
|
||||
|
||||
Microsoft::Console::Render::Renderer& GetRenderer() noexcept;
|
||||
|
||||
void NotifyPaintFrame() noexcept;
|
||||
void TriggerRedraw(const Microsoft::Console::Types::Viewport& viewport);
|
||||
void TriggerRedrawCursor(const til::point position);
|
||||
void TriggerRedrawAll();
|
||||
void TriggerScroll();
|
||||
void TriggerScroll(const til::point delta);
|
||||
@@ -196,7 +232,7 @@ public:
|
||||
|
||||
size_t SpanLength(const til::point coordStart, const til::point coordEnd) const;
|
||||
|
||||
std::wstring GetPlainText(til::point start, til::point end) const;
|
||||
std::wstring GetPlainText(const til::point& start, const til::point& end) const;
|
||||
|
||||
struct CopyRequest
|
||||
{
|
||||
@@ -296,19 +332,16 @@ public:
|
||||
std::vector<til::point_span> SearchText(const std::wstring_view& needle, bool caseInsensitive) const;
|
||||
std::vector<til::point_span> SearchText(const std::wstring_view& needle, bool caseInsensitive, til::CoordType rowBeg, til::CoordType rowEnd) const;
|
||||
|
||||
// Mark handling
|
||||
std::vector<ScrollMark> GetMarkRows() const;
|
||||
std::vector<MarkExtents> GetMarkExtents(size_t limit = SIZE_T_MAX) const;
|
||||
const std::vector<ScrollMark>& GetMarks() const noexcept;
|
||||
void ClearMarksInRange(const til::point start, const til::point end);
|
||||
void ClearAllMarks();
|
||||
std::wstring CurrentCommand() const;
|
||||
std::vector<std::wstring> Commands() const;
|
||||
void StartPrompt();
|
||||
bool StartCommand();
|
||||
bool StartOutput();
|
||||
void EndCurrentCommand(std::optional<unsigned int> error);
|
||||
void SetScrollbarData(ScrollbarData mark, til::CoordType y);
|
||||
void ManuallyMarkRowAsPrompt(til::CoordType y);
|
||||
void ClearAllMarks() noexcept;
|
||||
void ScrollMarks(const int delta);
|
||||
void StartPromptMark(const ScrollMark& m);
|
||||
void AddMark(const ScrollMark& m);
|
||||
void SetCurrentPromptEnd(const til::point pos) noexcept;
|
||||
void SetCurrentCommandEnd(const til::point pos) noexcept;
|
||||
void SetCurrentOutputEnd(const til::point pos, ::MarkCategory category) noexcept;
|
||||
std::wstring_view CurrentCommand() const;
|
||||
|
||||
private:
|
||||
void _reserve(til::size screenBufferSize, const TextAttribute& defaultAttributes);
|
||||
@@ -333,11 +366,7 @@ private:
|
||||
til::point _GetWordEndForAccessibility(const til::point target, const std::wstring_view wordDelimiters, const til::point limit) const;
|
||||
til::point _GetWordEndForSelection(const til::point target, const std::wstring_view wordDelimiters) const;
|
||||
void _PruneHyperlinks();
|
||||
|
||||
std::wstring _commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const;
|
||||
MarkExtents _scrollMarkExtentForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const;
|
||||
bool _createPromptMarkIfNeeded();
|
||||
|
||||
void _trimMarksOutsideBuffer();
|
||||
std::tuple<til::CoordType, til::CoordType, bool> _RowCopyHelper(const CopyRequest& req, const til::CoordType iRow, const ROW& row) const;
|
||||
|
||||
static void _AppendRTFText(std::string& contentBuilder, const std::wstring_view& text);
|
||||
@@ -410,6 +439,7 @@ private:
|
||||
uint64_t _lastMutationId = 0;
|
||||
|
||||
Cursor _cursor;
|
||||
std::vector<ScrollMark> _marks;
|
||||
bool _isActiveBuffer = false;
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
|
||||
@@ -41,7 +41,7 @@ class UTextAdapterTests
|
||||
RowWriteState state{
|
||||
.text = L"abc 𝒶𝒷𝒸 abc ネコちゃん",
|
||||
};
|
||||
buffer.Replace(0, TextAttribute{}, state);
|
||||
buffer.Write(0, TextAttribute{}, state);
|
||||
VERIFY_IS_TRUE(state.text.empty());
|
||||
|
||||
static constexpr auto s = [](til::CoordType beg, til::CoordType end) -> til::point_span {
|
||||
|
||||
@@ -381,15 +381,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
auto myCommand = terminalArgs.Commandline();
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
auto myCommand = myArgs.TerminalArgs().Commandline();
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg \"", myCommand);
|
||||
}
|
||||
{
|
||||
@@ -398,15 +397,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
auto myCommand = terminalArgs.Commandline();
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
auto myCommand = myArgs.TerminalArgs().Commandline();
|
||||
VERIFY_ARE_EQUAL(L"\" with spaces\"", myCommand);
|
||||
}
|
||||
}
|
||||
@@ -423,15 +421,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
auto myCommand = terminalArgs.Commandline();
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
auto myCommand = myArgs.TerminalArgs().Commandline();
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg ; with spaces\"", myCommand);
|
||||
}
|
||||
}
|
||||
@@ -471,15 +468,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -493,16 +489,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -516,16 +511,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"c:\\Foo", terminalArgs.StartingDirectory());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"c:\\Foo", myArgs.TerminalArgs().StartingDirectory());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -539,16 +533,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", terminalArgs.Commandline());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -562,17 +555,16 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
auto myCommand = terminalArgs.Commandline();
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
auto myCommand = myArgs.TerminalArgs().Commandline();
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\"", myCommand);
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -586,17 +578,16 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
auto myCommand = terminalArgs.Commandline();
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
auto myCommand = myArgs.TerminalArgs().Commandline();
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\" another-arg \"more spaces in this one\"", myCommand);
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -610,16 +601,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Windows PowerShell", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Windows PowerShell", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -633,15 +623,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", terminalArgs.Commandline());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -655,17 +644,16 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -681,16 +669,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.TabColor());
|
||||
VERIFY_ARE_EQUAL(til::color(terminalArgs.TabColor().Value()), expectedColor);
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_ARE_EQUAL(til::color(myArgs.TerminalArgs().TabColor().Value()), expectedColor);
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -706,16 +693,15 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_ARE_EQUAL(expectedScheme, terminalArgs.ColorScheme());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
VERIFY_ARE_EQUAL(expectedScheme, myArgs.TerminalArgs().ColorScheme());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,8 +732,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -767,8 +752,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -790,8 +774,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -812,8 +795,7 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitType::Duplicate, myArgs.SplitMode());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -833,17 +815,16 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -863,17 +844,16 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, myArgs.SplitDirection());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -893,17 +873,16 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -H", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", terminalArgs.Profile());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -H", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"1", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,14 +923,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -965,15 +943,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -987,15 +964,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"c:\\Foo", terminalArgs.StartingDirectory());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"c:\\Foo", myArgs.TerminalArgs().StartingDirectory());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1009,15 +985,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", myArgs.TerminalArgs().Commandline());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1031,15 +1006,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\"", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\"", myArgs.TerminalArgs().Commandline());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1495,38 +1469,32 @@ namespace TerminalAppLocalTests
|
||||
|
||||
VERIFY_ARE_EQUAL(2u, appArgs._startupActions.size());
|
||||
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(0);
|
||||
VERIFY_ARE_EQUAL(ShortcutAction::NewTab, actionAndArgs.Action());
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
}
|
||||
auto actionAndArgs = appArgs._startupActions.at(0);
|
||||
VERIFY_ARE_EQUAL(ShortcutAction::NewTab, actionAndArgs.Action());
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(1);
|
||||
VERIFY_ARE_EQUAL(ShortcutAction::NewTab, actionAndArgs.Action());
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane", terminalArgs.Commandline());
|
||||
}
|
||||
actionAndArgs = appArgs._startupActions.at(1);
|
||||
VERIFY_ARE_EQUAL(ShortcutAction::NewTab, actionAndArgs.Action());
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane", myArgs.TerminalArgs().Commandline());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1543,9 +1511,8 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane -H", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane -H", myArgs.TerminalArgs().Commandline());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1563,10 +1530,9 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", terminalArgs.StartingDirectory());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
}
|
||||
{ // two parsing terminators, new-tab command
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1580,10 +1546,9 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", terminalArgs.StartingDirectory());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
}
|
||||
{ // two parsing terminators, *no* command
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1597,10 +1562,9 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", terminalArgs.Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", terminalArgs.StartingDirectory());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1614,14 +1578,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
}
|
||||
|
||||
void CommandlineTest::TestMultipleCommandExecuteCommandlineAction()
|
||||
@@ -1635,14 +1598,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
}
|
||||
{
|
||||
auto actionAndArgs = actions.at(1);
|
||||
@@ -1650,14 +1612,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_NULL(terminalArgs.TabColor());
|
||||
VERIFY_IS_NULL(terminalArgs.ProfileIndex());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().TabColor());
|
||||
VERIFY_IS_NULL(myArgs.TerminalArgs().ProfileIndex());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1778,14 +1739,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ProfileIndex() == nullptr);
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ProfileIndex() == nullptr);
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
}
|
||||
{
|
||||
Log::Comment(NoThrowString().Format(L"Pass a launch mode and command line"));
|
||||
@@ -1803,14 +1763,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ProfileIndex() == nullptr);
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ProfileIndex() == nullptr);
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"powershell.exe", myArgs.TerminalArgs().Commandline());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1841,8 +1800,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.5f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1862,8 +1820,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1884,8 +1841,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(2);
|
||||
@@ -1895,8 +1851,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.5f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -1918,8 +1873,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(2);
|
||||
@@ -1929,8 +1883,7 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.7f, myArgs.SplitSize());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,13 +176,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -202,13 +201,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -222,13 +220,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -242,13 +239,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,13 +302,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -333,13 +328,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -354,13 +348,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -375,13 +368,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,13 +433,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${profile.name}", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -468,13 +459,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -489,13 +479,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1\"", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1\"", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -510,13 +499,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -704,13 +692,12 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = childActionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"ssh me@first.com", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"ssh me@first.com", realArgs.TerminalArgs().Commandline());
|
||||
|
||||
VERIFY_IS_FALSE(child.HasNestedCommands());
|
||||
}
|
||||
@@ -725,13 +712,12 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = childActionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_FALSE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"ssh me@second.com", terminalArgs.Commandline());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"ssh me@second.com", realArgs.TerminalArgs().Commandline());
|
||||
|
||||
VERIFY_IS_FALSE(child.HasNestedCommands());
|
||||
}
|
||||
@@ -832,13 +818,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -854,13 +839,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -876,13 +860,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -968,13 +951,12 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(command.HasNestedCommands());
|
||||
}
|
||||
@@ -1087,13 +1069,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1109,13 +1090,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1131,13 +1111,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(name, realArgs.TerminalArgs().Profile());
|
||||
|
||||
VERIFY_IS_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1266,13 +1245,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${scheme.name}", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"${scheme.name}", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -1296,13 +1274,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Campbell", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Campbell", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1317,13 +1294,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Campbell PowerShell", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Campbell PowerShell", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1338,13 +1314,12 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Vintage", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Vintage", realArgs.TerminalArgs().Profile());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1410,16 +1385,15 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NULL(realArgs.TerminalArgs().Elevate());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1433,16 +1407,15 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
|
||||
VERIFY_IS_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NULL(realArgs.TerminalArgs().Elevate());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1456,16 +1429,15 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NULL(realArgs.TerminalArgs().Elevate());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1480,17 +1452,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1504,17 +1475,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1528,17 +1498,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1553,17 +1522,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile0", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1576,17 +1544,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile1", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1600,17 +1567,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
auto terminalArgs{ realArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_IS_TRUE(terminalArgs.Commandline().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.TabTitle().empty());
|
||||
VERIFY_IS_FALSE(terminalArgs.Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
|
||||
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
|
||||
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Commandline().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().StartingDirectory().empty());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().TabTitle().empty());
|
||||
VERIFY_IS_FALSE(realArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"profile2", realArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_NOT_NULL(realArgs.TerminalArgs().Elevate());
|
||||
VERIFY_IS_TRUE(realArgs.TerminalArgs().Elevate().Value());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace winrt::TerminalApp::implementation
|
||||
auto originalOpacity{ control.BackgroundOpacity() };
|
||||
|
||||
// Apply the new opacity
|
||||
control.AdjustOpacity(args.Opacity() / 100.0f, args.Relative());
|
||||
control.AdjustOpacity(args.Opacity() / 100.0, args.Relative());
|
||||
|
||||
if (backup)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "TerminalPage.h"
|
||||
#include "ScratchpadContent.h"
|
||||
#include "TasksPaneContent.h"
|
||||
#include "../WinRTUtils/inc/WtExeUtils.h"
|
||||
#include "../../types/inc/utils.hpp"
|
||||
#include "Utils.h"
|
||||
@@ -239,32 +238,6 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// * Helper to try and get a ProfileIndex out of a NewTerminalArgs out of a
|
||||
// NewContentArgs. For the new tab and split pane action, we want to _not_
|
||||
// handle the event if an invalid profile index was passed.
|
||||
//
|
||||
// Return value:
|
||||
// * True if the args are NewTerminalArgs, and the profile index was out of bounds.
|
||||
// * False otherwise.
|
||||
static bool _shouldBailForInvalidProfileIndex(const CascadiaSettings& settings, const INewContentArgs& args)
|
||||
{
|
||||
if (!args)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (const auto& terminalArgs{ args.try_as<NewTerminalArgs>() })
|
||||
{
|
||||
if (const auto index = terminalArgs.ProfileIndex())
|
||||
{
|
||||
if (gsl::narrow<uint32_t>(index.Value()) >= settings.ActiveProfiles().Size())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TerminalPage::_HandleSplitPane(const IInspectable& sender,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
@@ -274,10 +247,16 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else if (const auto& realArgs = args.ActionArgs().try_as<SplitPaneArgs>())
|
||||
{
|
||||
if (_shouldBailForInvalidProfileIndex(_settings, realArgs.ContentArgs()))
|
||||
if (const auto& newTerminalArgs{ realArgs.TerminalArgs() })
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
if (const auto index = realArgs.TerminalArgs().ProfileIndex())
|
||||
{
|
||||
if (gsl::narrow<uint32_t>(index.Value()) >= _settings.ActiveProfiles().Size())
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto& duplicateFromTab{ realArgs.SplitMode() == SplitType::Duplicate ? _GetFocusedTab() : nullptr };
|
||||
@@ -287,8 +266,8 @@ namespace winrt::TerminalApp::implementation
|
||||
_SplitPane(terminalTab,
|
||||
realArgs.SplitDirection(),
|
||||
// This is safe, we're already filtering so the value is (0, 1)
|
||||
realArgs.SplitSize(),
|
||||
_MakePane(realArgs.ContentArgs(), duplicateFromTab));
|
||||
::base::saturated_cast<float>(realArgs.SplitSize()),
|
||||
_MakePane(realArgs.TerminalArgs(), duplicateFromTab));
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -466,13 +445,19 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else if (const auto& realArgs = args.ActionArgs().try_as<NewTabArgs>())
|
||||
{
|
||||
if (_shouldBailForInvalidProfileIndex(_settings, realArgs.ContentArgs()))
|
||||
if (const auto& newTerminalArgs{ realArgs.TerminalArgs() })
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
if (const auto index = newTerminalArgs.ProfileIndex())
|
||||
{
|
||||
if (gsl::narrow<uint32_t>(index.Value()) >= _settings.ActiveProfiles().Size())
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_IF_FAILED(_OpenNewTab(realArgs.ContentArgs()));
|
||||
LOG_IF_FAILED(_OpenNewTab(realArgs.TerminalArgs()));
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -884,23 +869,8 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Important: Don't take the param by reference, since we'll be doing work
|
||||
// on another thread.
|
||||
fire_and_forget TerminalPage::_OpenNewWindow(const INewContentArgs newContentArgs)
|
||||
fire_and_forget TerminalPage::_OpenNewWindow(const NewTerminalArgs newTerminalArgs)
|
||||
{
|
||||
auto terminalArgs{ newContentArgs.try_as<NewTerminalArgs>() };
|
||||
|
||||
// Do nothing for non-terminal panes.
|
||||
//
|
||||
// Theoretically, we could define a `IHasCommandline` interface, and
|
||||
// stick `ToCommandline` on that interface, for any kind of pane that
|
||||
// wants to be convertable to a wt commandline.
|
||||
//
|
||||
// Another idea we're thinking about is just `wt do {literal json for an
|
||||
// action}`, which might be less leaky
|
||||
if (terminalArgs == nullptr)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
|
||||
// Hop to the BG thread
|
||||
co_await winrt::resume_background();
|
||||
|
||||
@@ -913,7 +883,8 @@ namespace winrt::TerminalApp::implementation
|
||||
// `-w -1` will ensure a new window is created.
|
||||
winrt::hstring cmdline{
|
||||
fmt::format(L"-w -1 new-tab {}",
|
||||
terminalArgs.ToCommandline().c_str())
|
||||
newTerminalArgs ? newTerminalArgs.ToCommandline().c_str() :
|
||||
L"")
|
||||
};
|
||||
|
||||
// Build the args to ShellExecuteEx. We need to use ShellExecuteEx so we
|
||||
@@ -938,32 +909,29 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleNewWindow(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& actionArgs)
|
||||
{
|
||||
INewContentArgs newContentArgs{ nullptr };
|
||||
NewTerminalArgs newTerminalArgs{ nullptr };
|
||||
// If the caller provided NewTerminalArgs, then try to use those
|
||||
if (actionArgs)
|
||||
{
|
||||
if (const auto& realArgs = actionArgs.ActionArgs().try_as<NewWindowArgs>())
|
||||
{
|
||||
newContentArgs = realArgs.ContentArgs();
|
||||
newTerminalArgs = realArgs.TerminalArgs();
|
||||
}
|
||||
}
|
||||
// Otherwise, if no NewTerminalArgs were provided, then just use a
|
||||
// default-constructed one. The default-constructed one implies that
|
||||
// nothing about the launch should be modified (just use the default
|
||||
// profile).
|
||||
if (!newContentArgs)
|
||||
if (!newTerminalArgs)
|
||||
{
|
||||
newContentArgs = NewTerminalArgs{};
|
||||
newTerminalArgs = NewTerminalArgs();
|
||||
}
|
||||
|
||||
if (const auto& terminalArgs{ newContentArgs.try_as<NewTerminalArgs>() })
|
||||
{
|
||||
const auto profile{ _settings.GetProfileForArgs(terminalArgs) };
|
||||
terminalArgs.Profile(::Microsoft::Console::Utils::GuidToString(profile.Guid()));
|
||||
}
|
||||
const auto profile{ _settings.GetProfileForArgs(newTerminalArgs) };
|
||||
|
||||
// Manually fill in the evaluated profile.
|
||||
_OpenNewWindow(newContentArgs);
|
||||
newTerminalArgs.Profile(::Microsoft::Console::Utils::GuidToString(profile.Guid()));
|
||||
_OpenNewWindow(newTerminalArgs);
|
||||
actionArgs.Handled(true);
|
||||
}
|
||||
|
||||
@@ -1248,7 +1216,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.0f, realArgs.Relative());
|
||||
control.AdjustOpacity(realArgs.Opacity() / 100.0, realArgs.Relative());
|
||||
});
|
||||
args.Handled(res);
|
||||
}
|
||||
@@ -1450,7 +1418,7 @@ namespace winrt::TerminalApp::implementation
|
||||
args.Handled(true);
|
||||
}
|
||||
|
||||
void TerminalPage::_HandleOpenScratchpad(const IInspectable& sender,
|
||||
void TerminalPage::_HandleOpenScratchpad(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
if (Feature_ScratchpadPane::IsEnabled())
|
||||
@@ -1463,7 +1431,7 @@ namespace winrt::TerminalApp::implementation
|
||||
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
|
||||
const auto resultPane = std::make_shared<Pane>(*scratchPane);
|
||||
_SplitPane(_senderOrFocusedTab(sender), SplitDirection::Automatic, 0.5f, resultPane);
|
||||
_SplitPane(_GetFocusedTabImpl(), SplitDirection::Automatic, 0.5f, resultPane);
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -1474,25 +1442,4 @@ namespace winrt::TerminalApp::implementation
|
||||
_ShowAboutDialog();
|
||||
args.Handled(true);
|
||||
}
|
||||
|
||||
void TerminalPage::_HandleOpenTasksPane(const IInspectable& sender,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
if (Feature_ScratchpadPane::IsEnabled())
|
||||
{
|
||||
const auto& scratchPane{ winrt::make_self<TasksPaneContent>() };
|
||||
scratchPane->UpdateSettings(_settings);
|
||||
// This is maybe a little wacky - add our key event handler to the pane
|
||||
// we made. So that we can get actions for keys that the content didn't
|
||||
// handle.
|
||||
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
|
||||
scratchPane->DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });
|
||||
|
||||
const auto resultPane = std::make_shared<Pane>(*scratchPane);
|
||||
_SplitPane(_senderOrFocusedTab(sender), SplitDirection::Automatic, 0.5f, resultPane);
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
struct BasicPaneEvents
|
||||
{
|
||||
til::typed_event<> ConnectionStateChanged;
|
||||
til::typed_event<IPaneContent> CloseRequested;
|
||||
til::typed_event<IPaneContent, winrt::TerminalApp::BellEventArgs> BellRequested;
|
||||
til::typed_event<IPaneContent> TitleChanged;
|
||||
til::typed_event<IPaneContent> TabColorChanged;
|
||||
til::typed_event<IPaneContent> TaskbarProgressChanged;
|
||||
til::typed_event<IPaneContent> ReadOnlyChanged;
|
||||
til::typed_event<IPaneContent> FocusRequested;
|
||||
|
||||
til::typed_event<winrt::Windows::Foundation::IInspectable, Microsoft::Terminal::Settings::Model::Command> DispatchCommandRequested;
|
||||
};
|
||||
}
|
||||
@@ -21,22 +21,11 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
// This class is a wrapper of PaletteItem, that is used as an item of a filterable list in CommandPalette.
|
||||
// It manages a highlighted text that is computed by matching search filter characters to item name
|
||||
FilteredCommand::FilteredCommand(const winrt::TerminalApp::PaletteItem& item)
|
||||
FilteredCommand::FilteredCommand(const winrt::TerminalApp::PaletteItem& item) :
|
||||
_Item(item),
|
||||
_Filter(L""),
|
||||
_Weight(0)
|
||||
{
|
||||
// Actually implement the ctor in _constructFilteredCommand
|
||||
_constructFilteredCommand(item);
|
||||
}
|
||||
|
||||
// We need to actually implement the ctor in a separate helper. This is
|
||||
// because we have a FilteredTask class which derives from FilteredCommand.
|
||||
// HOWEVER, for cppwinrt ~ r e a s o n s ~, it doesn't actually derive from
|
||||
// FilteredCommand directly, so we can't just use the FilteredCommand ctor
|
||||
// directly in the base class.
|
||||
void FilteredCommand::_constructFilteredCommand(const winrt::TerminalApp::PaletteItem& item)
|
||||
{
|
||||
_Item = item;
|
||||
_Filter = L"";
|
||||
_Weight = 0;
|
||||
_HighlightedName = _computeHighlightedName();
|
||||
|
||||
// Recompute the highlighted name if the item name changes
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace winrt::TerminalApp::implementation
|
||||
FilteredCommand() = default;
|
||||
FilteredCommand(const winrt::TerminalApp::PaletteItem& item);
|
||||
|
||||
virtual void UpdateFilter(const winrt::hstring& filter);
|
||||
void UpdateFilter(const winrt::hstring& filter);
|
||||
|
||||
static int Compare(const winrt::TerminalApp::FilteredCommand& first, const winrt::TerminalApp::FilteredCommand& second);
|
||||
|
||||
@@ -29,9 +29,6 @@ namespace winrt::TerminalApp::implementation
|
||||
WINRT_OBSERVABLE_PROPERTY(winrt::TerminalApp::HighlightedText, HighlightedName, PropertyChanged.raise);
|
||||
WINRT_OBSERVABLE_PROPERTY(int, Weight, PropertyChanged.raise);
|
||||
|
||||
protected:
|
||||
void _constructFilteredCommand(const winrt::TerminalApp::PaletteItem& item);
|
||||
|
||||
private:
|
||||
winrt::TerminalApp::HighlightedText _computeHighlightedName();
|
||||
int _computeWeight();
|
||||
|
||||
@@ -6,7 +6,7 @@ import "HighlightedTextControl.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
[default_interface] unsealed runtimeclass FilteredCommand : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
[default_interface] runtimeclass FilteredCommand : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
{
|
||||
FilteredCommand();
|
||||
FilteredCommand(PaletteItem item);
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace TerminalApp
|
||||
interface IPaneContent
|
||||
{
|
||||
Windows.UI.Xaml.FrameworkElement GetRoot();
|
||||
void UpdateSettings(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
|
||||
|
||||
Windows.Foundation.Size MinimumSize { get; };
|
||||
|
||||
@@ -27,11 +26,8 @@ namespace TerminalApp
|
||||
UInt64 TaskbarState { get; };
|
||||
UInt64 TaskbarProgress { get; };
|
||||
Boolean ReadOnly { get; };
|
||||
String Icon { get; };
|
||||
Windows.Foundation.IReference<Windows.UI.Color> TabColor { get; };
|
||||
Windows.UI.Xaml.Media.Brush BackgroundBrush { get; };
|
||||
|
||||
Microsoft.Terminal.Settings.Model.INewContentArgs GetNewTerminalArgs(BuildStartupKind kind);
|
||||
Microsoft.Terminal.Settings.Model.NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind);
|
||||
|
||||
void Focus(Windows.UI.Xaml.FocusState reason);
|
||||
|
||||
|
||||
@@ -116,9 +116,6 @@ 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);
|
||||
|
||||
@@ -127,7 +124,9 @@ 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);
|
||||
|
||||
|
||||
@@ -47,8 +47,14 @@ 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, &Pane::_borderTappedHandler });
|
||||
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
_borderFirst.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderSecond.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
}
|
||||
|
||||
Pane::Pane(std::shared_ptr<Pane> first,
|
||||
@@ -82,13 +88,19 @@ 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, &Pane::_borderTappedHandler });
|
||||
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
_borderFirst.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderSecond.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
}
|
||||
|
||||
// Extract the terminal settings from the current (leaf) pane's control
|
||||
// to be used to create an equivalent control
|
||||
INewContentArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
|
||||
NewTerminalArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
|
||||
{
|
||||
// Leaves are the only things that have controls
|
||||
assert(_IsLeaf());
|
||||
@@ -139,7 +151,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() ? 0.5f : 1.0f - _desiredSplitPosition);
|
||||
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? .5 : 1. - _desiredSplitPosition);
|
||||
SplitPaneArgs args{ SplitType::Manual, splitDirection, splitSize, terminalArgs };
|
||||
actionAndArgs.Args(args);
|
||||
|
||||
@@ -1063,29 +1075,6 @@ TermControl Pane::GetLastFocusedTerminalControl()
|
||||
return GetTerminalControl();
|
||||
}
|
||||
|
||||
IPaneContent Pane::GetLastFocusedContent()
|
||||
{
|
||||
if (!_IsLeaf())
|
||||
{
|
||||
if (_lastActive)
|
||||
{
|
||||
auto pane = shared_from_this();
|
||||
while (const auto p = pane->_parentChildPath.lock())
|
||||
{
|
||||
if (p->_IsLeaf())
|
||||
{
|
||||
return p->_content;
|
||||
}
|
||||
pane = p;
|
||||
}
|
||||
// We didn't find our child somehow, they might have closed under us.
|
||||
}
|
||||
return _firstChild->GetLastFocusedContent();
|
||||
}
|
||||
|
||||
return _content;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Gets the TermControl of this pane. If this Pane is not a leaf this will
|
||||
// return the nullptr;
|
||||
@@ -1225,19 +1214,8 @@ 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() })
|
||||
{
|
||||
lastContent.Focus(FocusState::Programmatic);
|
||||
}
|
||||
_content.Focus(FocusState::Programmatic);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1276,11 +1254,20 @@ void Pane::_FocusFirstChild()
|
||||
}
|
||||
}
|
||||
|
||||
void Pane::UpdateSettings(const CascadiaSettings& settings)
|
||||
// Method Description:
|
||||
// - Updates the settings of this pane, presuming that it is a leaf.
|
||||
// Arguments:
|
||||
// - settings: The new TerminalSettings to apply to any matching controls
|
||||
// - profile: The profile from which these settings originated.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Pane::UpdateSettings(const TerminalSettingsCreateResult& settings, const Profile& profile)
|
||||
{
|
||||
if (_content)
|
||||
assert(_IsLeaf());
|
||||
|
||||
if (const auto& terminalPane{ _getTerminalContent() })
|
||||
{
|
||||
_content.UpdateSettings(settings);
|
||||
return terminalPane.UpdateSettings(settings, profile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1591,12 +1578,12 @@ void Pane::_CloseChildRoutine(const bool closeFirst)
|
||||
const auto splitWidth = _splitState == SplitState::Vertical;
|
||||
|
||||
Size removedOriginalSize{
|
||||
static_cast<float>(removedChild->_root.ActualWidth()),
|
||||
static_cast<float>(removedChild->_root.ActualHeight())
|
||||
::base::saturated_cast<float>(removedChild->_root.ActualWidth()),
|
||||
::base::saturated_cast<float>(removedChild->_root.ActualHeight())
|
||||
};
|
||||
Size remainingOriginalSize{
|
||||
static_cast<float>(remainingChild->_root.ActualWidth()),
|
||||
static_cast<float>(remainingChild->_root.ActualHeight())
|
||||
::base::saturated_cast<float>(remainingChild->_root.ActualWidth()),
|
||||
::base::saturated_cast<float>(remainingChild->_root.ActualHeight())
|
||||
};
|
||||
|
||||
// Remove both children from the grid
|
||||
@@ -1898,7 +1885,7 @@ void Pane::_SetupEntranceAnimation()
|
||||
// looks bad.
|
||||
_secondChild->_root.Background(_themeResources.unfocusedBorderBrush);
|
||||
|
||||
const auto [firstSize, secondSize] = _CalcChildrenSizes(static_cast<float>(totalSize));
|
||||
const auto [firstSize, secondSize] = _CalcChildrenSizes(::base::saturated_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)
|
||||
@@ -1906,7 +1893,7 @@ void Pane::_SetupEntranceAnimation()
|
||||
auto child = isFirstChild ? _firstChild : _secondChild;
|
||||
auto childGrid = child->_root;
|
||||
// If we are splitting a parent pane this may be null
|
||||
auto control = child->_content ? child->_content.GetRoot() : nullptr;
|
||||
auto control = child->_content.GetRoot();
|
||||
// Build up our animation:
|
||||
// * it'll take as long as our duration (200ms)
|
||||
// * it'll change the value of our property from 0 to secondSize
|
||||
@@ -3017,9 +3004,3 @@ 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);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
|
||||
std::shared_ptr<Pane> GetActivePane();
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetLastFocusedTerminalControl();
|
||||
winrt::TerminalApp::IPaneContent GetLastFocusedContent();
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetTerminalControl() const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::Profile GetFocusedProfile();
|
||||
bool IsConnectionClosed() const;
|
||||
@@ -106,9 +105,10 @@ public:
|
||||
uint32_t panesCreated;
|
||||
};
|
||||
BuildStartupState BuildStartupActions(uint32_t currentId, uint32_t nextId, winrt::TerminalApp::BuildStartupKind kind);
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetTerminalArgsForPane(winrt::TerminalApp::BuildStartupKind kind) const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetTerminalArgsForPane(winrt::TerminalApp::BuildStartupKind kind) const;
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult& settings,
|
||||
const winrt::Microsoft::Terminal::Settings::Model::Profile& profile);
|
||||
bool ResizePane(const winrt::Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
|
||||
std::shared_ptr<Pane> NavigateDirection(const std::shared_ptr<Pane> sourcePane,
|
||||
const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction,
|
||||
@@ -314,8 +314,6 @@ 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.
|
||||
|
||||
@@ -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>Tabs nach rechts schließen</value>
|
||||
<value>Registerkarten auf der rechten Seite schließen</value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Andere Registerkarten schließen</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Tab schließen</value>
|
||||
<value>Registerkarte 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>Bereich teilen</value>
|
||||
<value>Geteilter Bereich</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Websuche</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Registerkartenfarbe ändern</value>
|
||||
<value>Farbe...</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 kopieren</value>
|
||||
<value>Registerkarte duplizieren</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>Hinweise von Drittanbietern</value>
|
||||
<value>Drittanbieter-Hinweise</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>Unformatierter Text</value>
|
||||
<value>Nur 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>
|
||||
|
||||
@@ -191,43 +191,43 @@
|
||||
<value>Multiple panes</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
<value>Close...</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Close tabs to the right</value>
|
||||
<value>Close Tabs to the Right</value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Close other tabs</value>
|
||||
<value>Close Other Tabs</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Close tab</value>
|
||||
<value>Close Tab</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Close pane</value>
|
||||
<value>Close Pane</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Split tab</value>
|
||||
<value>Split Tab</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Split pane</value>
|
||||
<value>Split Pane</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Web search</value>
|
||||
<value>Web Search</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Change tab color</value>
|
||||
<value>Color...</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Custom</value>
|
||||
<value>Custom...</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Reset</value>
|
||||
</data>
|
||||
<data name="RenameTabText" xml:space="preserve">
|
||||
<value>Rename tab</value>
|
||||
<value>Rename Tab</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Duplicate tab</value>
|
||||
<value>Duplicate Tab</value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>Found a profile with an invalid "backgroundImage". Defaulting that profile to have no background image. Make sure that when setting a "backgroundImage", the value is a valid file path to an image.</value>
|
||||
@@ -462,7 +462,7 @@
|
||||
<value>About</value>
|
||||
</data>
|
||||
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Send feedback</value>
|
||||
<value>Send Feedback</value>
|
||||
</data>
|
||||
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>OK</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>Getting started</value>
|
||||
<value>Getting Started</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>Source code</value>
|
||||
<value>Source Code</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>Release notes</value>
|
||||
<value>Release Notes</value>
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Privacy policy</value>
|
||||
<value>Privacy Policy</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Third-Party notices</value>
|
||||
<value>Third-Party Notices</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>Failed parsing command line:</value>
|
||||
</data>
|
||||
<data name="CommandPaletteControlName" xml:space="preserve">
|
||||
<value>Command palette</value>
|
||||
<value>Command Palette</value>
|
||||
</data>
|
||||
<data name="TabSwitcherControlName" xml:space="preserve">
|
||||
<value>Tab switcher</value>
|
||||
<value>Tab Switcher</value>
|
||||
</data>
|
||||
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
|
||||
<value>Type a tab name...</value>
|
||||
@@ -731,10 +731,10 @@
|
||||
<value>Maximize</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Restore down</value>
|
||||
<value>Restore Down</value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Command palette</value>
|
||||
<value>Command Palette</value>
|
||||
</data>
|
||||
<data name="NotificationIconFocusTerminal" xml:space="preserve">
|
||||
<value>Focus Terminal</value>
|
||||
@@ -754,7 +754,7 @@
|
||||
<value>Split the window and start in given directory</value>
|
||||
</data>
|
||||
<data name="ExportTabText" xml:space="preserve">
|
||||
<value>Export text</value>
|
||||
<value>Export Text</value>
|
||||
</data>
|
||||
<data name="ExportFailure" xml:space="preserve">
|
||||
<value>Failed to export terminal content</value>
|
||||
@@ -766,7 +766,7 @@
|
||||
<value>Find</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Plain text</value>
|
||||
<value>Plain Text</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>Termination behavior can be configured in advanced profile settings.</value>
|
||||
@@ -775,7 +775,7 @@
|
||||
<value>Don't show again</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>This Terminal window is running as administrator</value>
|
||||
<value>This Terminal window is running as Admin</value>
|
||||
</data>
|
||||
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
|
||||
<value>Suggestions found: {0}</value>
|
||||
@@ -835,10 +835,10 @@
|
||||
<value>Close this tab</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Empty</value>
|
||||
<value>Empty...</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Close pane</value>
|
||||
<value>Close Pane</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Close the active pane if multiple panes are present</value>
|
||||
@@ -848,13 +848,13 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Move tab to new window</value>
|
||||
<value>Move Tab to New Window</value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Moves tab to a new window </value>
|
||||
</data>
|
||||
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
|
||||
<value>Run as administrator</value>
|
||||
<value>Run as Administrator</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,20 +893,9 @@
|
||||
<value>If set, the command will be appended to the profile's default command instead of replacing it.</value>
|
||||
</data>
|
||||
<data name="RestartConnectionText" xml:space="preserve">
|
||||
<value>Restart connection</value>
|
||||
<value>Restart Connection</value>
|
||||
</data>
|
||||
<data name="RestartConnectionToolTip" xml:space="preserve">
|
||||
<value>Restart the active pane connection</value>
|
||||
</data>
|
||||
<data name="SnippetPaneTitle.Text" xml:space="preserve">
|
||||
<value>Snippets</value>
|
||||
<comment>Header for a page that includes small snippets of text for the user to enter</comment>
|
||||
</data>
|
||||
<data name="SnippetsFilterBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Filter snippets...</value>
|
||||
<comment>Placeholder text for a text box to filter snippets (on the same page as the 'SnippetPaneTitle')</comment>
|
||||
</data>
|
||||
<data name="SnippetPlayButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Input this command</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -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 pestaña</value>
|
||||
<value>Dividir tabla</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>Cambiar color de pestaña</value>
|
||||
<value>Color...</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personalizar</value>
|
||||
<value>Configuración personalizada...</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>Introducción</value>
|
||||
<value>Tareas iniciales</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>Política de privacidad</value>
|
||||
<value>Directiva 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</value>
|
||||
<value>Restaurar a tamaño normal</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 pestaña a nueva ventana</value>
|
||||
<value>Mover la Pestaña a una Nueva ventana</value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Mueve la pestaña a una nueva ventana </value>
|
||||
|
||||
@@ -187,13 +187,13 @@
|
||||
<value>Volets multiples</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Fermer</value>
|
||||
<value>Fermez...</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>Fermer les autres onglets</value>
|
||||
<value>Fermez les Autres onglets</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Fermer l’onglet</value>
|
||||
@@ -205,16 +205,16 @@
|
||||
<value>Fractionner l’onglet</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>Modifier la couleur de l’onglet</value>
|
||||
<value>Couleur...</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personnalisé</value>
|
||||
<value>Personnalisée...</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>Bien démarrer</value>
|
||||
<value>Prise en main</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>Charte de confidentialité</value>
|
||||
<value>Politique de confidentialité</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Mentions tierces</value>
|
||||
<value>Avis de tiers</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>Restaurer</value>
|
||||
<value>Niveau inférieur</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 s’exécute en tant qu’administrateur</value>
|
||||
<value>Cette fenêtre de terminal s’exécute en tant qu’Administrateur</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 temps qu'administrateur (restreint)</value>
|
||||
<value>Exécuter en tant qu'administrateur</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">
|
||||
|
||||
@@ -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 il riquadro</value>
|
||||
<value>Chiudi 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>Cambia colore scheda</value>
|
||||
<value>Colore...</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>Introduzione</value>
|
||||
<value>Attività iniziali</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>Comunicazioni di terze parti</value>
|
||||
<value>Informative 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 in basso</value>
|
||||
<value>Ripristina visualizzazione normale</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 il riquadro</value>
|
||||
<value>Chiudi riquadro</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Chiude il riquadro attivo se sono presenti più riquadri</value>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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 o painel</value>
|
||||
<value>Fechar Painel</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Guia Dividir</value>
|
||||
<value>Dividir Guia</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Dividir painel</value>
|
||||
<value>Painel dividido</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>Alterar cor da guia</value>
|
||||
<value>Cor...</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personalizado</value>
|
||||
<value>Personalizados...</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>Introdução</value>
|
||||
<value>Ponto de Partida</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>Alternador de guias</value>
|
||||
<value>Seletor 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 sem formatação</value>
|
||||
<value>Texto Simples</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á sendo executada como administrador</value>
|
||||
<value>Esta janela do Terminal está funcionando 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 o painel</value>
|
||||
<value>Fechar 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>
|
||||
|
||||
@@ -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>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </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>
|
||||
|
||||
@@ -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>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </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>
|
||||
|
||||
@@ -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>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>网络搜索</value>
|
||||
<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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>分割索引標籤</value>
|
||||
<value>分割 Tab</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>分割窗格</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>網頁搜尋</value>
|
||||
<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>
|
||||
@@ -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>
|
||||
|
||||
@@ -26,11 +26,6 @@ namespace winrt::TerminalApp::implementation
|
||||
_root.Children().Append(_box);
|
||||
}
|
||||
|
||||
void ScratchpadContent::UpdateSettings(const CascadiaSettings& /*settings*/)
|
||||
{
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement ScratchpadContent::GetRoot()
|
||||
{
|
||||
return _root;
|
||||
@@ -48,19 +43,8 @@ namespace winrt::TerminalApp::implementation
|
||||
CloseRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
INewContentArgs ScratchpadContent::GetNewTerminalArgs(const BuildStartupKind /* kind */) const
|
||||
NewTerminalArgs ScratchpadContent::GetNewTerminalArgs(const BuildStartupKind /* kind */) const
|
||||
{
|
||||
return BaseContentArgs(L"scratchpad");
|
||||
}
|
||||
|
||||
winrt::hstring ScratchpadContent::Icon() const
|
||||
{
|
||||
static constexpr std::wstring_view glyph{ L"\xe70b" }; // QuickNote
|
||||
return winrt::hstring{ glyph };
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush ScratchpadContent::BackgroundBrush()
|
||||
{
|
||||
return _root.Background();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,35 @@
|
||||
|
||||
#pragma once
|
||||
#include "winrt/TerminalApp.h"
|
||||
#include "BasicPaneEvents.h"
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
class ScratchpadContent : public winrt::implements<ScratchpadContent, IPaneContent>, public BasicPaneEvents
|
||||
class ScratchpadContent : public winrt::implements<ScratchpadContent, IPaneContent>
|
||||
{
|
||||
public:
|
||||
ScratchpadContent();
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
|
||||
winrt::Windows::Foundation::Size MinimumSize();
|
||||
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
|
||||
void Close();
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
|
||||
winrt::hstring Title() { return L"Scratchpad"; }
|
||||
uint64_t TaskbarState() { return 0; }
|
||||
uint64_t TaskbarProgress() { return 0; }
|
||||
bool ReadOnly() { return false; }
|
||||
winrt::hstring Icon() const;
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> TabColor() const noexcept { return nullptr; }
|
||||
winrt::Windows::UI::Xaml::Media::Brush BackgroundBrush();
|
||||
|
||||
// See BasicPaneEvents for most generic event definitions
|
||||
|
||||
til::typed_event<> ConnectionStateChanged;
|
||||
til::typed_event<IPaneContent> CloseRequested;
|
||||
til::typed_event<IPaneContent, winrt::TerminalApp::BellEventArgs> BellRequested;
|
||||
til::typed_event<IPaneContent> TitleChanged;
|
||||
til::typed_event<IPaneContent> TabColorChanged;
|
||||
til::typed_event<IPaneContent> TaskbarProgressChanged;
|
||||
til::typed_event<IPaneContent> ReadOnlyChanged;
|
||||
til::typed_event<IPaneContent> FocusRequested;
|
||||
|
||||
private:
|
||||
winrt::Windows::UI::Xaml::Controls::Grid _root{ nullptr };
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include "SettingsPaneContent.h"
|
||||
#include "Utils.h"
|
||||
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
|
||||
#define ASSERT_UI_THREAD() assert(_sui.Dispatcher().HasThreadAccess())
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
SettingsPaneContent::SettingsPaneContent(CascadiaSettings settings)
|
||||
{
|
||||
_sui = winrt::Microsoft::Terminal::Settings::Editor::MainPage{ settings };
|
||||
|
||||
// Stash away the current requested theme of the app. We'll need that in
|
||||
// _BackgroundBrush() to do a theme-aware resource lookup
|
||||
_requestedTheme = settings.GlobalSettings().CurrentTheme().RequestedTheme();
|
||||
}
|
||||
|
||||
void SettingsPaneContent::UpdateSettings(const CascadiaSettings& settings)
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
_sui.UpdateSettings(settings);
|
||||
|
||||
_requestedTheme = settings.GlobalSettings().CurrentTheme().RequestedTheme();
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement SettingsPaneContent::GetRoot()
|
||||
{
|
||||
return _sui;
|
||||
}
|
||||
winrt::Windows::Foundation::Size SettingsPaneContent::MinimumSize()
|
||||
{
|
||||
return { 1, 1 };
|
||||
}
|
||||
void SettingsPaneContent::Focus(winrt::Windows::UI::Xaml::FocusState reason)
|
||||
{
|
||||
if (reason != FocusState::Unfocused)
|
||||
{
|
||||
_sui.as<Controls::Page>().Focus(reason);
|
||||
}
|
||||
}
|
||||
void SettingsPaneContent::Close()
|
||||
{
|
||||
CloseRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
INewContentArgs SettingsPaneContent::GetNewTerminalArgs(const BuildStartupKind /*kind*/) const
|
||||
{
|
||||
return BaseContentArgs(L"settings");
|
||||
}
|
||||
|
||||
winrt::hstring SettingsPaneContent::Icon() const
|
||||
{
|
||||
// This is the Setting icon (looks like a gear)
|
||||
static constexpr std::wstring_view glyph{ L"\xE713" };
|
||||
return winrt::hstring{ glyph };
|
||||
}
|
||||
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> SettingsPaneContent::TabColor() const noexcept
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush SettingsPaneContent::BackgroundBrush()
|
||||
{
|
||||
// Look up the color we should use for the settings tab item from our
|
||||
// resources. This should only be used for when "terminalBackground" is
|
||||
// requested.
|
||||
static const auto key = winrt::box_value(L"SettingsUiTabBrush");
|
||||
// You can't just do a Application::Current().Resources().TryLookup
|
||||
// lookup, cause the app theme never changes! Do the hacky version
|
||||
// instead.
|
||||
return ThemeLookup(Application::Current().Resources(), _requestedTheme, key).try_as<winrt::Windows::UI::Xaml::Media::Brush>();
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
#include "winrt/TerminalApp.h"
|
||||
#include <LibraryResources.h>
|
||||
#include "BasicPaneEvents.h"
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
class SettingsPaneContent : public winrt::implements<SettingsPaneContent, IPaneContent>, public BasicPaneEvents
|
||||
{
|
||||
public:
|
||||
SettingsPaneContent(winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings settings);
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
|
||||
winrt::Microsoft::Terminal::Settings::Editor::MainPage SettingsUI() { return _sui; }
|
||||
|
||||
winrt::Windows::Foundation::Size MinimumSize();
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
|
||||
void Close();
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetNewTerminalArgs(const BuildStartupKind kind) const;
|
||||
|
||||
winrt::hstring Title() { return RS_(L"SettingsTab"); }
|
||||
uint64_t TaskbarState() { return 0; }
|
||||
uint64_t TaskbarProgress() { return 0; }
|
||||
bool ReadOnly() { return false; }
|
||||
winrt::hstring Icon() const;
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> TabColor() const noexcept;
|
||||
winrt::Windows::UI::Xaml::Media::Brush BackgroundBrush();
|
||||
|
||||
// See BasicPaneEvents for most generic event definitions
|
||||
|
||||
private:
|
||||
winrt::Microsoft::Terminal::Settings::Editor::MainPage _sui{ nullptr };
|
||||
winrt::Windows::UI::Xaml::ElementTheme _requestedTheme;
|
||||
};
|
||||
}
|
||||
131
src/cascadia/TerminalApp/SettingsTab.cpp
Normal file
131
src/cascadia/TerminalApp/SettingsTab.cpp
Normal file
@@ -0,0 +1,131 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include <LibraryResources.h>
|
||||
#include "SettingsTab.h"
|
||||
#include "SettingsTab.g.cpp"
|
||||
#include "Utils.h"
|
||||
|
||||
using namespace winrt;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
using namespace winrt::Microsoft::Terminal::Control;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Editor;
|
||||
using namespace winrt::Windows::System;
|
||||
|
||||
namespace winrt
|
||||
{
|
||||
namespace MUX = Microsoft::UI::Xaml;
|
||||
namespace WUX = Windows::UI::Xaml;
|
||||
}
|
||||
|
||||
#define ASSERT_UI_THREAD() assert(TabViewItem().Dispatcher().HasThreadAccess())
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
SettingsTab::SettingsTab(MainPage settingsUI,
|
||||
winrt::Windows::UI::Xaml::ElementTheme requestedTheme)
|
||||
{
|
||||
Content(settingsUI);
|
||||
_requestedTheme = requestedTheme;
|
||||
|
||||
_MakeTabViewItem();
|
||||
_CreateContextMenu();
|
||||
_CreateIcon();
|
||||
}
|
||||
|
||||
void SettingsTab::UpdateSettings(CascadiaSettings settings)
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
auto settingsUI{ Content().as<MainPage>() };
|
||||
settingsUI.UpdateSettings(settings);
|
||||
|
||||
// Stash away the current requested theme of the app. We'll need that in
|
||||
// _BackgroundBrush() to do a theme-aware resource lookup
|
||||
_requestedTheme = settings.GlobalSettings().CurrentTheme().RequestedTheme();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Creates a list of actions that can be run to recreate the state of this tab
|
||||
// Arguments:
|
||||
// - asContent: unused. There's nothing different we need to do when
|
||||
// serializing the settings tab for moving to another window. If we ever
|
||||
// really want to support opening the SUI to a specific page, we can
|
||||
// re-evaluate including that arg in this action then.
|
||||
// Return Value:
|
||||
// - The list of actions.
|
||||
std::vector<ActionAndArgs> SettingsTab::BuildStartupActions(BuildStartupKind) const
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
ActionAndArgs action;
|
||||
action.Action(ShortcutAction::OpenSettings);
|
||||
OpenSettingsArgs args{ SettingsTarget::SettingsUI };
|
||||
action.Args(args);
|
||||
|
||||
return std::vector{ std::move(action) };
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Focus the settings UI
|
||||
// Arguments:
|
||||
// - focusState: The FocusState mode by which focus is to be obtained.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void SettingsTab::Focus(WUX::FocusState focusState)
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
_focusState = focusState;
|
||||
|
||||
if (_focusState != FocusState::Unfocused)
|
||||
{
|
||||
Content().as<WUX::Controls::Page>().Focus(focusState);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Initializes a TabViewItem for this Tab instance.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void SettingsTab::_MakeTabViewItem()
|
||||
{
|
||||
TabBase::_MakeTabViewItem();
|
||||
|
||||
Title(RS_(L"SettingsTab"));
|
||||
TabViewItem().Header(winrt::box_value(Title()));
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Set the icon on the TabViewItem for this tab.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void SettingsTab::_CreateIcon()
|
||||
{
|
||||
// This is the Setting icon (looks like a gear)
|
||||
static constexpr std::wstring_view glyph{ L"\xE713" };
|
||||
|
||||
// The TabViewItem Icon needs MUX while the IconSourceElement in the CommandPalette needs WUX...
|
||||
Icon(winrt::hstring{ glyph });
|
||||
TabViewItem().IconSource(Microsoft::Terminal::UI::IconPathConverter::IconSourceMUX(glyph, false));
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush SettingsTab::_BackgroundBrush()
|
||||
{
|
||||
// Look up the color we should use for the settings tab item from our
|
||||
// resources. This should only be used for when "terminalBackground" is
|
||||
// requested.
|
||||
static const auto key = winrt::box_value(L"SettingsUiTabBrush");
|
||||
// You can't just do a Application::Current().Resources().TryLookup
|
||||
// lookup, cause the app theme never changes! Do the hacky version
|
||||
// instead.
|
||||
return ThemeLookup(Application::Current().Resources(), _requestedTheme, key).try_as<winrt::Windows::UI::Xaml::Media::Brush>();
|
||||
}
|
||||
}
|
||||
43
src/cascadia/TerminalApp/SettingsTab.h
Normal file
43
src/cascadia/TerminalApp/SettingsTab.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*++
|
||||
Copyright (c) Microsoft Corporation
|
||||
Licensed under the MIT license.
|
||||
|
||||
Module Name:
|
||||
- SettingsTab.h
|
||||
|
||||
Abstract:
|
||||
- The SettingsTab is a tab whose content is a Settings UI control. They can
|
||||
coexist in a TabView with all other types of tabs, like the TerminalTab.
|
||||
There should only be at most one SettingsTab open at any given time.
|
||||
|
||||
Author(s):
|
||||
- Leon Liang - October 2020
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
#include "TabBase.h"
|
||||
#include "SettingsTab.g.h"
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
struct SettingsTab : SettingsTabT<SettingsTab, TabBase>
|
||||
{
|
||||
public:
|
||||
SettingsTab(winrt::Microsoft::Terminal::Settings::Editor::MainPage settingsUI,
|
||||
winrt::Windows::UI::Xaml::ElementTheme requestedTheme);
|
||||
|
||||
void UpdateSettings(Microsoft::Terminal::Settings::Model::CascadiaSettings settings);
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState focusState) override;
|
||||
|
||||
std::vector<Microsoft::Terminal::Settings::Model::ActionAndArgs> BuildStartupActions(BuildStartupKind kind) const override;
|
||||
|
||||
private:
|
||||
winrt::Windows::UI::Xaml::ElementTheme _requestedTheme;
|
||||
|
||||
void _MakeTabViewItem() override;
|
||||
void _CreateIcon();
|
||||
|
||||
virtual winrt::Windows::UI::Xaml::Media::Brush _BackgroundBrush() override;
|
||||
};
|
||||
}
|
||||
12
src/cascadia/TerminalApp/SettingsTab.idl
Normal file
12
src/cascadia/TerminalApp/SettingsTab.idl
Normal file
@@ -0,0 +1,12 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import "TabBase.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
[default_interface] runtimeclass SettingsTab : TabBase
|
||||
{
|
||||
void UpdateSettings(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "TabRowControl.h"
|
||||
#include "ColorHelper.h"
|
||||
#include "DebugTapConnection.h"
|
||||
#include "SettingsTab.h"
|
||||
#include "..\TerminalSettingsModel\FileUtils.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
@@ -62,33 +63,30 @@ namespace winrt::TerminalApp::implementation
|
||||
// - existingConnection: An optional connection that is already established to a PTY
|
||||
// for this tab to host instead of creating one.
|
||||
// If not defined, the tab will create the connection.
|
||||
HRESULT TerminalPage::_OpenNewTab(const INewContentArgs& newContentArgs)
|
||||
HRESULT TerminalPage::_OpenNewTab(const NewTerminalArgs& newTerminalArgs)
|
||||
try
|
||||
{
|
||||
if (const auto& newTerminalArgs{ newContentArgs.try_as<NewTerminalArgs>() })
|
||||
const auto profile{ _settings.GetProfileForArgs(newTerminalArgs) };
|
||||
// GH#11114: GetProfileForArgs can return null if the index is higher
|
||||
// than the number of available profiles.
|
||||
if (!profile)
|
||||
{
|
||||
const auto profile{ _settings.GetProfileForArgs(newTerminalArgs) };
|
||||
// GH#11114: GetProfileForArgs can return null if the index is higher
|
||||
// than the number of available profiles.
|
||||
if (!profile)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
const auto settings{ TerminalSettings::CreateWithNewTerminalArgs(_settings, newTerminalArgs, *_bindings) };
|
||||
|
||||
// Try to handle auto-elevation
|
||||
if (_maybeElevate(newTerminalArgs, settings, profile))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
// We can't go in the other direction (elevated->unelevated)
|
||||
// unfortunately. This seems to be due to Centennial quirks. It works
|
||||
// unpackaged, but not packaged.
|
||||
return S_FALSE;
|
||||
}
|
||||
const auto settings{ TerminalSettings::CreateWithNewTerminalArgs(_settings, newTerminalArgs, *_bindings) };
|
||||
|
||||
// Try to handle auto-elevation
|
||||
if (_maybeElevate(newTerminalArgs, settings, profile))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
// We can't go in the other direction (elevated->unelevated)
|
||||
// unfortunately. This seems to be due to Centennial quirks. It works
|
||||
// unpackaged, but not packaged.
|
||||
//
|
||||
// This call to _MakePane won't return nullptr, we already checked that
|
||||
// case above with the _maybeElevate call.
|
||||
_CreateNewTabFromPane(_MakePane(newContentArgs, nullptr));
|
||||
_CreateNewTabFromPane(_MakePane(newTerminalArgs, nullptr));
|
||||
return S_OK;
|
||||
}
|
||||
CATCH_RETURN();
|
||||
@@ -137,16 +135,6 @@ namespace winrt::TerminalApp::implementation
|
||||
// for it. The Title change will be propagated upwards through the tab's
|
||||
// PropertyChanged event handler.
|
||||
newTabImpl->ActivePaneChanged([weakTab, weakThis{ get_weak() }]() {
|
||||
// TODO!
|
||||
//
|
||||
// * Make this a method on TerminalPage.
|
||||
// * Convert ActivePaneChanged to a typed event, so it sends the sender (so we don't need to make all these lambdas)
|
||||
// * Stash the task pane as a member on the Terminal? if one was opened.
|
||||
// * If the tab does have a taskpane, then tell the taskpane the active pane changed
|
||||
//
|
||||
// wait don't do any of that. just do that in TerminalTab directly
|
||||
// before we even raise the event you donkey
|
||||
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
||||
@@ -183,8 +171,17 @@ namespace winrt::TerminalApp::implementation
|
||||
auto tabViewItem = newTabImpl->TabViewItem();
|
||||
_tabView.TabItems().InsertAt(insertPosition, tabViewItem);
|
||||
|
||||
// Set this tab's icon to the icon from the content
|
||||
_UpdateTabIcon(*newTabImpl);
|
||||
// Set this tab's icon to the icon from the user's profile
|
||||
if (const auto profile{ newTabImpl->GetFocusedProfile() })
|
||||
{
|
||||
const auto& icon = profile.EvaluatedIcon();
|
||||
if (!icon.empty())
|
||||
{
|
||||
const auto theme = _settings.GlobalSettings().CurrentTheme();
|
||||
const auto iconStyle = (theme && theme.Tab()) ? theme.Tab().IconStyle() : IconStyle::Default;
|
||||
newTabImpl->UpdateIcon(icon, iconStyle);
|
||||
}
|
||||
}
|
||||
|
||||
tabViewItem.PointerReleased({ this, &TerminalPage::_OnTabClick });
|
||||
|
||||
@@ -229,15 +226,13 @@ namespace winrt::TerminalApp::implementation
|
||||
// Arguments:
|
||||
// - pane: The pane to use as the root.
|
||||
// - insertPosition: Optional parameter to indicate the position of tab.
|
||||
TerminalApp::TerminalTab TerminalPage::_CreateNewTabFromPane(std::shared_ptr<Pane> pane, uint32_t insertPosition)
|
||||
void TerminalPage::_CreateNewTabFromPane(std::shared_ptr<Pane> pane, uint32_t insertPosition)
|
||||
{
|
||||
if (pane)
|
||||
{
|
||||
auto newTabImpl = winrt::make_self<TerminalTab>(pane);
|
||||
_InitializeTab(newTabImpl, insertPosition);
|
||||
return *newTabImpl;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -247,13 +242,11 @@ namespace winrt::TerminalApp::implementation
|
||||
// - tab: the Tab to update the title for.
|
||||
void TerminalPage::_UpdateTabIcon(TerminalTab& tab)
|
||||
{
|
||||
if (const auto content{ tab.GetActiveContent() })
|
||||
if (const auto profile = tab.GetFocusedProfile())
|
||||
{
|
||||
const auto& icon{ content.Icon() };
|
||||
const auto theme = _settings.GlobalSettings().CurrentTheme();
|
||||
const auto iconStyle = (theme && theme.Tab()) ? theme.Tab().IconStyle() : IconStyle::Default;
|
||||
|
||||
tab.UpdateIcon(icon, iconStyle);
|
||||
tab.UpdateIcon(profile.EvaluatedIcon(), iconStyle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,6 +800,14 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
const auto tab{ _tabs.GetAt(*index) };
|
||||
if (tab.try_as<TerminalApp::SettingsTab>())
|
||||
{
|
||||
_HandleCloseTabRequested(tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -891,10 +892,7 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
if (const auto p = CommandPaletteElement())
|
||||
{
|
||||
p.Visibility(Visibility::Collapsed);
|
||||
}
|
||||
CommandPalette().Visibility(Visibility::Collapsed);
|
||||
_UpdateTabView();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include "TasksPaneContent.h"
|
||||
#include "TasksPaneContent.g.cpp"
|
||||
#include "FilteredTask.g.cpp"
|
||||
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Microsoft::Terminal::Settings;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
|
||||
namespace winrt
|
||||
{
|
||||
namespace WUX = Windows::UI::Xaml;
|
||||
namespace MUX = Microsoft::UI::Xaml;
|
||||
using IInspectable = Windows::Foundation::IInspectable;
|
||||
}
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
TasksPaneContent::TasksPaneContent()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// auto res = Windows::UI::Xaml::Application::Current().Resources();
|
||||
auto bg = Resources().Lookup(winrt::box_value(L"PageBackground"));
|
||||
Background(bg.try_as<WUX::Media::Brush>());
|
||||
}
|
||||
|
||||
void TasksPaneContent::_updateFilteredCommands()
|
||||
{
|
||||
const auto& queryString = _filterBox().Text();
|
||||
|
||||
// DON'T replace the itemSource here. If you do, it'll un-expand all the
|
||||
// nested items the user has expanded. Instead, just update the filter.
|
||||
// That'll also trigger a PropertyChanged for the Visibility property.
|
||||
for (const auto& t : _allTasks)
|
||||
{
|
||||
t.UpdateFilter(queryString);
|
||||
}
|
||||
}
|
||||
|
||||
void TasksPaneContent::UpdateSettings(const CascadiaSettings& settings)
|
||||
{
|
||||
_settings = settings;
|
||||
|
||||
// You'd think that `FilterToSendInput(queryString)` would work. It
|
||||
// doesn't! That uses the queryString as the current command the user
|
||||
// has typed, then relies on the sxnui to _also_ filter with that
|
||||
// string.
|
||||
|
||||
const auto tasks = _settings.GlobalSettings().ActionMap().FilterToSendInput(L""); // IVector<Model::Command>
|
||||
_allTasks = winrt::single_threaded_observable_vector<TerminalApp::FilteredTask>();
|
||||
for (const auto& t : tasks)
|
||||
{
|
||||
const auto& filtered{ winrt::make<FilteredTask>(t) };
|
||||
_allTasks.Append(filtered);
|
||||
}
|
||||
_treeView().ItemsSource(_allTasks);
|
||||
|
||||
_updateFilteredCommands();
|
||||
}
|
||||
|
||||
void TasksPaneContent::_filterTextChanged(const IInspectable& /*sender*/,
|
||||
const Windows::UI::Xaml::RoutedEventArgs& /*args*/)
|
||||
{
|
||||
_updateFilteredCommands();
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement TasksPaneContent::GetRoot()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
winrt::Windows::Foundation::Size TasksPaneContent::MinimumSize()
|
||||
{
|
||||
return { 1, 1 };
|
||||
}
|
||||
void TasksPaneContent::Focus(winrt::Windows::UI::Xaml::FocusState reason)
|
||||
{
|
||||
reason;
|
||||
// _box.Focus(reason);
|
||||
}
|
||||
void TasksPaneContent::Close()
|
||||
{
|
||||
CloseRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
INewContentArgs TasksPaneContent::GetNewTerminalArgs(BuildStartupKind /*kind*/) const
|
||||
{
|
||||
return BaseContentArgs(L"snippets");
|
||||
}
|
||||
|
||||
winrt::hstring TasksPaneContent::Icon() const
|
||||
{
|
||||
static constexpr std::wstring_view glyph{ L"\xe70b" }; // QuickNote
|
||||
return winrt::hstring{ glyph };
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush TasksPaneContent::BackgroundBrush()
|
||||
{
|
||||
return Background();
|
||||
}
|
||||
|
||||
void TasksPaneContent::SetLastActiveControl(const Microsoft::Terminal::Control::TermControl& control)
|
||||
{
|
||||
_control = control;
|
||||
}
|
||||
|
||||
void TasksPaneContent::_runCommandButtonClicked(const Windows::Foundation::IInspectable& sender,
|
||||
const Windows::UI::Xaml::RoutedEventArgs&)
|
||||
{
|
||||
if (const auto& taskVM{ sender.try_as<WUX::Controls::Button>().DataContext().try_as<FilteredTask>() })
|
||||
{
|
||||
if (const auto& strongControl{ _control.get() })
|
||||
{
|
||||
// By using the last active control as the sender here, the
|
||||
// actiopn dispatch will send this to the active control,
|
||||
// thinking that it is the control that requested this event.
|
||||
DispatchCommandRequested.raise(strongControl, taskVM->Command());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
#include "TasksPaneContent.g.h"
|
||||
#include "FilteredTask.g.h"
|
||||
#include "BasicPaneEvents.h"
|
||||
#include "FilteredCommand.h"
|
||||
#include "ActionPaletteItem.h"
|
||||
#include <LibraryResources.h>
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
struct TasksPaneContent : TasksPaneContentT<TasksPaneContent>, BasicPaneEvents
|
||||
{
|
||||
TasksPaneContent();
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
|
||||
winrt::Windows::Foundation::Size MinimumSize();
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
|
||||
void Close();
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
|
||||
// TODO! lots of strings here and in XAML that need RS_-ifying
|
||||
winrt::hstring Title() { return RS_(L"SnippetPaneTitle/Text"); }
|
||||
uint64_t TaskbarState() { return 0; }
|
||||
uint64_t TaskbarProgress() { return 0; }
|
||||
bool ReadOnly() { return false; }
|
||||
winrt::hstring Icon() const;
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> TabColor() const noexcept { return nullptr; }
|
||||
winrt::Windows::UI::Xaml::Media::Brush BackgroundBrush();
|
||||
|
||||
void SetLastActiveControl(const Microsoft::Terminal::Control::TermControl& control);
|
||||
|
||||
// See BasicPaneEvents for most generic event definitions
|
||||
|
||||
private:
|
||||
friend struct TasksPaneContentT<TasksPaneContent>; // for Xaml to bind events
|
||||
|
||||
winrt::weak_ref<Microsoft::Terminal::Control::TermControl> _control{ nullptr };
|
||||
winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings _settings{ nullptr };
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<TerminalApp::FilteredTask> _allTasks{ nullptr };
|
||||
|
||||
void _runCommandButtonClicked(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs&);
|
||||
void _filterTextChanged(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
|
||||
|
||||
void _updateFilteredCommands();
|
||||
};
|
||||
|
||||
struct FilteredTask : FilteredTaskT<FilteredTask, TerminalApp::implementation::FilteredCommand>
|
||||
{
|
||||
FilteredTask() = default;
|
||||
|
||||
FilteredTask(const winrt::Microsoft::Terminal::Settings::Model::Command& command)
|
||||
{
|
||||
_constructFilteredCommand(winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(command));
|
||||
_command = command;
|
||||
|
||||
// The Children() method must always return a non-null vector
|
||||
_children = winrt::single_threaded_observable_vector<TerminalApp::FilteredTask>();
|
||||
if (_command.HasNestedCommands())
|
||||
{
|
||||
for (const auto& [_, child] : _command.NestedCommands())
|
||||
{
|
||||
auto vm{ winrt::make<FilteredTask>(child) };
|
||||
_children.Append(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateFilter(const winrt::hstring& filter) override
|
||||
{
|
||||
TerminalApp::implementation::FilteredCommand::UpdateFilter(filter);
|
||||
for (const auto& c : _children)
|
||||
{
|
||||
c.UpdateFilter(filter);
|
||||
}
|
||||
|
||||
PropertyChanged.raise(*this, Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"Visibility" });
|
||||
}
|
||||
|
||||
winrt::hstring Input()
|
||||
{
|
||||
if (const auto& actionItem{ _Item.try_as<winrt::TerminalApp::ActionPaletteItem>() })
|
||||
{
|
||||
if (const auto& command{ actionItem.Command() })
|
||||
{
|
||||
if (const auto& sendInput{ command.ActionAndArgs().Args().try_as<winrt::Microsoft::Terminal::Settings::Model::SendInputArgs>() })
|
||||
{
|
||||
return sendInput.Input();
|
||||
}
|
||||
}
|
||||
}
|
||||
return L"";
|
||||
};
|
||||
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<TerminalApp::FilteredTask> Children() { return _children; }
|
||||
bool HasChildren() { return _children.Size() > 0; }
|
||||
winrt::Microsoft::Terminal::Settings::Model::Command Command() { return _command; }
|
||||
|
||||
// Used to control if this item is visible in the TreeView. Turns out,
|
||||
// TreeView is in fact sane enough to remove items entirely if they're
|
||||
// Collapsed.
|
||||
winrt::Windows::UI::Xaml::Visibility Visibility()
|
||||
{
|
||||
// Is there no filter, or do we match it?
|
||||
if (_Filter.empty() || _Weight > 0)
|
||||
{
|
||||
return winrt::Windows::UI::Xaml::Visibility::Visible;
|
||||
}
|
||||
// If we don't match, maybe one of our children does
|
||||
auto totalWeight = _Weight;
|
||||
for (const auto& c : _children)
|
||||
{
|
||||
totalWeight += c.Weight();
|
||||
}
|
||||
|
||||
return totalWeight > 0 ? winrt::Windows::UI::Xaml::Visibility::Visible : winrt::Windows::UI::Xaml::Visibility::Collapsed;
|
||||
};
|
||||
|
||||
private:
|
||||
winrt::Microsoft::Terminal::Settings::Model::Command _command{ nullptr };
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<TerminalApp::FilteredTask> _children{ nullptr };
|
||||
};
|
||||
}
|
||||
|
||||
namespace winrt::TerminalApp::factory_implementation
|
||||
{
|
||||
BASIC_FACTORY(TasksPaneContent);
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
<!--
|
||||
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
||||
the MIT License. See LICENSE in the project root for license information.
|
||||
-->
|
||||
<UserControl x:Class="TerminalApp.TasksPaneContent"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:SettingsModel="using:Microsoft.Terminal.Settings.Model"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:TerminalApp"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:model="using:Microsoft.Terminal.Settings.Model"
|
||||
xmlns:mtu="using:Microsoft.Terminal.UI"
|
||||
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
|
||||
AllowFocusOnInteraction="True"
|
||||
IsTabStop="True"
|
||||
TabNavigation="Cycle"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
<Style x:Key="PlayButtonTemplate"
|
||||
TargetType="Button">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="ButtonBaseElement"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Background="{TemplateBinding Background}"
|
||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Viewbox Width="20"
|
||||
Height="20">
|
||||
<Grid>
|
||||
<FontIcon x:Name="ButtonBackgroundIcon"
|
||||
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
|
||||
Foreground="{ThemeResource PlayButtonHoveredColor}"
|
||||
Glyph=""
|
||||
Visibility="Collapsed" />
|
||||
<FontIcon x:Name="ButtonOutlineIcon"
|
||||
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
|
||||
Foreground="{ThemeResource PlayButtonNormalColor}"
|
||||
Glyph="" />
|
||||
</Grid>
|
||||
<!-- TODO! FontFamily="{ThemeResource SymbolThemeFontFamily}" -->
|
||||
</Viewbox>
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ButtonBackgroundIcon.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="PointerOver">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ButtonBackgroundIcon.Visibility" Value="Visible" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Disabled" />
|
||||
</VisualStateGroup>
|
||||
|
||||
<VisualStateGroup x:Name="PlayButtonStates">
|
||||
<VisualState x:Name="Ready">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ButtonBackgroundIcon.Glyph" Value="" />
|
||||
<Setter Target="ButtonOutlineIcon.Glyph" Value="" />
|
||||
<Setter Target="StatusProgress.IsActive" Value="False" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<!--
|
||||
<VisualState x:Name="Running">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ButtonBackgroundIcon.Glyph" Value=" " />
|
||||
<Setter Target="ButtonOutlineIcon.Glyph" Value=" " />
|
||||
<Setter Target="StatusProgress.IsActive" Value="True" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="AlreadyRan">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ButtonBackgroundIcon.Glyph" Value="" />
|
||||
<Setter Target="ButtonOutlineIcon.Glyph" Value="" />
|
||||
<Setter Target="StatusProgress.IsActive" Value="False" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>-->
|
||||
</VisualStateGroup>
|
||||
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="TaskItemTemplate"
|
||||
x:DataType="local:FilteredTask">
|
||||
<mux:TreeViewItem x:Name="rootItem"
|
||||
ItemsSource="{x:Bind Children}"
|
||||
Visibility="{x:Bind Visibility, Mode=OneWay}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ContentPresenter Grid.Column="0">
|
||||
<IconSourceElement Width="16"
|
||||
Height="16"
|
||||
IconSource="{x:Bind mtu:IconPathConverter.IconSourceWUX(Item.Icon), Mode=OneTime}"
|
||||
Visibility="Collapsed" />
|
||||
</ContentPresenter>
|
||||
|
||||
<Button x:Uid="SnippetPlayButton"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="1"
|
||||
Grid.Column="0"
|
||||
Margin="-28,0,0,0"
|
||||
Padding="3"
|
||||
VerticalAlignment="Bottom"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Click="_runCommandButtonClicked"
|
||||
Style="{StaticResource PlayButtonTemplate}"
|
||||
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(HasChildren), Mode=OneWay}">
|
||||
|
||||
<Button.Content>
|
||||
<FontIcon FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
|
||||
FontSize="12"
|
||||
Glyph="" />
|
||||
<!--
|
||||
xE768 is Play, which is just an outline.
|
||||
xF5B0 is PlaySolid, also a good option. Seemed
|
||||
better to have a lightweight outline though
|
||||
-->
|
||||
</Button.Content>
|
||||
|
||||
<Button.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<SolidColorBrush x:Key="ButtonForegroundPointerOver"
|
||||
Color="{StaticResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="ButtonForegroundPressed"
|
||||
Color="{StaticResource SystemAccentColor}" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="ButtonForegroundPointerOver"
|
||||
Color="{StaticResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="ButtonForegroundPressed"
|
||||
Color="{StaticResource SystemAccentColor}" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<SolidColorBrush x:Key="ButtonBackground"
|
||||
Color="{ThemeResource SystemColorButtonFaceColor}" />
|
||||
<SolidColorBrush x:Key="ButtonBackgroundPointerOver"
|
||||
Color="{ThemeResource SystemColorHighlightColor}" />
|
||||
<SolidColorBrush x:Key="ButtonBackgroundPressed"
|
||||
Color="{ThemeResource SystemColorHighlightColor}" />
|
||||
<SolidColorBrush x:Key="ButtonForeground"
|
||||
Color="{ThemeResource SystemColorButtonTextColor}" />
|
||||
<SolidColorBrush x:Key="ButtonForegroundPointerOver"
|
||||
Color="{ThemeResource SystemColorHighlightTextColor}" />
|
||||
<SolidColorBrush x:Key="ButtonForegroundPressed"
|
||||
Color="{ThemeResource SystemColorHighlightTextColor}" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Button.Resources>
|
||||
</Button>
|
||||
|
||||
<local:HighlightedTextControl Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{x:Bind HighlightedName, Mode=OneWay}" />
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,6"
|
||||
FontFamily="Cascadia Mono, Consolas"
|
||||
IsTextSelectionEnabled="True"
|
||||
Style="{ThemeResource BodyTextBlockStyle}"
|
||||
Text="{x:Bind Input}"
|
||||
Visibility="{Binding ElementName=rootItem, Path=IsSelected}" />
|
||||
</Grid>
|
||||
</mux:TreeViewItem>
|
||||
</DataTemplate>
|
||||
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<!-- same as in MainPage, this is SolidBackgroundFillColorTertiary -->
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<Color x:Key="PageBackground">#282828</Color>
|
||||
<Color x:Key="PlayButtonHoveredColor">#90ef90</Color>
|
||||
<Color x:Key="PlayButtonNormalColor">#8888</Color>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<Color x:Key="PageBackground">#F9F9F9</Color>
|
||||
<Color x:Key="PlayButtonHoveredColor">#257f01</Color>
|
||||
<Color x:Key="PlayButtonNormalColor">#88222222</Color>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<!-- Define resources for HighContrast mode here -->
|
||||
<StaticResource x:Key="PageBackground"
|
||||
ResourceKey="SystemColorWindowColorBrush" />
|
||||
</ResourceDictionary>
|
||||
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="{ThemeResource PageBackground}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock x:Name="_title"
|
||||
x:Uid="SnippetPaneTitle"
|
||||
Grid.Row="0"
|
||||
Margin="4"
|
||||
FontSize="24" />
|
||||
|
||||
<TextBox x:Name="_filterBox"
|
||||
x:Uid="SnippetsFilterBox"
|
||||
Grid.Row="1"
|
||||
Margin="8,0,8,8"
|
||||
TextChanged="_filterTextChanged" />
|
||||
|
||||
<mux:TreeView x:Name="_treeView"
|
||||
Grid.Row="2"
|
||||
CanDragItems="False"
|
||||
CanReorderItems="False"
|
||||
ItemTemplate="{StaticResource TaskItemTemplate}" />
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -71,9 +71,6 @@
|
||||
<Page Include="SuggestionsControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="TasksPaneContent.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<!-- ========================= Headers ======================== -->
|
||||
<ItemGroup>
|
||||
@@ -91,6 +88,9 @@
|
||||
<DependentUpon>PaletteItemTemplateSelector.idl</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SettingsTab.h">
|
||||
<DependentUpon>SettingsTab.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PaletteItem.h" />
|
||||
<ClInclude Include="TabBase.h">
|
||||
<DependentUpon>TabBase.idl</DependentUpon>
|
||||
@@ -164,16 +164,7 @@
|
||||
<ClInclude Include="ScratchpadContent.h">
|
||||
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TasksPaneContent.h">
|
||||
<DependentUpon>TasksPaneContent.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SettingsPaneContent.h">
|
||||
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Toast.h" />
|
||||
<ClInclude Include="TerminalSettingsCache.h">
|
||||
<DependentUpon>TerminalSettingsCache.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SuggestionsControl.h">
|
||||
<DependentUpon>SuggestionsControl.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
@@ -194,6 +185,9 @@
|
||||
<DependentUpon>PaletteItemTemplateSelector.idl</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SettingsTab.cpp">
|
||||
<DependentUpon>SettingsTab.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PaletteItem.cpp" />
|
||||
<ClCompile Include="TabBase.cpp">
|
||||
<DependentUpon>TabBase.idl</DependentUpon>
|
||||
@@ -278,19 +272,10 @@
|
||||
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ScratchpadContent.cpp">
|
||||
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TasksPaneContent.cpp">
|
||||
<DependentUpon>TasksPaneContent.xaml</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SettingsPaneContent.cpp">
|
||||
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
|
||||
<DependentUpon>ScratchpadContent.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="Toast.cpp" />
|
||||
<ClCompile Include="TerminalSettingsCache.cpp">
|
||||
<DependentUpon>TerminalSettingsCache.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SuggestionsControl.cpp">
|
||||
<DependentUpon>SuggestionsControl.xaml</DependentUpon>
|
||||
</ClCompile>
|
||||
@@ -310,6 +295,7 @@
|
||||
<Midl Include="PaletteItemTemplateSelector.idl">
|
||||
<SubType>Designer</SubType>
|
||||
</Midl>
|
||||
<Midl Include="SettingsTab.idl" />
|
||||
<Midl Include="PaletteItem.idl" />
|
||||
<Midl Include="ShortcutActionDispatch.idl" />
|
||||
<Midl Include="AppKeyBindings.idl" />
|
||||
@@ -361,11 +347,7 @@
|
||||
</Midl>
|
||||
<Midl Include="FilteredCommand.idl" />
|
||||
<Midl Include="IPaneContent.idl" />
|
||||
<Midl Include="TerminalPaneContent.idl" >
|
||||
<DependentUpon>TaskPaneContent.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Midl>
|
||||
<Midl Include="TerminalSettingsCache.idl" />
|
||||
<Midl Include="TerminalPaneContent.idl" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<ClCompile Include="Tab.cpp">
|
||||
<Filter>tab</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SettingsTab.cpp">
|
||||
<Filter>tab</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="FilteredCommand.cpp">
|
||||
<Filter>commandPalette</Filter>
|
||||
</ClCompile>
|
||||
@@ -61,6 +64,9 @@
|
||||
<ClInclude Include="Tab.h">
|
||||
<Filter>tab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SettingsTab.h">
|
||||
<Filter>tab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FilteredCommand.h">
|
||||
<Filter>commandPalette</Filter>
|
||||
</ClInclude>
|
||||
@@ -92,7 +98,6 @@
|
||||
<Midl Include="ShortcutActionDispatch.idl">
|
||||
<Filter>settings</Filter>
|
||||
</Midl>
|
||||
<Midl Include="IDirectKeyListener.idl" />
|
||||
<Midl Include="SettingsTab.idl">
|
||||
<Filter>tab</Filter>
|
||||
</Midl>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "RenameWindowRequestedArgs.g.cpp"
|
||||
#include "RequestMoveContentArgs.g.cpp"
|
||||
#include "RequestReceiveContentArgs.g.cpp"
|
||||
#include "LaunchPositionRequest.g.cpp"
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@@ -21,9 +20,7 @@
|
||||
#include "App.h"
|
||||
#include "ColorHelper.h"
|
||||
#include "DebugTapConnection.h"
|
||||
#include "SettingsPaneContent.h"
|
||||
#include "ScratchpadContent.h"
|
||||
#include "TasksPaneContent.h"
|
||||
#include "SettingsTab.h"
|
||||
#include "TabRowControl.h"
|
||||
#include "Utils.h"
|
||||
|
||||
@@ -68,6 +65,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_WindowProperties{ std::move(properties) }
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_WindowProperties.PropertyChanged({ get_weak(), &TerminalPage::_windowPropertyChanged });
|
||||
}
|
||||
|
||||
@@ -112,11 +110,7 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::SetSettings(CascadiaSettings settings, bool needRefreshUI)
|
||||
{
|
||||
assert(Dispatcher().HasThreadAccess());
|
||||
if (_settings == nullptr)
|
||||
{
|
||||
// Create this only on the first time we load the settings.
|
||||
_terminalSettingsCache = TerminalApp::TerminalSettingsCache{ settings, *_bindings };
|
||||
}
|
||||
|
||||
_settings = settings;
|
||||
|
||||
// Make sure to call SetCommands before _RefreshUIForSettingsReload.
|
||||
@@ -318,7 +312,6 @@ namespace winrt::TerminalApp::implementation
|
||||
// Check that there's at least one action that's not just an elevated newTab action.
|
||||
for (const auto& action : _startupActions)
|
||||
{
|
||||
// Only new terminal panes will be requesting elevation.
|
||||
NewTerminalArgs newTerminalArgs{ nullptr };
|
||||
|
||||
if (action.Action() == ShortcutAction::NewTab)
|
||||
@@ -326,7 +319,7 @@ namespace winrt::TerminalApp::implementation
|
||||
const auto& args{ action.Args().try_as<NewTabArgs>() };
|
||||
if (args)
|
||||
{
|
||||
newTerminalArgs = args.ContentArgs().try_as<NewTerminalArgs>();
|
||||
newTerminalArgs = args.TerminalArgs();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -339,7 +332,7 @@ namespace winrt::TerminalApp::implementation
|
||||
const auto& args{ action.Args().try_as<SplitPaneArgs>() };
|
||||
if (args)
|
||||
{
|
||||
newTerminalArgs = args.ContentArgs().try_as<NewTerminalArgs>();
|
||||
newTerminalArgs = args.TerminalArgs();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -455,10 +448,10 @@ namespace winrt::TerminalApp::implementation
|
||||
// - command - command to dispatch
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalPage::_OnDispatchCommandRequested(const IInspectable& sender, const Microsoft::Terminal::Settings::Model::Command& command)
|
||||
void TerminalPage::_OnDispatchCommandRequested(const IInspectable& /*sender*/, const Microsoft::Terminal::Settings::Model::Command& command)
|
||||
{
|
||||
const auto& actionAndArgs = command.ActionAndArgs();
|
||||
_actionDispatch->DoAction(sender, actionAndArgs);
|
||||
_actionDispatch->DoAction(actionAndArgs);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1647,6 +1640,10 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
term.RaiseNotice({ this, &TerminalPage::_ControlNoticeRaisedHandler });
|
||||
|
||||
// Add an event handler when the terminal's selection wants to be copied.
|
||||
// When the text buffer data is retrieved, we'll copy the data into the Clipboard
|
||||
term.CopyToClipboard({ this, &TerminalPage::_CopyToClipboardHandler });
|
||||
|
||||
// Add an event handler when the terminal wants to paste data from the Clipboard.
|
||||
term.PasteFromClipboard({ this, &TerminalPage::_PasteFromClipboardHandler });
|
||||
|
||||
@@ -1948,18 +1945,12 @@ namespace winrt::TerminalApp::implementation
|
||||
layout.LaunchMode({ mode });
|
||||
|
||||
// Only save the content size because the tab size will be added on load.
|
||||
const auto contentWidth = static_cast<float>(_tabContent.ActualWidth());
|
||||
const auto contentHeight = static_cast<float>(_tabContent.ActualHeight());
|
||||
const auto contentWidth = ::base::saturated_cast<float>(_tabContent.ActualWidth());
|
||||
const auto contentHeight = ::base::saturated_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);
|
||||
}
|
||||
|
||||
@@ -2345,12 +2336,6 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// For now, prevent splitting the _settingsTab. We can always revisit this later.
|
||||
if (*activeTab == _settingsTab)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If the caller is calling us with the return value of _MakePane
|
||||
// directly, it's possible that nullptr was returned, if the connections
|
||||
// was supposed to be launched in an elevated window. In that case, do
|
||||
@@ -2359,8 +2344,8 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
return;
|
||||
}
|
||||
const auto contentWidth = static_cast<float>(_tabContent.ActualWidth());
|
||||
const auto contentHeight = static_cast<float>(_tabContent.ActualHeight());
|
||||
const auto contentWidth = ::base::saturated_cast<float>(_tabContent.ActualWidth());
|
||||
const auto contentHeight = ::base::saturated_cast<float>(_tabContent.ActualHeight());
|
||||
const winrt::Windows::Foundation::Size availableSpace{ contentWidth, contentHeight };
|
||||
|
||||
const auto realSplitType = activeTab->PreCalculateCanSplit(splitDirection, splitSize, availableSpace);
|
||||
@@ -2560,6 +2545,54 @@ namespace winrt::TerminalApp::implementation
|
||||
return dimension;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Place `copiedData` into the clipboard as text. Triggered when a
|
||||
// terminal control raises its CopyToClipboard event.
|
||||
// Arguments:
|
||||
// - copiedData: the new string content to place on the clipboard.
|
||||
winrt::fire_and_forget TerminalPage::_CopyToClipboardHandler(const IInspectable /*sender*/,
|
||||
const CopyToClipboardEventArgs copiedData)
|
||||
{
|
||||
co_await wil::resume_foreground(Dispatcher(), CoreDispatcherPriority::High);
|
||||
|
||||
auto dataPack = DataPackage();
|
||||
dataPack.RequestedOperation(DataPackageOperation::Copy);
|
||||
|
||||
const auto copyFormats = copiedData.Formats() != nullptr ?
|
||||
copiedData.Formats().Value() :
|
||||
static_cast<CopyFormat>(0);
|
||||
|
||||
// copy text to dataPack
|
||||
dataPack.SetText(copiedData.Text());
|
||||
|
||||
if (WI_IsFlagSet(copyFormats, CopyFormat::HTML))
|
||||
{
|
||||
// copy html to dataPack
|
||||
const auto htmlData = copiedData.Html();
|
||||
if (!htmlData.empty())
|
||||
{
|
||||
dataPack.SetHtmlFormat(htmlData);
|
||||
}
|
||||
}
|
||||
|
||||
if (WI_IsFlagSet(copyFormats, CopyFormat::RTF))
|
||||
{
|
||||
// copy rtf data to dataPack
|
||||
const auto rtfData = copiedData.Rtf();
|
||||
if (!rtfData.empty())
|
||||
{
|
||||
dataPack.SetRtf(rtfData);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Clipboard::SetContent(dataPack);
|
||||
Clipboard::Flush();
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
|
||||
static wil::unique_close_clipboard_call _openClipboard(HWND hwnd)
|
||||
{
|
||||
bool success = false;
|
||||
@@ -3053,9 +3086,9 @@ namespace winrt::TerminalApp::implementation
|
||||
// - If the newTerminalArgs required us to open the pane as a new elevated
|
||||
// connection, then we'll return nullptr. Otherwise, we'll return a new
|
||||
// Pane for this connection.
|
||||
std::shared_ptr<Pane> TerminalPage::_MakeTerminalPane(const NewTerminalArgs& newTerminalArgs,
|
||||
const winrt::TerminalApp::TabBase& sourceTab,
|
||||
TerminalConnection::ITerminalConnection existingConnection)
|
||||
std::shared_ptr<Pane> TerminalPage::_MakePane(const NewTerminalArgs& newTerminalArgs,
|
||||
const winrt::TerminalApp::TabBase& sourceTab,
|
||||
TerminalConnection::ITerminalConnection existingConnection)
|
||||
{
|
||||
// First things first - Check for making a pane from content ID.
|
||||
if (newTerminalArgs &&
|
||||
@@ -3065,7 +3098,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// serialize the actual profile's GUID along with the content guid.
|
||||
const auto& profile = _settings.GetProfileForArgs(newTerminalArgs);
|
||||
const auto control = _AttachControlToContent(newTerminalArgs.ContentId());
|
||||
auto paneContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, control) };
|
||||
auto paneContent{ winrt::make<TerminalPaneContent>(profile, control) };
|
||||
return std::make_shared<Pane>(paneContent);
|
||||
}
|
||||
|
||||
@@ -3122,15 +3155,14 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
const auto control = _CreateNewControlAndContent(controlSettings, connection);
|
||||
|
||||
auto paneContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, control) };
|
||||
|
||||
auto paneContent{ winrt::make<TerminalPaneContent>(profile, control) };
|
||||
auto resultPane = std::make_shared<Pane>(paneContent);
|
||||
|
||||
if (debugConnection) // this will only be set if global debugging is on and tap is active
|
||||
{
|
||||
auto newControl = _CreateNewControlAndContent(controlSettings, debugConnection);
|
||||
// Split (auto) with the debug tap.
|
||||
auto debugContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, newControl) };
|
||||
auto debugContent{ winrt::make<TerminalPaneContent>(profile, newControl) };
|
||||
auto debugPane = std::make_shared<Pane>(debugContent);
|
||||
|
||||
// Since we're doing this split directly on the pane (instead of going through TerminalTab,
|
||||
@@ -3148,51 +3180,6 @@ namespace winrt::TerminalApp::implementation
|
||||
return resultPane;
|
||||
}
|
||||
|
||||
std::shared_ptr<Pane> TerminalPage::_MakePane(const INewContentArgs& contentArgs,
|
||||
const winrt::TerminalApp::TabBase& sourceTab,
|
||||
TerminalConnection::ITerminalConnection existingConnection)
|
||||
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
IPaneContent content{ nullptr };
|
||||
|
||||
const auto& paneType{ contentArgs.Type() };
|
||||
if (paneType == L"scratchpad")
|
||||
{
|
||||
const auto& scratchPane{ winrt::make_self<ScratchpadContent>() };
|
||||
|
||||
// This is maybe a little wacky - add our key event handler to the pane
|
||||
// we made. So that we can get actions for keys that the content didn't
|
||||
// handle.
|
||||
scratchPane->GetRoot().KeyDown({ get_weak(), &TerminalPage::_KeyDownHandler });
|
||||
|
||||
content = *scratchPane;
|
||||
}
|
||||
else if (paneType == L"settings")
|
||||
{
|
||||
content = _makeSettingsContent();
|
||||
}
|
||||
else if (paneType == L"snippets")
|
||||
{
|
||||
const auto& tasksContent{ winrt::make_self<TasksPaneContent>() };
|
||||
tasksContent->UpdateSettings(_settings);
|
||||
tasksContent->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
tasksContent->DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });
|
||||
|
||||
content = *tasksContent;
|
||||
}
|
||||
|
||||
assert(content);
|
||||
|
||||
return std::make_shared<Pane>(content);
|
||||
}
|
||||
|
||||
void TerminalPage::_restartPaneConnection(
|
||||
const TerminalApp::TerminalPaneContent& paneContent,
|
||||
const winrt::Windows::Foundation::IInspectable&)
|
||||
@@ -3284,18 +3271,50 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Refresh UI elements
|
||||
|
||||
// Recreate the TerminalSettings cache here. We'll use that as we're
|
||||
// updating terminal panes, so that we don't have to build a _new_
|
||||
// TerminalSettings for every profile we update - we can just look them
|
||||
// up the previous ones we built.
|
||||
_terminalSettingsCache.Reset(_settings, *_bindings);
|
||||
// Mapping by GUID isn't _excellent_ because the defaults profile doesn't have a stable GUID; however,
|
||||
// when we stabilize its guid this will become fully safe.
|
||||
std::unordered_map<winrt::guid, std::pair<Profile, TerminalSettingsCreateResult>> profileGuidSettingsMap;
|
||||
const auto profileDefaults{ _settings.ProfileDefaults() };
|
||||
const auto allProfiles{ _settings.AllProfiles() };
|
||||
|
||||
profileGuidSettingsMap.reserve(allProfiles.Size() + 1);
|
||||
|
||||
// Include the Defaults profile for consideration
|
||||
profileGuidSettingsMap.insert_or_assign(profileDefaults.Guid(), std::pair{ profileDefaults, nullptr });
|
||||
for (const auto& newProfile : allProfiles)
|
||||
{
|
||||
// Avoid creating a TerminalSettings right now. They're not totally cheap, and we suspect that users with many
|
||||
// panes may not be using all of their profiles at the same time. Lazy evaluation is king!
|
||||
profileGuidSettingsMap.insert_or_assign(newProfile.Guid(), std::pair{ newProfile, nullptr });
|
||||
}
|
||||
|
||||
for (const auto& tab : _tabs)
|
||||
{
|
||||
if (auto terminalTab{ _GetTerminalTabImpl(tab) })
|
||||
{
|
||||
// Let the tab know that there are new settings. It's up to each content to decide what to do with them.
|
||||
terminalTab->UpdateSettings(_settings);
|
||||
terminalTab->UpdateSettings();
|
||||
|
||||
// Manually enumerate the panes in each tab; this will let us recycle TerminalSettings
|
||||
// objects but only have to iterate one time.
|
||||
terminalTab->GetRootPane()->WalkTree([&](auto&& pane) {
|
||||
if (const auto profile{ pane->GetProfile() })
|
||||
{
|
||||
const auto found{ profileGuidSettingsMap.find(profile.Guid()) };
|
||||
// GH#2455: If there are any panes with controls that had been
|
||||
// initialized with a Profile that no longer exists in our list of
|
||||
// profiles, we'll leave it unmodified. The profile doesn't exist
|
||||
// anymore, so we can't possibly update its settings.
|
||||
if (found != profileGuidSettingsMap.cend())
|
||||
{
|
||||
auto& pair{ found->second };
|
||||
if (!pair.second)
|
||||
{
|
||||
pair.second = TerminalSettings::CreateWithProfile(_settings, pair.first, *_bindings);
|
||||
}
|
||||
pane->UpdateSettings(pair.second, pair.first);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Update the icon of the tab for the currently focused profile in that tab.
|
||||
// Only do this for TerminalTabs. Other types of tabs won't have multiple panes
|
||||
@@ -3305,6 +3324,10 @@ namespace winrt::TerminalApp::implementation
|
||||
// Force the TerminalTab to re-grab its currently active control's title.
|
||||
terminalTab->UpdateTitle();
|
||||
}
|
||||
else if (auto settingsTab = tab.try_as<TerminalApp::SettingsTab>())
|
||||
{
|
||||
settingsTab.UpdateSettings(_settings);
|
||||
}
|
||||
|
||||
auto tabImpl{ winrt::get_self<TabBase>(tab) };
|
||||
tabImpl->SetActionMap(_settings.ActionMap());
|
||||
@@ -3845,39 +3868,6 @@ namespace winrt::TerminalApp::implementation
|
||||
CATCH_RETURN()
|
||||
}
|
||||
|
||||
TerminalApp::IPaneContent TerminalPage::_makeSettingsContent()
|
||||
{
|
||||
if (auto app{ winrt::Windows::UI::Xaml::Application::Current().try_as<winrt::TerminalApp::App>() })
|
||||
{
|
||||
if (auto appPrivate{ winrt::get_self<implementation::App>(app) })
|
||||
{
|
||||
// Lazily load the Settings UI components so that we don't do it on startup.
|
||||
appPrivate->PrepareForSettingsUI();
|
||||
}
|
||||
}
|
||||
|
||||
// Create the SUI pane content
|
||||
auto settingsContent{ winrt::make_self<SettingsPaneContent>(_settings) };
|
||||
auto sui = settingsContent->SettingsUI();
|
||||
|
||||
if (_hostingHwnd)
|
||||
{
|
||||
sui.SetHostingWindow(reinterpret_cast<uint64_t>(*_hostingHwnd));
|
||||
}
|
||||
|
||||
// GH#8767 - let unhandled keys in the SUI try to run commands too.
|
||||
sui.KeyDown({ get_weak(), &TerminalPage::_KeyDownHandler });
|
||||
|
||||
sui.OpenJson([weakThis{ get_weak() }](auto&& /*s*/, winrt::Microsoft::Terminal::Settings::Model::SettingsTarget e) {
|
||||
if (auto page{ weakThis.get() })
|
||||
{
|
||||
page->_LaunchSettings(e);
|
||||
}
|
||||
});
|
||||
|
||||
return *settingsContent;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Creates a settings UI tab and focuses it. If there's already a settings UI tab open,
|
||||
// just focus the existing one.
|
||||
@@ -3890,9 +3880,79 @@ namespace winrt::TerminalApp::implementation
|
||||
// If we're holding the settings tab's switch command, don't create a new one, switch to the existing one.
|
||||
if (!_settingsTab)
|
||||
{
|
||||
// Create the tab
|
||||
auto resultPane = std::make_shared<Pane>(_makeSettingsContent());
|
||||
_settingsTab = _CreateNewTabFromPane(resultPane);
|
||||
if (auto app{ winrt::Windows::UI::Xaml::Application::Current().try_as<winrt::TerminalApp::App>() })
|
||||
{
|
||||
if (auto appPrivate{ winrt::get_self<implementation::App>(app) })
|
||||
{
|
||||
// Lazily load the Settings UI components so that we don't do it on startup.
|
||||
appPrivate->PrepareForSettingsUI();
|
||||
}
|
||||
}
|
||||
|
||||
winrt::Microsoft::Terminal::Settings::Editor::MainPage sui{ _settings };
|
||||
if (_hostingHwnd)
|
||||
{
|
||||
sui.SetHostingWindow(reinterpret_cast<uint64_t>(*_hostingHwnd));
|
||||
}
|
||||
|
||||
// GH#8767 - let unhandled keys in the SUI try to run commands too.
|
||||
sui.KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
|
||||
sui.OpenJson([weakThis{ get_weak() }](auto&& /*s*/, winrt::Microsoft::Terminal::Settings::Model::SettingsTarget e) {
|
||||
if (auto page{ weakThis.get() })
|
||||
{
|
||||
page->_LaunchSettings(e);
|
||||
}
|
||||
});
|
||||
|
||||
auto newTabImpl = winrt::make_self<SettingsTab>(sui, _settings.GlobalSettings().CurrentTheme().RequestedTheme());
|
||||
|
||||
// Add the new tab to the list of our tabs.
|
||||
_tabs.Append(*newTabImpl);
|
||||
_mruTabs.Append(*newTabImpl);
|
||||
|
||||
newTabImpl->SetDispatch(*_actionDispatch);
|
||||
newTabImpl->SetActionMap(_settings.ActionMap());
|
||||
|
||||
// Give the tab its index in the _tabs vector so it can manage its own SwitchToTab command.
|
||||
_UpdateTabIndices();
|
||||
|
||||
// Don't capture a strong ref to the tab. If the tab is removed as this
|
||||
// is called, we don't really care anymore about handling the event.
|
||||
auto weakTab = make_weak(newTabImpl);
|
||||
|
||||
auto tabViewItem = newTabImpl->TabViewItem();
|
||||
_tabView.TabItems().Append(tabViewItem);
|
||||
|
||||
tabViewItem.PointerPressed({ this, &TerminalPage::_OnTabClick });
|
||||
|
||||
// When the tab requests close, try to close it (prompt for approval, if required)
|
||||
newTabImpl->CloseRequested([weakTab, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
||||
if (page && tab)
|
||||
{
|
||||
page->_HandleCloseTabRequested(*tab);
|
||||
}
|
||||
});
|
||||
|
||||
// When the tab is closed, remove it from our list of tabs.
|
||||
newTabImpl->Closed([weakTab, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
|
||||
const auto page = weakThis.get();
|
||||
const auto tab = weakTab.get();
|
||||
|
||||
if (page && tab)
|
||||
{
|
||||
page->_RemoveTab(*tab);
|
||||
}
|
||||
});
|
||||
|
||||
_settingsTab = *newTabImpl;
|
||||
|
||||
// This kicks off TabView::SelectionChanged, in response to which
|
||||
// we'll attach the terminal's Xaml control to the Xaml root.
|
||||
_tabView.SelectedItem(tabViewItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4511,15 +4571,13 @@ namespace winrt::TerminalApp::implementation
|
||||
til::color bgColor = backgroundSolidBrush.Color();
|
||||
|
||||
Media::Brush terminalBrush{ nullptr };
|
||||
if (const auto tab{ _GetFocusedTabImpl() })
|
||||
if (const auto& control{ _GetActiveControl() })
|
||||
{
|
||||
if (const auto& pane{ tab->GetActivePane() })
|
||||
{
|
||||
if (const auto& lastContent{ pane->GetLastFocusedContent() })
|
||||
{
|
||||
terminalBrush = lastContent.BackgroundBrush();
|
||||
}
|
||||
}
|
||||
terminalBrush = control.BackgroundBrush();
|
||||
}
|
||||
else if (const auto& settingsTab{ _GetFocusedTab().try_as<TerminalApp::SettingsTab>() })
|
||||
{
|
||||
terminalBrush = settingsTab.Content().try_as<Settings::Editor::MainPage>().BackgroundBrush();
|
||||
}
|
||||
|
||||
if (_settings.GlobalSettings().UseAcrylicInTabRow())
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#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);
|
||||
@@ -80,13 +79,6 @@ 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:
|
||||
@@ -194,8 +186,6 @@ 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);
|
||||
|
||||
@@ -223,7 +213,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
void _UpdateTabIndices();
|
||||
|
||||
TerminalApp::TerminalTab _settingsTab{ nullptr };
|
||||
TerminalApp::SettingsTab _settingsTab{ nullptr };
|
||||
|
||||
bool _isInFocusMode{ false };
|
||||
bool _isFullscreen{ false };
|
||||
@@ -270,8 +260,6 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
TerminalApp::ContentManager _manager{ nullptr };
|
||||
|
||||
TerminalApp::TerminalSettingsCache _terminalSettingsCache{ nullptr };
|
||||
|
||||
struct StashedDragData
|
||||
{
|
||||
winrt::com_ptr<winrt::TerminalApp::implementation::TabBase> draggedTab{ nullptr };
|
||||
@@ -302,8 +290,8 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _CreateNewTabFlyoutProfile(const Microsoft::Terminal::Settings::Model::Profile profile, int profileIndex);
|
||||
|
||||
void _OpenNewTabDropdown();
|
||||
HRESULT _OpenNewTab(const Microsoft::Terminal::Settings::Model::INewContentArgs& newContentArgs);
|
||||
TerminalApp::TerminalTab _CreateNewTabFromPane(std::shared_ptr<Pane> pane, uint32_t insertPosition = -1);
|
||||
HRESULT _OpenNewTab(const Microsoft::Terminal::Settings::Model::NewTerminalArgs& newTerminalArgs);
|
||||
void _CreateNewTabFromPane(std::shared_ptr<Pane> pane, uint32_t insertPosition = -1);
|
||||
|
||||
std::wstring _evaluatePathForCwd(std::wstring_view path);
|
||||
|
||||
@@ -311,7 +299,7 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection _duplicateConnectionForRestart(const TerminalApp::TerminalPaneContent& paneContent);
|
||||
void _restartPaneConnection(const TerminalApp::TerminalPaneContent&, const winrt::Windows::Foundation::IInspectable&);
|
||||
|
||||
winrt::fire_and_forget _OpenNewWindow(const Microsoft::Terminal::Settings::Model::INewContentArgs newContentArgs);
|
||||
winrt::fire_and_forget _OpenNewWindow(const Microsoft::Terminal::Settings::Model::NewTerminalArgs newTerminalArgs);
|
||||
|
||||
void _OpenNewTerminalViaDropdown(const Microsoft::Terminal::Settings::Model::NewTerminalArgs newTerminalArgs);
|
||||
|
||||
@@ -404,6 +392,7 @@ namespace winrt::TerminalApp::implementation
|
||||
void _ScrollToBufferEdge(ScrollDirection scrollDirection);
|
||||
void _SetAcceleratorForMenuItem(Windows::UI::Xaml::Controls::MenuFlyoutItem& menuItem, const winrt::Microsoft::Terminal::Control::KeyChord& keyChord);
|
||||
|
||||
winrt::fire_and_forget _CopyToClipboardHandler(const IInspectable sender, const winrt::Microsoft::Terminal::Control::CopyToClipboardEventArgs copiedData);
|
||||
winrt::fire_and_forget _PasteFromClipboardHandler(const IInspectable sender,
|
||||
const Microsoft::Terminal::Control::PasteFromClipboardEventArgs eventArgs);
|
||||
|
||||
@@ -444,11 +433,7 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::Microsoft::Terminal::Control::TermControl _SetupControl(const winrt::Microsoft::Terminal::Control::TermControl& term);
|
||||
winrt::Microsoft::Terminal::Control::TermControl _AttachControlToContent(const uint64_t& contentGuid);
|
||||
|
||||
TerminalApp::IPaneContent _makeSettingsContent();
|
||||
std::shared_ptr<Pane> _MakeTerminalPane(const Microsoft::Terminal::Settings::Model::NewTerminalArgs& newTerminalArgs = nullptr,
|
||||
const winrt::TerminalApp::TabBase& sourceTab = nullptr,
|
||||
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection existingConnection = nullptr);
|
||||
std::shared_ptr<Pane> _MakePane(const Microsoft::Terminal::Settings::Model::INewContentArgs& newContentArgs = nullptr,
|
||||
std::shared_ptr<Pane> _MakePane(const Microsoft::Terminal::Settings::Model::NewTerminalArgs& newTerminalArgs = nullptr,
|
||||
const winrt::TerminalApp::TabBase& sourceTab = nullptr,
|
||||
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection existingConnection = nullptr);
|
||||
|
||||
|
||||
@@ -51,11 +51,6 @@ 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);
|
||||
@@ -103,7 +98,5 @@ namespace TerminalApp
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, RequestMoveContentArgs> RequestMoveContent;
|
||||
event Windows.Foundation.TypedEventHandler<Object, RequestReceiveContentArgs> RequestReceiveContent;
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, LaunchPositionRequest> RequestLaunchPosition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,8 @@ using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
TerminalPaneContent::TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
|
||||
const TerminalApp::TerminalSettingsCache& cache,
|
||||
const winrt::Microsoft::Terminal::Control::TermControl& control) :
|
||||
_control{ control },
|
||||
_cache{ cache },
|
||||
_profile{ profile }
|
||||
{
|
||||
_setupControlEvents();
|
||||
@@ -82,17 +80,7 @@ namespace winrt::TerminalApp::implementation
|
||||
CloseRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
winrt::hstring TerminalPaneContent::Icon() const
|
||||
{
|
||||
return _profile.EvaluatedIcon();
|
||||
}
|
||||
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> TerminalPaneContent::TabColor() const noexcept
|
||||
{
|
||||
return _control.TabColor();
|
||||
}
|
||||
|
||||
INewContentArgs TerminalPaneContent::GetNewTerminalArgs(const BuildStartupKind kind) const
|
||||
NewTerminalArgs TerminalPaneContent::GetNewTerminalArgs(const BuildStartupKind kind) const
|
||||
{
|
||||
NewTerminalArgs args{};
|
||||
const auto& controlSettings = _control.Settings();
|
||||
@@ -340,12 +328,11 @@ namespace winrt::TerminalApp::implementation
|
||||
RestartTerminalRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
void TerminalPaneContent::UpdateSettings(const CascadiaSettings& /*settings*/)
|
||||
void TerminalPaneContent::UpdateSettings(const TerminalSettingsCreateResult& settings,
|
||||
const Profile& profile)
|
||||
{
|
||||
if (const auto& settings{ _cache.TryLookup(_profile) })
|
||||
{
|
||||
_control.UpdateControlSettings(settings.DefaultSettings(), settings.UnfocusedSettings());
|
||||
}
|
||||
_profile = profile;
|
||||
_control.UpdateControlSettings(settings.DefaultSettings(), settings.UnfocusedSettings());
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -357,11 +344,6 @@ namespace winrt::TerminalApp::implementation
|
||||
_isDefTermSession = true;
|
||||
}
|
||||
|
||||
winrt::Windows::UI::Xaml::Media::Brush TerminalPaneContent::BackgroundBrush()
|
||||
{
|
||||
return _control.BackgroundBrush();
|
||||
}
|
||||
|
||||
float TerminalPaneContent::SnapDownToGrid(const TerminalApp::PaneSnapDirection direction, const float sizeToSnap)
|
||||
{
|
||||
return _control.SnapDimensionToGrid(direction == PaneSnapDirection::Width, sizeToSnap);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#pragma once
|
||||
#include "TerminalPaneContent.g.h"
|
||||
#include "BellEventArgs.g.h"
|
||||
#include "BasicPaneEvents.h"
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
@@ -17,10 +16,9 @@ namespace winrt::TerminalApp::implementation
|
||||
til::property<bool> FlashTaskbar;
|
||||
};
|
||||
|
||||
struct TerminalPaneContent : TerminalPaneContentT<TerminalPaneContent>, BasicPaneEvents
|
||||
struct TerminalPaneContent : TerminalPaneContentT<TerminalPaneContent>
|
||||
{
|
||||
TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
|
||||
const TerminalApp::TerminalSettingsCache& cache,
|
||||
const winrt::Microsoft::Terminal::Control::TermControl& control);
|
||||
|
||||
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
|
||||
@@ -29,9 +27,10 @@ namespace winrt::TerminalApp::implementation
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
|
||||
void Close();
|
||||
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult& settings,
|
||||
const winrt::Microsoft::Terminal::Settings::Model::Profile& profile);
|
||||
|
||||
void MarkAsDefterm();
|
||||
|
||||
@@ -44,22 +43,24 @@ namespace winrt::TerminalApp::implementation
|
||||
uint64_t TaskbarState() { return _control.TaskbarState(); }
|
||||
uint64_t TaskbarProgress() { return _control.TaskbarProgress(); }
|
||||
bool ReadOnly() { return _control.ReadOnly(); }
|
||||
winrt::hstring Icon() const;
|
||||
Windows::Foundation::IReference<winrt::Windows::UI::Color> TabColor() const noexcept;
|
||||
winrt::Windows::UI::Xaml::Media::Brush BackgroundBrush();
|
||||
|
||||
float SnapDownToGrid(const TerminalApp::PaneSnapDirection direction, const float sizeToSnap);
|
||||
Windows::Foundation::Size GridUnitSize();
|
||||
|
||||
til::typed_event<TerminalApp::TerminalPaneContent, winrt::Windows::Foundation::IInspectable> RestartTerminalRequested;
|
||||
|
||||
// See BasicPaneEvents for most generic event definitions
|
||||
til::typed_event<> ConnectionStateChanged;
|
||||
til::typed_event<IPaneContent> CloseRequested;
|
||||
til::typed_event<IPaneContent, winrt::TerminalApp::BellEventArgs> BellRequested;
|
||||
til::typed_event<IPaneContent> TitleChanged;
|
||||
til::typed_event<IPaneContent> TabColorChanged;
|
||||
til::typed_event<IPaneContent> TaskbarProgressChanged;
|
||||
til::typed_event<IPaneContent> ReadOnlyChanged;
|
||||
til::typed_event<IPaneContent> FocusRequested;
|
||||
|
||||
private:
|
||||
winrt::Microsoft::Terminal::Control::TermControl _control{ nullptr };
|
||||
winrt::Microsoft::Terminal::TerminalConnection::ConnectionState _connectionState{ winrt::Microsoft::Terminal::TerminalConnection::ConnectionState::NotConnected };
|
||||
winrt::Microsoft::Terminal::Settings::Model::Profile _profile{ nullptr };
|
||||
TerminalApp::TerminalSettingsCache _cache{ nullptr };
|
||||
bool _isDefTermSession{ false };
|
||||
|
||||
winrt::Windows::Media::Playback::MediaPlayer _bellPlayer{ nullptr };
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import "IPaneContent.idl";
|
||||
import "TerminalSettingsCache.idl";
|
||||
import "FilteredCommand.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
@@ -11,27 +9,13 @@ namespace TerminalApp
|
||||
{
|
||||
Microsoft.Terminal.Control.TermControl GetTermControl();
|
||||
|
||||
void UpdateSettings(const Microsoft.Terminal.Settings.Model.TerminalSettingsCreateResult settings,
|
||||
const Microsoft.Terminal.Settings.Model.Profile profile);
|
||||
|
||||
void MarkAsDefterm();
|
||||
|
||||
Microsoft.Terminal.Settings.Model.Profile GetProfile();
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<TerminalPaneContent, Object> RestartTerminalRequested;
|
||||
}
|
||||
|
||||
[default_interface] runtimeclass FilteredTask : TerminalApp.FilteredCommand
|
||||
{
|
||||
String Input{ get; };
|
||||
Windows.Foundation.Collections.IObservableVector<FilteredTask> Children { get; };
|
||||
Boolean HasChildren { get; };
|
||||
Windows.UI.Xaml.Visibility Visibility { get; };
|
||||
}
|
||||
|
||||
[default_interface] runtimeclass TasksPaneContent : Windows.UI.Xaml.Controls.UserControl, IPaneContent
|
||||
{
|
||||
TasksPaneContent();
|
||||
void SetLastActiveControl(Microsoft.Terminal.Control.TermControl control);
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, Microsoft.Terminal.Settings.Model.Command> DispatchCommandRequested;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include "TerminalSettingsCache.h"
|
||||
#include "TerminalSettingsCache.g.cpp"
|
||||
|
||||
namespace winrt
|
||||
{
|
||||
namespace MUX = Microsoft::UI::Xaml;
|
||||
namespace WUX = Windows::UI::Xaml;
|
||||
namespace MTSM = Microsoft::Terminal::Settings::Model;
|
||||
}
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
TerminalSettingsCache::TerminalSettingsCache(const MTSM::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings)
|
||||
{
|
||||
Reset(settings, bindings);
|
||||
}
|
||||
|
||||
MTSM::TerminalSettingsCreateResult TerminalSettingsCache::TryLookup(const MTSM::Profile& profile)
|
||||
{
|
||||
const auto found{ profileGuidSettingsMap.find(profile.Guid()) };
|
||||
// GH#2455: If there are any panes with controls that had been
|
||||
// initialized with a Profile that no longer exists in our list of
|
||||
// profiles, we'll leave it unmodified. The profile doesn't exist
|
||||
// anymore, so we can't possibly update its settings.
|
||||
if (found != profileGuidSettingsMap.cend())
|
||||
{
|
||||
auto& pair{ found->second };
|
||||
if (!pair.second)
|
||||
{
|
||||
pair.second = MTSM::TerminalSettings::CreateWithProfile(_settings, pair.first, _bindings);
|
||||
}
|
||||
return pair.second;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void TerminalSettingsCache::Reset(const MTSM::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings)
|
||||
{
|
||||
_settings = settings;
|
||||
_bindings = bindings;
|
||||
|
||||
// Mapping by GUID isn't _excellent_ because the defaults profile doesn't have a stable GUID; however,
|
||||
// when we stabilize its guid this will become fully safe.
|
||||
const auto profileDefaults{ _settings.ProfileDefaults() };
|
||||
const auto allProfiles{ _settings.AllProfiles() };
|
||||
profileGuidSettingsMap.clear();
|
||||
profileGuidSettingsMap.reserve(allProfiles.Size() + 1);
|
||||
|
||||
// Include the Defaults profile for consideration
|
||||
profileGuidSettingsMap.insert_or_assign(profileDefaults.Guid(), std::pair{ profileDefaults, nullptr });
|
||||
for (const auto& newProfile : allProfiles)
|
||||
{
|
||||
// Avoid creating a TerminalSettings right now. They're not totally cheap, and we suspect that users with many
|
||||
// panes may not be using all of their profiles at the same time. Lazy evaluation is king!
|
||||
profileGuidSettingsMap.insert_or_assign(newProfile.Guid(), std::pair{ newProfile, nullptr });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*++
|
||||
Copyright (c) Microsoft Corporation
|
||||
Licensed under the MIT license.
|
||||
|
||||
Class Name:
|
||||
- TerminalSettingsCache.h
|
||||
|
||||
Abstract:
|
||||
- This is a helper class used as we update the settings for panes. This class
|
||||
contains a single map of guid -> TerminalSettings, so that as we update all
|
||||
the panes during a settings reload, we only need to create a TerminalSettings
|
||||
once per profile.
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "TerminalSettingsCache.g.h"
|
||||
#include <inc/cppwinrt_utils.h>
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
class TerminalSettingsCache : public TerminalSettingsCacheT<TerminalSettingsCache>
|
||||
{
|
||||
public:
|
||||
TerminalSettingsCache(const Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings);
|
||||
Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult TryLookup(const Microsoft::Terminal::Settings::Model::Profile& profile);
|
||||
void Reset(const Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings);
|
||||
|
||||
private:
|
||||
Microsoft::Terminal::Settings::Model::CascadiaSettings _settings{ nullptr };
|
||||
TerminalApp::AppKeyBindings _bindings{ nullptr };
|
||||
std::unordered_map<winrt::guid, std::pair<Microsoft::Terminal::Settings::Model::Profile, Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult>> profileGuidSettingsMap;
|
||||
};
|
||||
}
|
||||
|
||||
namespace winrt::TerminalApp::factory_implementation
|
||||
{
|
||||
BASIC_FACTORY(TerminalSettingsCache);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import "AppKeyBindings.idl";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
namespace TerminalApp
|
||||
{
|
||||
[default_interface] runtimeclass TerminalSettingsCache
|
||||
{
|
||||
TerminalSettingsCache(Microsoft.Terminal.Settings.Model.CascadiaSettings settings, AppKeyBindings bindings);
|
||||
Microsoft.Terminal.Settings.Model.TerminalSettingsCreateResult TryLookup(Microsoft.Terminal.Settings.Model.Profile profile);
|
||||
void Reset(Microsoft.Terminal.Settings.Model.CascadiaSettings settings, AppKeyBindings bindings);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <LibraryResources.h>
|
||||
#include "ColorPickupFlyout.h"
|
||||
#include "TerminalTab.h"
|
||||
#include "SettingsPaneContent.h"
|
||||
#include "TerminalTab.g.cpp"
|
||||
#include "Utils.h"
|
||||
#include "ColorHelper.h"
|
||||
@@ -267,18 +266,12 @@ namespace winrt::TerminalApp::implementation
|
||||
// of the settings that apply to all tabs.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalTab::UpdateSettings(const CascadiaSettings& settings)
|
||||
void TerminalTab::UpdateSettings()
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
// The tabWidthMode may have changed, update the header control accordingly
|
||||
_UpdateHeaderControlMaxWidth();
|
||||
|
||||
// Update the settings on all our panes.
|
||||
_rootPane->WalkTree([&](auto pane) {
|
||||
pane->UpdateSettings(settings);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -287,7 +280,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - iconPath: The new path string to use as the IconPath for our TabViewItem
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalTab::UpdateIcon(const winrt::hstring& iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle)
|
||||
void TerminalTab::UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle)
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
@@ -390,7 +383,7 @@ namespace winrt::TerminalApp::implementation
|
||||
return RS_(L"MultiplePanes");
|
||||
}
|
||||
const auto activeContent = GetActiveContent();
|
||||
return activeContent ? activeContent.Title() : winrt::hstring{};
|
||||
return activeContent ? activeContent.Title() : L"";
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -449,23 +442,9 @@ 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);
|
||||
newTabAction.Args(NewTabArgs{ newContentArgs });
|
||||
NewTabArgs newTabArgs{ state.firstPane->GetTerminalArgsForPane(kind) };
|
||||
newTabAction.Args(newTabArgs);
|
||||
|
||||
state.args.emplace(state.args.begin(), std::move(newTabAction));
|
||||
}
|
||||
@@ -1249,18 +1228,6 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Raise our own ActivePaneChanged event.
|
||||
ActivePaneChanged.raise();
|
||||
|
||||
const auto content{ pane->GetContent() };
|
||||
if (const auto termContent{ content.try_as<winrt::TerminalApp::TerminalPaneContent>() })
|
||||
{
|
||||
const auto& termControl{ termContent.GetTermControl() };
|
||||
_rootPane->WalkTree([termControl](const auto& p) {
|
||||
if (const auto& taskPane{ p->GetContent().try_as<TasksPaneContent>() })
|
||||
{
|
||||
taskPane.SetLastActiveControl(termControl);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1398,7 +1365,7 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
// "Change tab color..."
|
||||
// "Color..."
|
||||
Controls::MenuFlyoutItem chooseColorMenuItem;
|
||||
{
|
||||
Controls::FontIcon colorPickSymbol;
|
||||
@@ -1417,7 +1384,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem renameTabMenuItem;
|
||||
{
|
||||
// "Rename tab"
|
||||
// "Rename Tab"
|
||||
Controls::FontIcon renameTabSymbol;
|
||||
renameTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
renameTabSymbol.Glyph(L"\xE8AC"); // Rename
|
||||
@@ -1434,7 +1401,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem duplicateTabMenuItem;
|
||||
{
|
||||
// "Duplicate tab"
|
||||
// "Duplicate Tab"
|
||||
Controls::FontIcon duplicateTabSymbol;
|
||||
duplicateTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
duplicateTabSymbol.Glyph(L"\xF5ED");
|
||||
@@ -1451,7 +1418,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem splitTabMenuItem;
|
||||
{
|
||||
// "Split tab"
|
||||
// "Split Tab"
|
||||
Controls::FontIcon splitTabSymbol;
|
||||
splitTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
splitTabSymbol.Glyph(L"\xF246"); // ViewDashboard
|
||||
@@ -1468,7 +1435,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem moveTabToNewWindowMenuItem;
|
||||
{
|
||||
// "Move tab to new window"
|
||||
// "Move Tab to New Window"
|
||||
Controls::FontIcon moveTabToNewWindowTabSymbol;
|
||||
moveTabToNewWindowTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
moveTabToNewWindowTabSymbol.Glyph(L"\xE8A7");
|
||||
@@ -1485,7 +1452,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem closePaneMenuItem = _closePaneMenuItem;
|
||||
{
|
||||
// "Close pane"
|
||||
// "Close Pane"
|
||||
closePaneMenuItem.Click({ get_weak(), &TerminalTab::_closePaneClicked });
|
||||
closePaneMenuItem.Text(RS_(L"ClosePaneText"));
|
||||
|
||||
@@ -1497,7 +1464,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem exportTabMenuItem;
|
||||
{
|
||||
// "Export tab"
|
||||
// "Export Tab"
|
||||
Controls::FontIcon exportTabSymbol;
|
||||
exportTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
exportTabSymbol.Glyph(L"\xE74E"); // Save
|
||||
@@ -1531,7 +1498,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Controls::MenuFlyoutItem restartConnectionMenuItem = _restartConnectionMenuItem;
|
||||
{
|
||||
// "Restart connection"
|
||||
// "Restart Connection"
|
||||
Controls::FontIcon restartConnectionSymbol;
|
||||
restartConnectionSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
|
||||
restartConnectionSymbol.Glyph(L"\xE72C");
|
||||
@@ -1599,12 +1566,12 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
ASSERT_UI_THREAD();
|
||||
|
||||
std::optional<winrt::Windows::UI::Color> contentTabColor;
|
||||
if (const auto& content{ GetActiveContent() })
|
||||
std::optional<winrt::Windows::UI::Color> controlTabColor;
|
||||
if (const auto& control = GetActiveTerminalControl())
|
||||
{
|
||||
if (const auto color = content.TabColor())
|
||||
if (const auto color = control.TabColor())
|
||||
{
|
||||
contentTabColor = color.Value();
|
||||
controlTabColor = color.Value();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1614,7 +1581,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Color | | Set by
|
||||
// -------------------- | -- | --
|
||||
// Runtime Color | _optional_ | Color Picker / `setTabColor` action
|
||||
// Content Tab Color | _optional_ | Profile's `tabColor`, or a color set by VT (whatever the tab's content wants)
|
||||
// Control Tab Color | _optional_ | Profile's `tabColor`, or a color set by VT
|
||||
// Theme Tab Background | _optional_ | `tab.backgroundColor` in the theme (handled in _RecalculateAndApplyTabColor)
|
||||
// Tab Default Color | **default** | TabView in XAML
|
||||
//
|
||||
@@ -1623,7 +1590,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// tabview color" (and clear out any colors we've set).
|
||||
|
||||
return til::coalesce(_runtimeTabColor,
|
||||
contentTabColor,
|
||||
controlTabColor,
|
||||
std::optional<Windows::UI::Color>(std::nullopt));
|
||||
}
|
||||
|
||||
@@ -1662,7 +1629,7 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::Windows::UI::Xaml::Media::Brush TerminalTab::_BackgroundBrush()
|
||||
{
|
||||
Media::Brush terminalBrush{ nullptr };
|
||||
if (const auto& c{ GetActiveContent() })
|
||||
if (const auto& c{ GetActiveTerminalControl() })
|
||||
{
|
||||
terminalBrush = c.BackgroundBrush();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace winrt::TerminalApp::implementation
|
||||
std::shared_ptr<Pane> newPane);
|
||||
|
||||
void ToggleSplitOrientation();
|
||||
void UpdateIcon(const winrt::hstring& iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle);
|
||||
void UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle);
|
||||
void HideIcon(const bool hide);
|
||||
|
||||
void ShowBellIndicator(const bool show);
|
||||
@@ -58,7 +58,7 @@ namespace winrt::TerminalApp::implementation
|
||||
bool SwapPane(const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction);
|
||||
bool FocusPane(const uint32_t id);
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
void UpdateSettings();
|
||||
void UpdateTitle();
|
||||
|
||||
void Shutdown() override;
|
||||
|
||||
@@ -562,21 +562,9 @@ 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();
|
||||
@@ -614,7 +602,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() && !focusMode)
|
||||
if (_settings.GlobalSettings().ShowTabsInTitlebar())
|
||||
{
|
||||
// In the past, we used to actually instantiate a TitlebarControl
|
||||
// and use Measure() to determine the DesiredSize of the control, to
|
||||
@@ -632,7 +620,7 @@ namespace winrt::TerminalApp::implementation
|
||||
static constexpr auto titlebarHeight = 40;
|
||||
proposedSize.Height += (titlebarHeight)*scale;
|
||||
}
|
||||
else if (_settings.GlobalSettings().AlwaysShowTabs() && !focusMode)
|
||||
else if (_settings.GlobalSettings().AlwaysShowTabs())
|
||||
{
|
||||
// Same comment as above, but with a TabRowControl.
|
||||
//
|
||||
@@ -1250,7 +1238,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Create the equivalent NewTab action.
|
||||
const auto newAction = Settings::Model::ActionAndArgs{ Settings::Model::ShortcutAction::NewTab,
|
||||
Settings::Model::NewTabArgs(firstAction.Args() ?
|
||||
firstAction.Args().try_as<Settings::Model::SplitPaneArgs>().ContentArgs() :
|
||||
firstAction.Args().try_as<Settings::Model::SplitPaneArgs>().TerminalArgs() :
|
||||
nullptr) };
|
||||
args.SetAt(0, newAction);
|
||||
}
|
||||
|
||||
@@ -231,8 +231,6 @@ 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
|
||||
|
||||
@@ -137,7 +137,6 @@ 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);
|
||||
|
||||
@@ -44,12 +44,12 @@ namespace winrt::TerminalApp::implementation
|
||||
});
|
||||
}
|
||||
|
||||
float TitlebarControl::CaptionButtonWidth()
|
||||
double 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
|
||||
const auto minMaxCloseWidth = MinMaxCloseControl().ActualWidth();
|
||||
return static_cast<float>(minMaxCloseWidth) / 3.0f;
|
||||
static auto width{ MinMaxCloseControl().ActualWidth() / 3.0 };
|
||||
return width;
|
||||
}
|
||||
|
||||
IInspectable TitlebarControl::Content()
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace winrt::TerminalApp::implementation
|
||||
void PressButton(CaptionButton button);
|
||||
winrt::fire_and_forget ClickButton(CaptionButton button);
|
||||
void ReleaseButtons();
|
||||
float CaptionButtonWidth();
|
||||
double CaptionButtonWidth();
|
||||
|
||||
IInspectable Content();
|
||||
void Content(IInspectable content);
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace TerminalApp
|
||||
void PressButton(CaptionButton button);
|
||||
void ClickButton(CaptionButton button);
|
||||
void ReleaseButtons();
|
||||
Single CaptionButtonWidth { get; };
|
||||
Double CaptionButtonWidth { get; };
|
||||
|
||||
IInspectable Content;
|
||||
Windows.UI.Xaml.Controls.Border DragBar { get; };
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<ClInclude Include="../TabRowControl.h" />
|
||||
<ClInclude Include="../App.h" />
|
||||
<ClInclude Include="../TerminalTab.h" />
|
||||
<ClInclude Include="../SettingsTab.h" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Cpp Files ======================== -->
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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=2023-02-01-preview", _resourceUri) };
|
||||
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2020-04-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=2023-02-01-preview", _resourceUri) };
|
||||
auto uri{ fmt::format(L"{}providers/Microsoft.Portal/consoles/default?api-version=2020-04-01-preview", _resourceUri) };
|
||||
|
||||
WWH::HttpStringContent content{
|
||||
LR"-({"properties": {"osType": "linux"}})-",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,7 +100,6 @@ 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);
|
||||
|
||||
@@ -114,12 +113,13 @@ 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(std::wstring_view wstr);
|
||||
void SendInput(const winrt::hstring& 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 float adjustment);
|
||||
void AdjustOpacity(const double adjustment);
|
||||
void ResumeRendering();
|
||||
|
||||
void SetHoveredCell(Core::Point terminalPosition);
|
||||
@@ -219,11 +219,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
void SetSelectionAnchor(const til::point position);
|
||||
void SetEndSelectionPoint(const til::point position);
|
||||
|
||||
SearchResults Search(const std::wstring_view& text, bool goForward, bool caseSensitive, bool reset);
|
||||
const std::vector<til::point_span>& SearchResultRows() const noexcept;
|
||||
void Search(const winrt::hstring& text, const bool goForward, const bool caseSensitive);
|
||||
void ClearSearch();
|
||||
void SnapSearchResultToSelection(bool snap) noexcept;
|
||||
bool SnapSearchResultToSelection() const noexcept;
|
||||
|
||||
Windows::Foundation::Collections::IVector<int32_t> SearchResultRows();
|
||||
|
||||
void LeftClickOnTerminal(const til::point terminalPosition,
|
||||
const int numberOfClicks,
|
||||
@@ -242,7 +241,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
hstring ReadEntireBuffer() const;
|
||||
Control::CommandHistoryContext CommandHistory() const;
|
||||
|
||||
void AdjustOpacity(const float opacity, const bool relative);
|
||||
static bool IsVintageOpacityAvailable() noexcept;
|
||||
|
||||
void AdjustOpacity(const double opacity, const bool relative);
|
||||
|
||||
void WindowVisibilityChanged(const bool showOrHide);
|
||||
|
||||
@@ -257,19 +258,21 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
bool ShouldShowSelectCommand();
|
||||
bool ShouldShowSelectOutput();
|
||||
|
||||
RUNTIME_SETTING(float, Opacity, _settings->Opacity());
|
||||
RUNTIME_SETTING(float, FocusedOpacity, FocusedAppearance().Opacity());
|
||||
RUNTIME_SETTING(double, Opacity, _settings->Opacity());
|
||||
RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity());
|
||||
RUNTIME_SETTING(bool, UseAcrylic, _settings->UseAcrylic());
|
||||
|
||||
// -------------------------------- WinRT Events ---------------------------------
|
||||
// clang-format off
|
||||
til::typed_event<IInspectable, Control::FontSizeChangedArgs> FontSizeChanged;
|
||||
|
||||
til::typed_event<IInspectable, Control::CopyToClipboardEventArgs> CopyToClipboard;
|
||||
til::typed_event<IInspectable, Control::TitleChangedEventArgs> TitleChanged;
|
||||
til::typed_event<> WarningBell;
|
||||
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;
|
||||
@@ -278,7 +281,8 @@ 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<> OutputIdle;
|
||||
til::typed_event<> ReceivedOutput;
|
||||
til::typed_event<IInspectable, Control::FoundResultsArgs> FoundMatch;
|
||||
til::typed_event<IInspectable, Control::ShowWindowArgs> ShowWindowChanged;
|
||||
til::typed_event<IInspectable, Control::UpdateSelectionMarkersEventArgs> UpdateSelectionMarkers;
|
||||
til::typed_event<IInspectable, Control::OpenHyperlinkEventArgs> OpenHyperlink;
|
||||
@@ -293,7 +297,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
private:
|
||||
struct SharedState
|
||||
{
|
||||
std::unique_ptr<til::debounced_func_trailing<>> outputIdle;
|
||||
std::shared_ptr<ThrottledFuncTrailing<>> tsfTryRedrawCanvas;
|
||||
std::unique_ptr<til::throttled_func_trailing<>> updatePatternLocations;
|
||||
std::shared_ptr<ThrottledFuncTrailing<Control::ScrollPositionChangedArgs>> updateScrollBar;
|
||||
};
|
||||
|
||||
@@ -317,12 +322,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;
|
||||
@@ -352,6 +357,8 @@ 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);
|
||||
@@ -364,12 +371,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
void _sendInputToConnection(std::wstring_view wstr);
|
||||
|
||||
#pragma region TerminalCoreCallbacks
|
||||
void _terminalCopyToClipboard(wil::zwstring_view wstr);
|
||||
void _terminalCopyToClipboard(std::wstring_view wstr);
|
||||
void _terminalWarningBell();
|
||||
void _terminalTitleChanged(std::wstring_view wstr);
|
||||
void _terminalScrollPositionChanged(const int viewTop,
|
||||
const int viewHeight,
|
||||
const int bufferSize);
|
||||
void _terminalCursorPositionChanged();
|
||||
void _terminalTaskbarProgressChanged();
|
||||
void _terminalShowWindowChanged(bool showOrHide);
|
||||
void _terminalPlayMidiNote(const int noteNumber,
|
||||
@@ -394,20 +402,19 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
void _updateAntiAliasingMode();
|
||||
void _connectionOutputHandler(const hstring& hstr);
|
||||
void _updateHoveredCell(const std::optional<til::point> terminalPosition);
|
||||
void _setOpacity(const float opacity, const bool focused = true);
|
||||
void _setOpacity(const double 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,
|
||||
bool (*filter)(const ::MarkExtents&),
|
||||
til::point_span (*getSpan)(const ::MarkExtents&));
|
||||
bool (*filter)(const ::ScrollMark&),
|
||||
til::point_span (*getSpan)(const ::ScrollMark&));
|
||||
|
||||
bool _clickedOnMark(const til::point& pos, bool (*filter)(const ::MarkExtents&));
|
||||
bool _clickedOnMark(const til::point& pos, bool (*filter)(const ::ScrollMark&));
|
||||
|
||||
inline bool _IsClosing() const noexcept
|
||||
{
|
||||
|
||||
@@ -49,13 +49,6 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean EndAtRightBoundary;
|
||||
};
|
||||
|
||||
struct SearchResults
|
||||
{
|
||||
Int32 TotalMatches;
|
||||
Int32 CurrentMatch;
|
||||
Boolean SearchInvalidated;
|
||||
};
|
||||
|
||||
[default_interface] runtimeclass SelectionColor
|
||||
{
|
||||
SelectionColor();
|
||||
@@ -94,8 +87,9 @@ namespace Microsoft.Terminal.Control
|
||||
UInt64 SwapChainHandle { get; };
|
||||
|
||||
Windows.Foundation.Size FontSize { get; };
|
||||
String FontFaceName { get; };
|
||||
UInt16 FontWeight { get; };
|
||||
Single Opacity { get; };
|
||||
Double Opacity { get; };
|
||||
Boolean UseAcrylic { get; };
|
||||
|
||||
Boolean TryMarkModeKeybinding(Int16 vkey,
|
||||
@@ -134,9 +128,9 @@ namespace Microsoft.Terminal.Control
|
||||
void ResumeRendering();
|
||||
void BlinkAttributeTick();
|
||||
|
||||
SearchResults Search(String text, Boolean goForward, Boolean caseSensitive, Boolean reset);
|
||||
void Search(String text, Boolean goForward, Boolean caseSensitive);
|
||||
void ClearSearch();
|
||||
Boolean SnapSearchResultToSelection;
|
||||
IVector<Int32> SearchResultRows { get; };
|
||||
|
||||
Microsoft.Terminal.Core.Color ForegroundColor { get; };
|
||||
Microsoft.Terminal.Core.Color BackgroundColor { get; };
|
||||
@@ -155,7 +149,7 @@ namespace Microsoft.Terminal.Control
|
||||
String ReadEntireBuffer();
|
||||
CommandHistoryContext CommandHistory();
|
||||
|
||||
void AdjustOpacity(Single Opacity, Boolean relative);
|
||||
void AdjustOpacity(Double Opacity, Boolean relative);
|
||||
void WindowVisibilityChanged(Boolean showOrHide);
|
||||
|
||||
void ColorSelection(SelectionColor fg, SelectionColor bg, Microsoft.Terminal.Core.MatchMode matchMode);
|
||||
@@ -166,6 +160,7 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean ShouldShowSelectOutput();
|
||||
|
||||
// These events are called from some background thread
|
||||
event Windows.Foundation.TypedEventHandler<Object, CopyToClipboardEventArgs> CopyToClipboard;
|
||||
event Windows.Foundation.TypedEventHandler<Object, TitleChangedEventArgs> TitleChanged;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> WarningBell;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> TabColorChanged;
|
||||
@@ -177,13 +172,15 @@ 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> OutputIdle;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> ReceivedOutput;
|
||||
event Windows.Foundation.TypedEventHandler<Object, FoundResultsArgs> FoundMatch;
|
||||
event Windows.Foundation.TypedEventHandler<Object, UpdateSelectionMarkersEventArgs> UpdateSelectionMarkers;
|
||||
event Windows.Foundation.TypedEventHandler<Object, OpenHyperlinkEventArgs> OpenHyperlink;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> CloseTerminalRequested;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user