Compare commits
168 Commits
dev/duhowe
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12c6b0a240 | ||
|
|
580b7b7d36 | ||
|
|
c60a006e77 | ||
|
|
c9a1f12894 | ||
|
|
318fd6abd6 | ||
|
|
fd434197f1 | ||
|
|
9f0d9a5d14 | ||
|
|
63e85e84c1 | ||
|
|
fc8c6f6802 | ||
|
|
64e57344be | ||
|
|
cb4403e8b3 | ||
|
|
f62754397d | ||
|
|
0c98216d2f | ||
|
|
ca6af92561 | ||
|
|
f4bffcfdb6 | ||
|
|
ef89e13ea9 | ||
|
|
fa91fd6940 | ||
|
|
91f7063d2d | ||
|
|
f5b8e98243 | ||
|
|
90a9d15659 | ||
|
|
f16f5133f3 | ||
|
|
cba3d71378 | ||
|
|
49e96f22be | ||
|
|
b690855cf5 | ||
|
|
117eb9b8fb | ||
|
|
0982abe762 | ||
|
|
78c36ca25d | ||
|
|
df9df3d4ee | ||
|
|
99df9e9444 | ||
|
|
d1ac37599c | ||
|
|
87c87b51fc | ||
|
|
dc8a830fea | ||
|
|
41bb31f5dc | ||
|
|
6b380cb7e0 | ||
|
|
84a33afb8c | ||
|
|
ef586f6bf5 | ||
|
|
bdb67a382a | ||
|
|
b6326cf23e | ||
|
|
e27ebe7681 | ||
|
|
c47d9e1ad9 | ||
|
|
b95cc19e87 | ||
|
|
e8c15683a7 | ||
|
|
6d4ff2e5a7 | ||
|
|
e60afb6f4e | ||
|
|
1519b6feb2 | ||
|
|
6d9fb78bfc | ||
|
|
102181f109 | ||
|
|
b028a5764b | ||
|
|
cf7a6617ab | ||
|
|
f2e9041aa0 | ||
|
|
8e7137dbde | ||
|
|
0cbe706f48 | ||
|
|
8c2c88e44f | ||
|
|
1742dc03ff | ||
|
|
42ab9bbd69 | ||
|
|
cb8a3f6ef1 | ||
|
|
ed08108e32 | ||
|
|
8aa56c25f4 | ||
|
|
e866a6c66f | ||
|
|
2890e8a3d4 | ||
|
|
6b6167ec2b | ||
|
|
5d1638f187 | ||
|
|
2befaa1669 | ||
|
|
83a9baa797 | ||
|
|
5a99621856 | ||
|
|
09aa541d56 | ||
|
|
4040e4c654 | ||
|
|
8f4775df96 | ||
|
|
3ab8921aa7 | ||
|
|
2a15717f69 | ||
|
|
846a8aa7a6 | ||
|
|
9cccef7224 | ||
|
|
196a60c7c2 | ||
|
|
aff77650e4 | ||
|
|
8f3b38fb81 | ||
|
|
d960c89634 | ||
|
|
332c5ad937 | ||
|
|
5f6783b01f | ||
|
|
334335fd43 | ||
|
|
30df31fd9b | ||
|
|
0030a1d52e | ||
|
|
082d166ac6 | ||
|
|
3e661bfad2 | ||
|
|
7b59a9eafb | ||
|
|
8038dc67cd | ||
|
|
bc365c9542 | ||
|
|
0d8e43c697 | ||
|
|
967dcfc5b0 | ||
|
|
e56a557c93 | ||
|
|
52eba74316 | ||
|
|
27de22d0e5 | ||
|
|
52ab4c467a | ||
|
|
ece2ef7f84 | ||
|
|
ef283da5cb | ||
|
|
18c3f72fe0 | ||
|
|
4d1b543a9e | ||
|
|
d838ce5e67 | ||
|
|
1f54562f04 | ||
|
|
f0fc1b5701 | ||
|
|
a6819c5384 | ||
|
|
3c6b2af578 | ||
|
|
fe237afc25 | ||
|
|
3600ee42f0 | ||
|
|
5c758974e5 | ||
|
|
4fbcd65e1a | ||
|
|
92e05f246a | ||
|
|
d4faf98455 | ||
|
|
c52dca40d2 | ||
|
|
8dd4512067 | ||
|
|
6cda6797f8 | ||
|
|
a9446a12df | ||
|
|
475b3878f6 | ||
|
|
c2b8f99582 | ||
|
|
015055c246 | ||
|
|
a5835b01b1 | ||
|
|
2f52f27197 | ||
|
|
d3803943ca | ||
|
|
77087e6282 | ||
|
|
32fbb16d43 | ||
|
|
6bc7b9e68b | ||
|
|
af91e6ef58 | ||
|
|
5d2d3856a7 | ||
|
|
5b8eadb2ea | ||
|
|
be5a240ec6 | ||
|
|
ef318a1450 | ||
|
|
378b6594bd | ||
|
|
d14ff939dc | ||
|
|
41bb28c46d | ||
|
|
8d67477a1a | ||
|
|
26900ca472 | ||
|
|
f36d589a8e | ||
|
|
0c3c7470b0 | ||
|
|
19f43f70bd | ||
|
|
3a63832c31 | ||
|
|
ce4e0df7b0 | ||
|
|
360e86b536 | ||
|
|
87a9f72b9a | ||
|
|
daffb2dbbf | ||
|
|
a590a1bff0 | ||
|
|
19c24aced9 | ||
|
|
99061ee272 | ||
|
|
f49cf44b79 | ||
|
|
4e7b63c664 | ||
|
|
06ab6f3e1f | ||
|
|
643f7167a6 | ||
|
|
90b8bb7c2d | ||
|
|
d632c39cc3 | ||
|
|
11c4aa459d | ||
|
|
f4d8a74082 | ||
|
|
5f3a857192 | ||
|
|
20b0bed46d | ||
|
|
4fd15c9937 | ||
|
|
8bd9578b3c | ||
|
|
7adc3743d8 | ||
|
|
b90eb93d26 | ||
|
|
156b9aeea6 | ||
|
|
c3f44f7730 | ||
|
|
dc4026d184 | ||
|
|
c063d2bad6 | ||
|
|
6a69b94fc6 | ||
|
|
8d6e7a8a78 | ||
|
|
1a6ba43dd2 | ||
|
|
67ae9f6c3e | ||
|
|
2bcbe6b492 | ||
|
|
04fa18de71 | ||
|
|
4d58137bd4 | ||
|
|
ad0c28b30d | ||
|
|
5f1015953f |
1
.github/actions/spelling/allow/allow.txt
vendored
@@ -80,6 +80,7 @@ mnt
|
||||
mru
|
||||
nje
|
||||
noreply
|
||||
notwrapped
|
||||
ogonek
|
||||
ok'd
|
||||
overlined
|
||||
|
||||
6
.github/actions/spelling/allow/microsoft.txt
vendored
@@ -1,6 +1,8 @@
|
||||
ACLs
|
||||
ADMINS
|
||||
advapi
|
||||
akv
|
||||
AKV
|
||||
altform
|
||||
altforms
|
||||
appendwttlogging
|
||||
@@ -14,6 +16,7 @@ autoexec
|
||||
backplating
|
||||
bitmaps
|
||||
BOMs
|
||||
checkcflags
|
||||
COMPUTERNAME
|
||||
CPLs
|
||||
cpptools
|
||||
@@ -32,6 +35,7 @@ DWINRT
|
||||
enablewttlogging
|
||||
HOMESHARE
|
||||
Intelli
|
||||
issecret
|
||||
IVisual
|
||||
libucrt
|
||||
libucrtd
|
||||
@@ -74,6 +78,7 @@ sid
|
||||
Skype
|
||||
SRW
|
||||
sxs
|
||||
symbolrequestprod
|
||||
Sysinternals
|
||||
sysnative
|
||||
systemroot
|
||||
@@ -99,3 +104,4 @@ wtl
|
||||
wtt
|
||||
wttlog
|
||||
Xamarin
|
||||
xfgcheck
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
EOB
|
||||
swrapped
|
||||
wordi
|
||||
wordiswrapped
|
||||
wrappe
|
||||
1
.github/actions/spelling/expect/alphabet.txt
vendored
@@ -1,4 +1,3 @@
|
||||
AAAa
|
||||
AAAAA
|
||||
AAAAAAAAAAAAA
|
||||
AAAAAABBBBBBCCC
|
||||
|
||||
89
.github/actions/spelling/expect/expect.txt
vendored
@@ -1,3 +1,4 @@
|
||||
aaaaabbb
|
||||
aabbcc
|
||||
ABANDONFONT
|
||||
abbcc
|
||||
@@ -9,6 +10,7 @@ ACCESSTOKEN
|
||||
acidev
|
||||
ACIOSS
|
||||
ACover
|
||||
acp
|
||||
actctx
|
||||
ACTCTXW
|
||||
ADDALIAS
|
||||
@@ -16,6 +18,8 @@ ADDREF
|
||||
ADDSTRING
|
||||
ADDTOOL
|
||||
AFew
|
||||
adml
|
||||
admx
|
||||
AFill
|
||||
AFX
|
||||
AHelper
|
||||
@@ -66,10 +70,10 @@ ASBSET
|
||||
asdfghjkl
|
||||
ASetting
|
||||
ASingle
|
||||
ASYNCDONTCARE
|
||||
ASYNCWINDOWPOS
|
||||
atch
|
||||
ATest
|
||||
ATTRCOLOR
|
||||
aumid
|
||||
Authenticode
|
||||
AUTOBUDDY
|
||||
@@ -92,6 +96,8 @@ backported
|
||||
backstory
|
||||
barbaz
|
||||
Bazz
|
||||
bbb
|
||||
bbccb
|
||||
BBDM
|
||||
bbwe
|
||||
bcount
|
||||
@@ -121,8 +127,6 @@ Blt
|
||||
BLUESCROLL
|
||||
BODGY
|
||||
BOLDFONT
|
||||
BOOLIFY
|
||||
bools
|
||||
Borland
|
||||
boutput
|
||||
boxheader
|
||||
@@ -153,7 +157,6 @@ cazamor
|
||||
CBash
|
||||
cbiex
|
||||
CBN
|
||||
CBoolean
|
||||
cbt
|
||||
CCCBB
|
||||
cch
|
||||
@@ -161,12 +164,9 @@ CCHAR
|
||||
CCmd
|
||||
ccolor
|
||||
CCom
|
||||
CComp
|
||||
CConsole
|
||||
CConversion
|
||||
CCRT
|
||||
cdd
|
||||
CEdit
|
||||
CELLSIZE
|
||||
cfae
|
||||
cfie
|
||||
@@ -176,18 +176,17 @@ CFuzz
|
||||
cgscrn
|
||||
chafa
|
||||
changelists
|
||||
chaof
|
||||
charinfo
|
||||
CHARSETINFO
|
||||
chh
|
||||
chshdng
|
||||
CHT
|
||||
Cic
|
||||
CLASSSTRING
|
||||
CLE
|
||||
cleartype
|
||||
CLICKACTIVE
|
||||
clickdown
|
||||
CLIENTID
|
||||
clipbrd
|
||||
CLIPCHILDREN
|
||||
CLIPSIBLINGS
|
||||
@@ -226,7 +225,6 @@ commdlg
|
||||
COMMITID
|
||||
componentization
|
||||
conapi
|
||||
conareainfo
|
||||
conattrs
|
||||
conbufferout
|
||||
concfg
|
||||
@@ -237,8 +235,7 @@ condrv
|
||||
conechokey
|
||||
conemu
|
||||
conhost
|
||||
conime
|
||||
conimeinfo
|
||||
CONIME
|
||||
conintegrity
|
||||
conintegrityuwp
|
||||
coninteractivitybase
|
||||
@@ -250,6 +247,7 @@ CONKBD
|
||||
conlibk
|
||||
conmsgl
|
||||
CONNECTINFO
|
||||
connyection
|
||||
CONOUT
|
||||
conprops
|
||||
conpropsp
|
||||
@@ -276,7 +274,6 @@ contentfiles
|
||||
conterm
|
||||
contsf
|
||||
contypes
|
||||
convarea
|
||||
conwinuserrefs
|
||||
coordnew
|
||||
COPYCOLOR
|
||||
@@ -311,7 +308,6 @@ csrutil
|
||||
CSTYLE
|
||||
CSwitch
|
||||
CTerminal
|
||||
CText
|
||||
ctl
|
||||
ctlseqs
|
||||
CTRLEVENT
|
||||
@@ -319,7 +315,7 @@ CTRLFREQUENCY
|
||||
CTRLKEYSHORTCUTS
|
||||
Ctrls
|
||||
CTRLVOLUME
|
||||
Ctxt
|
||||
CUAS
|
||||
CUF
|
||||
cupxy
|
||||
CURRENTFONT
|
||||
@@ -483,7 +479,6 @@ DISABLEDELAYEDEXPANSION
|
||||
DISABLENOSCROLL
|
||||
DISPATCHNOTIFY
|
||||
DISPLAYATTRIBUTE
|
||||
DISPLAYATTRIBUTEPROPERTY
|
||||
DISPLAYCHANGE
|
||||
distros
|
||||
dlg
|
||||
@@ -559,7 +554,7 @@ entrypoints
|
||||
ENU
|
||||
ENUMLOGFONT
|
||||
ENUMLOGFONTEX
|
||||
enumranges
|
||||
EOB
|
||||
EOK
|
||||
EPres
|
||||
EQU
|
||||
@@ -615,10 +610,10 @@ FILTERONPASTE
|
||||
FINDCASE
|
||||
FINDDLG
|
||||
FINDDOWN
|
||||
FINDREGEX
|
||||
FINDSTRINGEXACT
|
||||
FINDUP
|
||||
FIter
|
||||
FIXEDCONVERTED
|
||||
FIXEDFILEINFO
|
||||
Flg
|
||||
flyouts
|
||||
@@ -733,9 +728,8 @@ Greyscale
|
||||
gridline
|
||||
gset
|
||||
gsl
|
||||
GTP
|
||||
guc
|
||||
guidatom
|
||||
GUIDATOM
|
||||
GValue
|
||||
GWL
|
||||
GWLP
|
||||
@@ -777,6 +771,7 @@ HIWORD
|
||||
HKCU
|
||||
hkey
|
||||
hkl
|
||||
HKLM
|
||||
hlocal
|
||||
hlsl
|
||||
HMB
|
||||
@@ -834,7 +829,6 @@ IEnd
|
||||
IEnum
|
||||
IFACEMETHODIMP
|
||||
ification
|
||||
IGNOREEND
|
||||
IGNORELANGUAGE
|
||||
IHosted
|
||||
iid
|
||||
@@ -858,8 +852,8 @@ inkscape
|
||||
INLINEPREFIX
|
||||
inproc
|
||||
Inputkeyinfo
|
||||
INPUTPROCESSORPROFILE
|
||||
Inputreadhandledata
|
||||
INPUTSCOPE
|
||||
INSERTMODE
|
||||
INTERACTIVITYBASE
|
||||
INTERCEPTCOPYPASTE
|
||||
@@ -870,9 +864,7 @@ INVALIDARG
|
||||
INVALIDATERECT
|
||||
Ioctl
|
||||
ipch
|
||||
ipp
|
||||
IProperty
|
||||
IPSINK
|
||||
ipsp
|
||||
IShell
|
||||
ISwap
|
||||
@@ -892,7 +884,6 @@ JOBOBJECT
|
||||
JOBOBJECTINFOCLASS
|
||||
JPN
|
||||
jsoncpp
|
||||
Jsons
|
||||
jsprovider
|
||||
jumplist
|
||||
KAttrs
|
||||
@@ -922,6 +913,7 @@ KLMNOPQRSTY
|
||||
KOK
|
||||
KPRIORITY
|
||||
KVM
|
||||
kyouhaishaheiku
|
||||
langid
|
||||
LANGUAGELIST
|
||||
lasterror
|
||||
@@ -984,7 +976,6 @@ lpdw
|
||||
lpelfe
|
||||
lpfn
|
||||
LPFNADDPROPSHEETPAGE
|
||||
lpl
|
||||
LPMEASUREITEMSTRUCT
|
||||
LPMINMAXINFO
|
||||
lpmsg
|
||||
@@ -1060,6 +1051,7 @@ MENUITEMINFO
|
||||
MENUSELECT
|
||||
messageext
|
||||
metaproj
|
||||
Mgrs
|
||||
microsoftpublicsymbols
|
||||
midl
|
||||
mii
|
||||
@@ -1114,7 +1106,6 @@ muxes
|
||||
myapplet
|
||||
mybranch
|
||||
mydir
|
||||
MYMAX
|
||||
Mypair
|
||||
Myval
|
||||
NAMELENGTH
|
||||
@@ -1158,6 +1149,7 @@ NOCOPYBITS
|
||||
NODUP
|
||||
noexcepts
|
||||
NOFONT
|
||||
NOHIDDENTEXT
|
||||
NOINTEGRALHEIGHT
|
||||
NOINTERFACE
|
||||
NOLINKINFO
|
||||
@@ -1181,6 +1173,7 @@ NORMALDISPLAY
|
||||
NOSCRATCH
|
||||
NOSEARCH
|
||||
noselect
|
||||
NOSELECTION
|
||||
NOSENDCHANGING
|
||||
NOSIZE
|
||||
NOSNAPSHOT
|
||||
@@ -1271,6 +1264,7 @@ packageuwp
|
||||
PACKAGEVERSIONNUMBER
|
||||
PACKCOORD
|
||||
PACKVERSION
|
||||
pacp
|
||||
pagedown
|
||||
pageup
|
||||
PAINTPARAMS
|
||||
@@ -1282,7 +1276,7 @@ parms
|
||||
PATCOPY
|
||||
pathcch
|
||||
PATTERNID
|
||||
pcat
|
||||
pbstr
|
||||
pcb
|
||||
pcch
|
||||
PCCHAR
|
||||
@@ -1306,9 +1300,9 @@ PCSTR
|
||||
PCWCH
|
||||
PCWCHAR
|
||||
PCWSTR
|
||||
pda
|
||||
pdbs
|
||||
pdbstr
|
||||
pdcs
|
||||
PDPs
|
||||
pdtobj
|
||||
pdw
|
||||
@@ -1338,6 +1332,7 @@ PIDLIST
|
||||
pids
|
||||
pii
|
||||
piml
|
||||
pimpl
|
||||
pinvoke
|
||||
pipename
|
||||
pipestr
|
||||
@@ -1367,10 +1362,11 @@ POSTCHARBREAKS
|
||||
POSX
|
||||
POSXSCROLL
|
||||
POSYSCROLL
|
||||
ppbstr
|
||||
PPEB
|
||||
ppf
|
||||
ppguid
|
||||
ppidl
|
||||
pprg
|
||||
PPROC
|
||||
ppropvar
|
||||
ppsi
|
||||
@@ -1399,7 +1395,7 @@ PROCESSINFOCLASS
|
||||
PRODEXT
|
||||
PROPERTYID
|
||||
PROPERTYKEY
|
||||
PROPERTYVAL
|
||||
propertyval
|
||||
propsheet
|
||||
PROPSHEETHEADER
|
||||
PROPSHEETPAGE
|
||||
@@ -1431,8 +1427,11 @@ ptch
|
||||
ptsz
|
||||
PTYIn
|
||||
PUCHAR
|
||||
pvar
|
||||
pwch
|
||||
PWDDMCONSOLECONTEXT
|
||||
Pwease
|
||||
pweview
|
||||
pws
|
||||
pwstr
|
||||
pwsz
|
||||
@@ -1516,6 +1515,7 @@ rgn
|
||||
rgp
|
||||
rgpwsz
|
||||
rgrc
|
||||
rguid
|
||||
rgw
|
||||
RIGHTALIGN
|
||||
RIGHTBUTTON
|
||||
@@ -1523,6 +1523,7 @@ riid
|
||||
RIS
|
||||
roadmap
|
||||
robomac
|
||||
rodata
|
||||
rosetta
|
||||
RRF
|
||||
rrr
|
||||
@@ -1645,7 +1646,6 @@ sidebyside
|
||||
SIF
|
||||
SIGDN
|
||||
Signtool
|
||||
SINGLEFLAG
|
||||
SINGLETHREADED
|
||||
siup
|
||||
sixel
|
||||
@@ -1677,6 +1677,7 @@ srcsrv
|
||||
SRCSRVTRG
|
||||
srctool
|
||||
srect
|
||||
SRGS
|
||||
srvinit
|
||||
srvpipe
|
||||
ssa
|
||||
@@ -1714,10 +1715,12 @@ swapchain
|
||||
swapchainpanel
|
||||
SWMR
|
||||
SWP
|
||||
swrapped
|
||||
SYMED
|
||||
SYNCPAINT
|
||||
syscalls
|
||||
SYSCHAR
|
||||
SYSCOLOR
|
||||
SYSCOMMAND
|
||||
SYSDEADCHAR
|
||||
SYSKEYDOWN
|
||||
@@ -1729,6 +1732,7 @@ sysparams
|
||||
sysparamsext
|
||||
SYSTEMHAND
|
||||
SYSTEMMENU
|
||||
SYSTEMTIME
|
||||
tabview
|
||||
TAdd
|
||||
taef
|
||||
@@ -1783,7 +1787,6 @@ TEXTMETRIC
|
||||
TEXTMETRICW
|
||||
textmode
|
||||
texttests
|
||||
TFCAT
|
||||
TFunction
|
||||
THUMBPOSITION
|
||||
THUMBTRACK
|
||||
@@ -1814,7 +1817,6 @@ Tpqrst
|
||||
tracelogging
|
||||
traceviewpp
|
||||
trackbar
|
||||
TRACKCOMPOSITION
|
||||
trackpad
|
||||
transitioning
|
||||
Trd
|
||||
@@ -1825,7 +1827,6 @@ Tribool
|
||||
TRIMZEROHEADINGS
|
||||
trx
|
||||
tsa
|
||||
tsattrs
|
||||
tsgr
|
||||
tsm
|
||||
TStr
|
||||
@@ -1838,8 +1839,6 @@ TTM
|
||||
TTo
|
||||
tvpp
|
||||
tvtseq
|
||||
Txtev
|
||||
typechecked
|
||||
TYUI
|
||||
UAC
|
||||
uap
|
||||
@@ -1857,10 +1856,8 @@ UIACCESS
|
||||
uiacore
|
||||
uiautomationcore
|
||||
uielem
|
||||
UIELEMENTENABLEDONLY
|
||||
UINTs
|
||||
ul
|
||||
ulcch
|
||||
uld
|
||||
uldash
|
||||
uldb
|
||||
@@ -1914,6 +1911,7 @@ UVWXY
|
||||
UVWXYZ
|
||||
uwa
|
||||
uwp
|
||||
uwu
|
||||
uxtheme
|
||||
Vanara
|
||||
vararg
|
||||
@@ -1954,11 +1952,9 @@ vstest
|
||||
VSTS
|
||||
VSTT
|
||||
vswhere
|
||||
vtapi
|
||||
vtapp
|
||||
VTE
|
||||
VTID
|
||||
vtio
|
||||
vtmode
|
||||
vtpipeterm
|
||||
vtpt
|
||||
@@ -1988,6 +1984,7 @@ wdm
|
||||
webpage
|
||||
websites
|
||||
wekyb
|
||||
wewoad
|
||||
wex
|
||||
wextest
|
||||
wextestclass
|
||||
@@ -2017,7 +2014,6 @@ WINDOWALPHA
|
||||
windowdpiapi
|
||||
WINDOWEDGE
|
||||
windowext
|
||||
windowime
|
||||
WINDOWINFO
|
||||
windowio
|
||||
windowmetrics
|
||||
@@ -2068,7 +2064,8 @@ WNDCLASSW
|
||||
Wndproc
|
||||
WNegative
|
||||
WNull
|
||||
wnwb
|
||||
wordi
|
||||
wordiswrapped
|
||||
workarea
|
||||
WOutside
|
||||
WOWARM
|
||||
@@ -2082,6 +2079,7 @@ WPrep
|
||||
WPresent
|
||||
wprp
|
||||
wprpi
|
||||
wrappe
|
||||
wregex
|
||||
writeback
|
||||
WRITECONSOLE
|
||||
@@ -2107,7 +2105,6 @@ WTs
|
||||
WTSOFTFONT
|
||||
wtw
|
||||
wtypes
|
||||
Wubi
|
||||
WUX
|
||||
WVerify
|
||||
WWith
|
||||
@@ -2134,9 +2131,7 @@ xes
|
||||
XFG
|
||||
XFile
|
||||
XFORM
|
||||
xin
|
||||
xinchaof
|
||||
xinxinchaof
|
||||
XIn
|
||||
XManifest
|
||||
XMath
|
||||
xorg
|
||||
|
||||
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@v0.5.0
|
||||
- uses: actions/add-to-project@v1.0.1
|
||||
with:
|
||||
project-url: https://github.com/orgs/microsoft/projects/159
|
||||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<clear />
|
||||
<!-- Dependencies that we can turn on to force override for testing purposes before uploading. -->
|
||||
<!--<add key="Static Package Dependencies" value="dep\packages" />-->
|
||||
<add key="TerminalDependencies" value="https://pkgs.dev.azure.com/ms/terminal/_packaging/TerminalDependencies/nuget/v3/index.json" />
|
||||
<add key="TerminalDependencies" value="https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear />
|
||||
|
||||
@@ -171,6 +171,7 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Control.Lib", "src\cascadia\TerminalControl\TerminalControlLib.vcxproj", "{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {1CF55140-EF6A-4736-A403-957E4F7430BB}
|
||||
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {2FD12FBB-1DDB-46D8-B818-1023C624CACA}
|
||||
{48D21369-3D7B-4431-9967-24E81292CF63} = {48D21369-3D7B-4431-9967-24E81292CF63}
|
||||
{8222900C-8B6C-452A-91AC-BE95DB04B95F} = {8222900C-8B6C-452A-91AC-BE95DB04B95F}
|
||||
{AF0A096A-8B3A-4949-81EF-7DF8F0FEE91F} = {AF0A096A-8B3A-4949-81EF-7DF8F0FEE91F}
|
||||
@@ -412,7 +413,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TerminalStress", "src\tools
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingTests", "src\tools\RenderingTests\RenderingTests.vcxproj", "{37C995E0-2349-4154-8E77-4A52C0C7F46D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UIHelpers", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchcat", "src\tools\benchcat\benchcat.vcxproj", "{2C836962-9543-4CE5-B834-D28E1F124B66}"
|
||||
EndProject
|
||||
@@ -477,6 +478,7 @@ Global
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.Build.0 = Debug|x64
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Fuzzing|Any CPU.ActiveCfg = Fuzzing|Win32
|
||||
@@ -2443,7 +2445,7 @@ Global
|
||||
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
|
||||
{4C8E6BB0-4713-4ADB-BD04-81628ECEAF20} = {81C352DB-1818-45B7-A284-18E259F1CC87}
|
||||
{D57841D1-8294-4F2B-BB8B-D2A35738DECD} = {81C352DB-1818-45B7-A284-18E259F1CC87}
|
||||
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
|
||||
{2FD12FBB-1DDB-46D8-B818-1023C624CACA} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
|
||||
{3AE13314-1939-4DFA-9C14-38CA0834050C} = {F1995847-4AE5-479A-BBAF-382E51A63532}
|
||||
{DCF55140-EF6A-4736-A403-957E4F7430BB} = {F1995847-4AE5-479A-BBAF-382E51A63532}
|
||||
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {F1995847-4AE5-479A-BBAF-382E51A63532}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"instanceUrl": "https://microsoft.visualstudio.com",
|
||||
"projectName": "OS",
|
||||
"areaPath": "OS\\Windows Client and Services\\ADEPT\\E4D-Engineered for Developers\\SHINE\\Terminal",
|
||||
"areaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\Terminal",
|
||||
"notificationAliases": ["condev@microsoft.com", "duhowett@microsoft.com"]
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Optional, defaults to main. Name of the branch which will be used for calculating branch point. -->
|
||||
<PGOBranch>main</PGOBranch>
|
||||
<PGOBranch>release-1.21</PGOBranch>
|
||||
|
||||
<!-- Mandatory. Name of the NuGet package which will contain PGO databases for consumption by build system. -->
|
||||
<PGOPackageName>Microsoft.Internal.Windows.Terminal.PGODatabase</PGOPackageName>
|
||||
|
||||
@@ -30,9 +30,20 @@ extends:
|
||||
buildTerminal: true
|
||||
pgoBuildMode: Optimize
|
||||
codeSign: true
|
||||
signingIdentity:
|
||||
serviceName: $(SigningServiceName)
|
||||
appId: $(SigningAppId)
|
||||
tenantId: $(SigningTenantId)
|
||||
akvName: $(SigningAKVName)
|
||||
authCertName: $(SigningAuthCertName)
|
||||
signCertName: $(SigningSignCertName)
|
||||
useManagedIdentity: $(SigningUseManagedIdentity)
|
||||
clientId: $(SigningOriginalClientId)
|
||||
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
|
||||
|
||||
@@ -27,7 +27,7 @@ parameters:
|
||||
- name: pgoBuildMode
|
||||
displayName: "PGO Build Mode"
|
||||
type: string
|
||||
default: Optimize
|
||||
default: None # BODGY - OneBranch is on VS 17.10, which is known to be the worst
|
||||
values:
|
||||
- Optimize
|
||||
- Instrument
|
||||
@@ -78,6 +78,17 @@ extends:
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
codeSign: true
|
||||
signingIdentity:
|
||||
serviceName: $(SigningServiceName)
|
||||
appId: $(SigningAppId)
|
||||
tenantId: $(SigningTenantId)
|
||||
akvName: $(SigningAKVName)
|
||||
authCertName: $(SigningAuthCertName)
|
||||
signCertName: $(SigningSignCertName)
|
||||
useManagedIdentity: $(SigningUseManagedIdentity)
|
||||
clientId: $(SigningOriginalClientId)
|
||||
terminalInternalPackageVersion: ${{ parameters.terminalInternalPackageVersion }}
|
||||
publishSymbolsToPublic: ${{ parameters.publishSymbolsToPublic }}
|
||||
publishVpackToWindows: ${{ parameters.publishVpackToWindows }}
|
||||
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
|
||||
symbolPublishingProject: $(SymbolPublishingProject)
|
||||
|
||||
@@ -27,6 +27,9 @@ parameters:
|
||||
- name: publishArtifacts
|
||||
type: boolean
|
||||
default: true
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -56,10 +59,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
@@ -97,31 +97,32 @@ jobs:
|
||||
flattenFolders: true
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetSign",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
- template: steps-esrp-signing.yml
|
||||
parameters:
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
inputs:
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetSign",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
|
||||
- ${{ if eq(parameters.generateSbom, true) }}:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
|
||||
@@ -65,6 +65,9 @@ parameters:
|
||||
- name: removeAllNonSignedFiles
|
||||
type: boolean
|
||||
default: false
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -142,6 +145,10 @@ jobs:
|
||||
|
||||
- template: .\steps-restore-nuget.yml
|
||||
|
||||
- pwsh: |-
|
||||
.\build\scripts\Set-LatestVCToolsVersion.ps1
|
||||
displayName: Work around DD-1541167 (VCToolsVersion)
|
||||
|
||||
- ${{ parameters.beforeBuildSteps }}
|
||||
|
||||
- task: VSBuild@1
|
||||
@@ -152,7 +159,6 @@ jobs:
|
||||
/p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=${{ parameters.branding }};PGOBuildMode=${{ parameters.pgoBuildMode }}
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
/bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
/graph
|
||||
$(BuildTargetParameter)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
@@ -236,13 +242,14 @@ jobs:
|
||||
|
||||
# Code-sign everything we just put together.
|
||||
# We run the signing in Terminal.BinDir, because all of the signing batches are relative to the final architecture/configuration output folder.
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit Signing Request
|
||||
inputs:
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: '$(Terminal.BinDir)'
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(Build.SourcesDirectory)/ESRPSigningConfig.json'
|
||||
- template: steps-esrp-signing.yml
|
||||
parameters:
|
||||
displayName: Submit Signing Request
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
inputs:
|
||||
FolderPath: '$(Terminal.BinDir)'
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(Build.SourcesDirectory)/ESRPSigningConfig.json'
|
||||
|
||||
# We only need to re-pack the MSIX if we actually signed, so this can stay in the codeSign conditional
|
||||
- ${{ if or(parameters.buildTerminal, parameters.buildEverything) }}:
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
|
||||
displayName: Install Azure Module Dependencies
|
||||
|
||||
- task: AzureFileCopy@5
|
||||
- task: AzureFileCopy@6
|
||||
displayName: Publish to Storage Account
|
||||
inputs:
|
||||
sourcePath: _out/*
|
||||
|
||||
@@ -32,6 +32,9 @@ parameters:
|
||||
- name: afterBuildSteps
|
||||
type: stepList
|
||||
default: []
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -66,10 +69,9 @@ jobs:
|
||||
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
@@ -94,40 +96,41 @@ jobs:
|
||||
displayName: Create msixbundle
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.msixbundle to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(System.ArtifactsDirectory)\bundle
|
||||
Pattern: $(BundleStemName)*.msixbundle
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "Dynamic",
|
||||
"CertTemplateName": "WINMSAPP1ST",
|
||||
"CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US",
|
||||
"OperationCode": "SigntoolSign",
|
||||
"Parameters": {
|
||||
"OpusName": "Microsoft",
|
||||
"OpusInfo": "http://www.microsoft.com",
|
||||
"FileDigest": "/fd \"SHA256\"",
|
||||
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "Dynamic",
|
||||
"CertTemplateName": "WINMSAPP1ST",
|
||||
"CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US",
|
||||
"OperationCode": "SigntoolVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
- template: steps-esrp-signing.yml
|
||||
parameters:
|
||||
displayName: Submit *.msixbundle to ESRP for code signing
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
inputs:
|
||||
FolderPath: $(System.ArtifactsDirectory)\bundle
|
||||
Pattern: $(BundleStemName)*.msixbundle
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "Dynamic",
|
||||
"CertTemplateName": "WINMSAPP1ST",
|
||||
"CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US",
|
||||
"OperationCode": "SigntoolSign",
|
||||
"Parameters": {
|
||||
"OpusName": "Microsoft",
|
||||
"OpusInfo": "http://www.microsoft.com",
|
||||
"FileDigest": "/fd \"SHA256\"",
|
||||
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "Dynamic",
|
||||
"CertTemplateName": "WINMSAPP1ST",
|
||||
"CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US",
|
||||
"OperationCode": "SigntoolVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
|
||||
- ${{ if eq(parameters.generateSbom, true) }}:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
|
||||
@@ -27,6 +27,9 @@ parameters:
|
||||
- name: publishArtifacts
|
||||
type: boolean
|
||||
default: true
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
@@ -54,10 +57,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- template: steps-download-bin-dir-artifact.yml
|
||||
parameters:
|
||||
@@ -82,31 +82,32 @@ jobs:
|
||||
versionEnvVar: XES_PACKAGEVERSIONNUMBER
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- task: EsrpCodeSigning@3
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
inputs:
|
||||
ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetSign",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
- template: steps-esrp-signing.yml
|
||||
parameters:
|
||||
displayName: Submit *.nupkg to ESRP for code signing
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
inputs:
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)/nupkg
|
||||
Pattern: '*.nupkg'
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
[
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetSign",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-401405",
|
||||
"OperationCode": "NuGetVerify",
|
||||
"Parameters": {},
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
|
||||
- ${{ if eq(parameters.generateSbom, true) }}:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
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
|
||||
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- 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
|
||||
@@ -43,10 +43,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download all PDBs from all prior build phases
|
||||
|
||||
@@ -38,10 +38,7 @@ jobs:
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: steps-setup-versioning.yml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download MSIX Bundle Artifact
|
||||
|
||||
@@ -33,7 +33,7 @@ parameters:
|
||||
- arm64
|
||||
- name: codeSign
|
||||
type: boolean
|
||||
default: true
|
||||
default: false
|
||||
- name: generateSbom
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -92,10 +92,7 @@ stages:
|
||||
generateSbom: ${{ parameters.generateSbom }}
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
beforeBuildSteps: # Right before we build, lay down the universal package and localizations
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download terminal-internal Universal Package
|
||||
@@ -119,10 +116,7 @@ stages:
|
||||
generateSbom: ${{ parameters.generateSbom }}
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
beforeBuildSteps:
|
||||
- task: PkgESSetupBuild@12
|
||||
displayName: Package ES - Setup Build
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
|
||||
|
||||
- stage: Package
|
||||
|
||||
@@ -52,10 +52,17 @@ 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:
|
||||
@@ -78,6 +85,7 @@ extends:
|
||||
cloudvault: # https://aka.ms/obpipelines/cloudvault
|
||||
enabled: false
|
||||
globalSdl: # https://aka.ms/obpipelines/sdl
|
||||
enableCheckCFlags: false # CheckCFlags is broken and exploding our builds; to remove, :g/BAD-FLAGS/d
|
||||
asyncSdl:
|
||||
enabled: true
|
||||
tsaOptionsFile: 'build/config/tsa.json'
|
||||
@@ -103,6 +111,8 @@ extends:
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
variables:
|
||||
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
|
||||
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
|
||||
ob_git_checkout: false # This job checks itself out
|
||||
ob_git_skip_checkout_none: true
|
||||
ob_outputDirectory: $(JobOutputDirectory)
|
||||
@@ -118,11 +128,9 @@ 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
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download terminal-internal Universal Package
|
||||
@@ -137,6 +145,8 @@ extends:
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
variables:
|
||||
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
|
||||
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
|
||||
ob_git_checkout: false # This job checks itself out
|
||||
ob_git_skip_checkout_none: true
|
||||
ob_outputDirectory: $(JobOutputDirectory)
|
||||
@@ -152,11 +162,9 @@ 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
|
||||
inputs:
|
||||
disableOutputRedirect: true
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
|
||||
|
||||
- stage: Package
|
||||
@@ -168,6 +176,8 @@ extends:
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
variables:
|
||||
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
|
||||
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
|
||||
ob_git_checkout: false # This job checks itself out
|
||||
ob_git_skip_checkout_none: true
|
||||
ob_outputDirectory: $(JobOutputDirectory)
|
||||
@@ -203,6 +213,7 @@ extends:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # Handled by onebranch
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
afterBuildSteps:
|
||||
# This directory has to exist, even if we aren't using createvpack, because the Guardian rules demand it.
|
||||
- pwsh: |-
|
||||
@@ -219,6 +230,8 @@ extends:
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
variables:
|
||||
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
|
||||
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
|
||||
ob_git_checkout: false # This job checks itself out
|
||||
ob_git_skip_checkout_none: true
|
||||
ob_outputDirectory: $(JobOutputDirectory)
|
||||
@@ -228,12 +241,15 @@ extends:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # this is handled by onebranch
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
|
||||
- ${{ if eq(parameters.buildWPF, true) }}:
|
||||
- template: ./build/pipelines/templates-v2/job-build-package-wpf.yml@self
|
||||
parameters:
|
||||
pool: { type: windows }
|
||||
variables:
|
||||
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
|
||||
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
|
||||
ob_git_checkout: false # This job checks itself out
|
||||
ob_git_skip_checkout_none: true
|
||||
ob_outputDirectory: $(JobOutputDirectory)
|
||||
@@ -243,18 +259,22 @@ 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.yml@self
|
||||
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.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)
|
||||
|
||||
24
build/pipelines/templates-v2/steps-esrp-signing.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
parameters:
|
||||
- name: displayName
|
||||
type: string
|
||||
default: ESRP Code Signing
|
||||
- name: inputs
|
||||
type: object
|
||||
default: {}
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
steps:
|
||||
- task: EsrpCodeSigning@5
|
||||
displayName: ${{ parameters.displayName }}
|
||||
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 }}
|
||||
UseMSIAuthentication: ${{ coalesce(parameters.signingIdentity.useManagedIdentity, 'false') }}
|
||||
EsrpClientId: ${{ parameters.signingIdentity.clientId }}
|
||||
${{ insert }}: ${{ parameters.inputs }}
|
||||
6
build/pipelines/templates-v2/steps-setup-versioning.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
steps:
|
||||
- pwsh: |-
|
||||
nuget install Microsoft.Windows.Terminal.Versioning -OutputDirectory _versioning
|
||||
$VersionRoot = (Get-Item _versioning\Microsoft.Windows.*).FullName
|
||||
& "$VersionRoot\build\Setup.ps1" -ProjectDirectory "$(Build.SourcesDirectory)" -Verbose
|
||||
displayName: Set up versioning via M.W.T.V
|
||||
@@ -1,2 +1,7 @@
|
||||
parameters:
|
||||
- name: containerVersion
|
||||
type: string
|
||||
default: latest
|
||||
|
||||
variables:
|
||||
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:1.0.02566.28'
|
||||
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:${{ parameters.containerVersion }}'
|
||||
|
||||
8
build/scripts/Set-LatestVCToolsVersion.ps1
Normal file
@@ -0,0 +1,8 @@
|
||||
$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml))
|
||||
$VSPackages = $VSInstances.instances.instance.packages.package
|
||||
$LatestVCPackage = ($VSInstances.instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
|
||||
$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,9 +65,6 @@
|
||||
* `clipboard.cpp`
|
||||
* Handles the command prompt line as you see in CMD.exe (known as the processed input line… most other shells handle this themselves with raw input and 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
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
"enum": [
|
||||
"Windows.Terminal.Wsl",
|
||||
"Windows.Terminal.Azure",
|
||||
"Windows.Terminal.PowershellCore"
|
||||
"Windows.Terminal.PowershellCore",
|
||||
"Windows.Terminal.VisualStudio"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@@ -349,7 +350,7 @@
|
||||
"description": "Sets the DWrite font features for the given font. For example, { \"ss01\": 1, \"liga\":0 } will enable ss01 and disable ligatures.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^(([A-Za-z0-9]){4})$": {
|
||||
"^[\\x20-\\x7E]{4}$": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
@@ -359,7 +360,7 @@
|
||||
"description": "Sets the DWrite font axes for the given font. For example, { \"wght\": 200 } will set the font weight to 200.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^([A-Za-z]{4})$": {
|
||||
"^[\\x20-\\x7E]{4}$": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
@@ -618,6 +619,11 @@
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "This will override the profile's `elevate` setting."
|
||||
},
|
||||
"reloadEnvironmentVariables": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "When set to true, a new environment block will be generated when creating a new session. Otherwise, the session will inherit the variables the Terminal was started with."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -1501,8 +1507,10 @@
|
||||
"const": "multipleActions"
|
||||
},
|
||||
"actions": {
|
||||
"$ref": "#/$defs/ShortcutAction",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/ShortcutAction"
|
||||
},
|
||||
"minItems": 1,
|
||||
"description": "A list of other actions."
|
||||
}
|
||||
@@ -1891,6 +1899,14 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"IconStyle": {
|
||||
"enum": [
|
||||
"default",
|
||||
"hidden",
|
||||
"monochrome"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThemeColor": {
|
||||
"description": "A special kind of color for use in themes. Can be an #rrggbb color, #rrggbbaa color, or a special value. 'accent' is evaluated as the user's selected Accent color in the OS, and 'terminalBackground' will be evaluated as the background color of the active terminal pane.",
|
||||
"oneOf": [
|
||||
@@ -1928,6 +1944,10 @@
|
||||
"showCloseButton": {
|
||||
"description": "Controls the visibility of the close button on the tab",
|
||||
"$ref": "#/$defs/ShowCloseButton"
|
||||
},
|
||||
"iconStyle": {
|
||||
"description": "Controls the appearance of a tab's icon",
|
||||
"$ref": "#/$defs/IconStyle"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2065,6 +2085,9 @@
|
||||
{
|
||||
"$ref": "#/$defs/SwitchToTabAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/ScrollToMarkAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/MoveFocusAction"
|
||||
},
|
||||
@@ -2200,6 +2223,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The ID of this command. If one isn't provided, we will generate one internally.",
|
||||
"type": "string"
|
||||
},
|
||||
"iterateOn": {
|
||||
"type": "string",
|
||||
"description": "Used to create iterable commands based on other objects in your settings. Possible values:\n- \"profiles\" \n- \"schemes\"",
|
||||
@@ -2211,7 +2238,15 @@
|
||||
"commands": {
|
||||
"description": "List of commands to execute",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Keybinding/properties/command"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": {
|
||||
"$ref": "#/$defs/Keybinding/properties/command"
|
||||
},
|
||||
"name": {
|
||||
"$ref": "#/$defs/Keybinding/properties/name"
|
||||
}
|
||||
}
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
@@ -2772,20 +2807,35 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"experimental.autoMarkPrompts": {
|
||||
"autoMarkPrompts": {
|
||||
"default": false,
|
||||
"description": "When set to true, prompts will automatically be marked.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental.autoMarkPrompts": {
|
||||
"deprecated": true,
|
||||
"description": "This has been replaced by autoMarkPrompts in 1.21",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental.retroTerminalEffect": {
|
||||
"description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental.showMarksOnScrollbar": {
|
||||
"deprecated": true,
|
||||
"description": "This has been replaced by showMarksOnScrollbar in 1.21",
|
||||
"type": "boolean"
|
||||
},
|
||||
"showMarksOnScrollbar": {
|
||||
"default": false,
|
||||
"description": "When set to true, marks added to the buffer via the addMark action will appear on the scrollbar.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental.rightClickContextMenu": {
|
||||
"default": false,
|
||||
"description": "When set to true, right-clicking on the terminal will show a context menu. When set to false, right-click will copy",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental.repositionCursorWithMouse": {
|
||||
"default": false,
|
||||
"description": "When set to true, you can move the text cursor by clicking with the mouse on the current commandline. This is an experimental feature - there are lots of edge cases where this will not work as expected.",
|
||||
|
||||
28
policies/WindowsTerminal.admx
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c) 2024 Microsoft Corporation -->
|
||||
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<policyNamespaces>
|
||||
<target prefix="terminal" namespace="Microsoft.Policies.WindowsTerminal" />
|
||||
<using prefix="windows" namespace="Microsoft.Policies.Windows" />
|
||||
</policyNamespaces>
|
||||
<resources minRequiredRevision="1.0" />
|
||||
<supportedOn>
|
||||
<definitions>
|
||||
<definition name="SUPPORTED_WindowsTerminal_1_21" displayName="$(string.SUPPORTED_WindowsTerminal_1_21)" />
|
||||
</definitions>
|
||||
</supportedOn>
|
||||
<categories>
|
||||
<category name="WindowsTerminal" displayName="$(string.WindowsTerminal)">
|
||||
<parentCategory ref="windows:WindowsComponents" />
|
||||
</category>
|
||||
</categories>
|
||||
<policies>
|
||||
<policy name="DisabledProfileSources" class="Both" displayName="$(string.DisabledProfileSources)" explainText="$(string.DisabledProfileSourcesText)" presentation="$(presentation.DisabledProfileSources)" key="Software\Policies\Microsoft\Windows Terminal">
|
||||
<parentCategory ref="WindowsTerminal" />
|
||||
<supportedOn ref="SUPPORTED_WindowsTerminal_1_21" />
|
||||
<elements>
|
||||
<multiText id="DisabledProfileSources" valueName="DisabledProfileSources" required="true" />
|
||||
</elements>
|
||||
</policy>
|
||||
</policies>
|
||||
</policyDefinitions>
|
||||
28
policies/en-US/WindowsTerminal.adml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c) 2024 Microsoft Corporation -->
|
||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<displayName>Windows Terminal</displayName>
|
||||
<description>Windows Terminal</description>
|
||||
<resources>
|
||||
<stringTable>
|
||||
<string id="WindowsTerminal">Windows Terminal</string>
|
||||
<string id="SUPPORTED_WindowsTerminal_1_21">At least Windows Terminal 1.21</string>
|
||||
<string id="DisabledProfileSources">Disabled Profile Sources</string>
|
||||
<string id="DisabledProfileSourcesText">Profiles will not be generated from any sources listed here. Source names can be arbitrary strings. Potential candidates can be found as the "source" property on profile definitions in Windows Terminal's settings.json file.
|
||||
|
||||
Common sources are:
|
||||
- Windows.Terminal.Azure
|
||||
- Windows.Terminal.PowershellCore
|
||||
- Windows.Terminal.Wsl
|
||||
|
||||
For instance, setting this policy to Windows.Terminal.Wsl will disable the builtin WSL integration of Windows Terminal.
|
||||
|
||||
Note: Existing profiles will disappear from Windows Terminal after adding their source to this policy.</string>
|
||||
</stringTable>
|
||||
<presentationTable>
|
||||
<presentation id="DisabledProfileSources">
|
||||
<multiTextBox refId="DisabledProfileSources">List of disabled sources (one per line)</multiTextBox>
|
||||
</presentation>
|
||||
</presentationTable>
|
||||
</resources>
|
||||
</policyDefinitionResources>
|
||||
@@ -8,5 +8,5 @@ Please consult the [license](https://raw.githubusercontent.com/microsoft/cascadi
|
||||
|
||||
### Fonts Included
|
||||
|
||||
* Cascadia Code, Cascadia Mono (2111.01)
|
||||
* from microsoft/cascadia-code@de36d62e777d34d3bed92a7e23988e5d61e0ba02
|
||||
* Cascadia Code, Cascadia Mono (2407.24)
|
||||
* from microsoft/cascadia-code@56bcca3f2c1e4cb19458954f0e2bb4635960df91
|
||||
|
||||
@@ -11,7 +11,7 @@ Licensed under the MIT license.
|
||||
#include <conattrs.hpp>
|
||||
#include "MySettings.g.h"
|
||||
|
||||
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, uint32_t>;
|
||||
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
|
||||
using IFontAxesMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>;
|
||||
|
||||
namespace winrt::SampleApp::implementation
|
||||
|
||||
@@ -23,21 +23,24 @@ 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 ScreenToBufferLine(const til::point& line, const LineRendition lineRendition)
|
||||
constexpr til::point ScreenToBufferLineInclusive(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 };
|
||||
}
|
||||
|
||||
91
src/buffer/out/Marks.hpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/*++
|
||||
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,6 +230,7 @@ void ROW::Reset(const TextAttribute& attr) noexcept
|
||||
_lineRendition = LineRendition::SingleWidth;
|
||||
_wrapForced = false;
|
||||
_doubleBytePadded = false;
|
||||
_promptData = std::nullopt;
|
||||
_init();
|
||||
}
|
||||
|
||||
@@ -348,12 +349,6 @@ 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;
|
||||
@@ -365,7 +360,8 @@ void ROW::CopyFrom(const ROW& source)
|
||||
};
|
||||
CopyTextFrom(state);
|
||||
|
||||
TransferAttributes(source.Attributes(), _columnCount);
|
||||
_attr = source.Attributes();
|
||||
_attr.resize_trailing_extent(_columnCount);
|
||||
}
|
||||
|
||||
// Returns the previous possible cursor position, preceding the given column.
|
||||
@@ -918,7 +914,7 @@ const til::small_rle<TextAttribute, uint16_t, 1>& ROW::Attributes() const noexce
|
||||
|
||||
TextAttribute ROW::GetAttrByColumn(const til::CoordType column) const
|
||||
{
|
||||
return _attr.at(_clampedUint16(column));
|
||||
return _attr.at(_clampedColumn(column));
|
||||
}
|
||||
|
||||
std::vector<uint16_t> ROW::GetHyperlinks() const
|
||||
@@ -1101,12 +1097,6 @@ DelimiterClass ROW::DelimiterClassAt(til::CoordType column, const std::wstring_v
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr uint16_t ROW::_clampedUint16(T v) noexcept
|
||||
{
|
||||
return static_cast<uint16_t>(clamp(v, 0, 65535));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr uint16_t ROW::_clampedColumn(T v) const noexcept
|
||||
{
|
||||
@@ -1181,3 +1171,45 @@ 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,6 +8,7 @@
|
||||
#include "LineRendition.hpp"
|
||||
#include "OutputCell.hpp"
|
||||
#include "OutputCellIterator.hpp"
|
||||
#include "Marks.hpp"
|
||||
|
||||
class ROW;
|
||||
class TextBuffer;
|
||||
@@ -131,7 +132,6 @@ 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,6 +167,11 @@ 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;
|
||||
@@ -225,8 +230,6 @@ private:
|
||||
static constexpr uint16_t CharOffsetsTrailer = 0x8000;
|
||||
static constexpr uint16_t CharOffsetsMask = 0x7fff;
|
||||
|
||||
template<typename T>
|
||||
static constexpr uint16_t _clampedUint16(T v) noexcept;
|
||||
template<typename T>
|
||||
constexpr uint16_t _clampedColumn(T v) const noexcept;
|
||||
template<typename T>
|
||||
@@ -299,6 +302,8 @@ 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) == 16);
|
||||
static_assert(sizeof(TextAttribute) == 18);
|
||||
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,4 +434,5 @@ void TextAttribute::SetStandardErase() noexcept
|
||||
{
|
||||
_attrs = CharacterAttributes::Normal;
|
||||
_hyperlinkId = 0;
|
||||
_markKind = MarkKind::None;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,15 @@ 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:
|
||||
@@ -46,7 +55,8 @@ public:
|
||||
_foreground{},
|
||||
_background{},
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{}
|
||||
_underlineColor{},
|
||||
_markKind{ MarkKind::None }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -55,7 +65,8 @@ public:
|
||||
_foreground{ gsl::at(s_legacyForegroundColorMap, wLegacyAttr & FG_ATTRS) },
|
||||
_background{ gsl::at(s_legacyBackgroundColorMap, (wLegacyAttr & BG_ATTRS) >> 4) },
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{}
|
||||
_underlineColor{},
|
||||
_markKind{ MarkKind::None }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -66,7 +77,8 @@ public:
|
||||
_foreground{ rgbForeground },
|
||||
_background{ rgbBackground },
|
||||
_hyperlinkId{ 0 },
|
||||
_underlineColor{ rgbUnderline }
|
||||
_underlineColor{ rgbUnderline },
|
||||
_markKind{ MarkKind::None }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +87,8 @@ public:
|
||||
_foreground{ foreground },
|
||||
_background{ background },
|
||||
_hyperlinkId{ hyperlinkId },
|
||||
_underlineColor{ underlineColor }
|
||||
_underlineColor{ underlineColor },
|
||||
_markKind{ MarkKind::None }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -135,6 +148,15 @@ 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;
|
||||
@@ -202,6 +224,7 @@ 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,19 +6,87 @@
|
||||
|
||||
#include "textBuffer.hpp"
|
||||
|
||||
// All of these are somewhat annoying when trying to implement RefcountBuffer.
|
||||
// You can't stuff a unique_ptr into ut->q (= void*) after all.
|
||||
#pragma warning(disable : 26402) // Return a scoped object instead of a heap-allocated if it has a move constructor (r.3).
|
||||
#pragma warning(disable : 26403) // Reset or explicitly delete an owner<T> pointer '...' (r.3).
|
||||
#pragma warning(disable : 26409) // Avoid calling new and delete explicitly, use std::make_unique<T> instead (r.11).
|
||||
|
||||
struct RowRange
|
||||
{
|
||||
til::CoordType begin;
|
||||
til::CoordType end;
|
||||
};
|
||||
|
||||
struct RefcountBuffer
|
||||
{
|
||||
size_t references;
|
||||
size_t capacity;
|
||||
wchar_t data[1];
|
||||
|
||||
static RefcountBuffer* EnsureCapacityForOverwrite(RefcountBuffer* buffer, size_t capacity)
|
||||
{
|
||||
// We must not just ensure that `buffer` has at least `capacity`, but also that its reference count is <= 1, because otherwise we would resize a shared buffer.
|
||||
if (buffer != nullptr && buffer->references <= 1 && buffer->capacity >= capacity)
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const auto oldCapacity = buffer ? buffer->capacity << 1 : 0;
|
||||
const auto newCapacity = std::max(capacity + 128, oldCapacity);
|
||||
const auto newBuffer = static_cast<RefcountBuffer*>(::operator new(sizeof(RefcountBuffer) - sizeof(data) + newCapacity * sizeof(wchar_t)));
|
||||
|
||||
if (!newBuffer)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (buffer)
|
||||
{
|
||||
buffer->Release();
|
||||
}
|
||||
|
||||
// Copying the old buffer's data is not necessary because utextAccess() will scribble right over it.
|
||||
newBuffer->references = 1;
|
||||
newBuffer->capacity = newCapacity;
|
||||
return newBuffer;
|
||||
}
|
||||
|
||||
void AddRef() noexcept
|
||||
{
|
||||
// With our usage patterns, either of these two would indicate
|
||||
// an unbalanced AddRef/Release or a memory corruption.
|
||||
assert(references > 0 && references < 1000);
|
||||
references++;
|
||||
}
|
||||
|
||||
void Release() noexcept
|
||||
{
|
||||
// With our usage patterns, either of these two would indicate
|
||||
// an unbalanced AddRef/Release or a memory corruption.
|
||||
assert(references > 0 && references < 1000);
|
||||
if (--references == 0)
|
||||
{
|
||||
::operator delete(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
constexpr size_t& accessLength(UText* ut) noexcept
|
||||
{
|
||||
static_assert(sizeof(ut->p) == sizeof(size_t));
|
||||
return *std::bit_cast<size_t*>(&ut->p);
|
||||
}
|
||||
|
||||
constexpr RefcountBuffer*& accessBuffer(UText* ut) noexcept
|
||||
{
|
||||
static_assert(sizeof(ut->q) == sizeof(RefcountBuffer*));
|
||||
return *std::bit_cast<RefcountBuffer**>(&ut->q);
|
||||
}
|
||||
|
||||
constexpr RowRange& accessRowRange(UText* ut) noexcept
|
||||
{
|
||||
static_assert(sizeof(ut->a) == sizeof(RowRange));
|
||||
return *std::bit_cast<RowRange*>(&ut->a);
|
||||
}
|
||||
|
||||
@@ -56,11 +124,16 @@ static UText* U_CALLCONV utextClone(UText* dest, const UText* src, UBool deep, U
|
||||
}
|
||||
|
||||
dest = utext_setup(dest, 0, status);
|
||||
if (*status <= U_ZERO_ERROR)
|
||||
if (*status > U_ZERO_ERROR)
|
||||
{
|
||||
memcpy(dest, src, sizeof(UText));
|
||||
return dest;
|
||||
}
|
||||
|
||||
memcpy(dest, src, sizeof(UText));
|
||||
if (const auto buf = accessBuffer(dest))
|
||||
{
|
||||
buf->AddRef();
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
@@ -82,7 +155,9 @@ try
|
||||
|
||||
for (til::CoordType y = range.begin; y < range.end; ++y)
|
||||
{
|
||||
length += textBuffer.GetRowByOffset(y).GetText().size();
|
||||
const auto& row = textBuffer.GetRowByOffset(y);
|
||||
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
|
||||
length += row.GetText().size() + !row.WasWrapForced();
|
||||
}
|
||||
|
||||
accessLength(ut) = length;
|
||||
@@ -111,12 +186,9 @@ catch (...)
|
||||
static UBool U_CALLCONV utextAccess(UText* ut, int64_t nativeIndex, UBool forward) noexcept
|
||||
try
|
||||
{
|
||||
if (nativeIndex < 0)
|
||||
{
|
||||
nativeIndex = 0;
|
||||
}
|
||||
|
||||
auto neededIndex = nativeIndex;
|
||||
// This will make it simpler for us to search the row that contains the nativeIndex,
|
||||
// because we'll now only need to check for `start<=index<limit` and nothing else.
|
||||
if (!forward)
|
||||
{
|
||||
neededIndex--;
|
||||
@@ -124,13 +196,17 @@ try
|
||||
|
||||
const auto& textBuffer = *static_cast<const TextBuffer*>(ut->context);
|
||||
const auto range = accessRowRange(ut);
|
||||
auto start = ut->chunkNativeStart;
|
||||
auto limit = ut->chunkNativeLimit;
|
||||
auto y = accessCurrentRow(ut);
|
||||
std::wstring_view text;
|
||||
const auto startOld = ut->chunkNativeStart;
|
||||
const auto limitOld = ut->chunkNativeLimit;
|
||||
auto start = startOld;
|
||||
auto limit = limitOld;
|
||||
|
||||
if (neededIndex < start || neededIndex >= limit)
|
||||
if (neededIndex < startOld || neededIndex >= limitOld)
|
||||
{
|
||||
auto y = accessCurrentRow(ut);
|
||||
std::wstring_view text;
|
||||
bool wasWrapForced = false;
|
||||
|
||||
if (neededIndex < start)
|
||||
{
|
||||
do
|
||||
@@ -138,12 +214,16 @@ try
|
||||
--y;
|
||||
if (y < range.begin)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
text = textBuffer.GetRowByOffset(y).GetText();
|
||||
const auto& row = textBuffer.GetRowByOffset(y);
|
||||
text = row.GetText();
|
||||
wasWrapForced = row.WasWrapForced();
|
||||
|
||||
limit = start;
|
||||
start -= text.size();
|
||||
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
|
||||
start -= text.size() + !wasWrapForced;
|
||||
} while (neededIndex < start);
|
||||
}
|
||||
else
|
||||
@@ -153,35 +233,63 @@ try
|
||||
++y;
|
||||
if (y >= range.end)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
text = textBuffer.GetRowByOffset(y).GetText();
|
||||
const auto& row = textBuffer.GetRowByOffset(y);
|
||||
text = row.GetText();
|
||||
wasWrapForced = row.WasWrapForced();
|
||||
|
||||
start = limit;
|
||||
limit += text.size();
|
||||
// Later down below we'll add a newline to the text if !wasWrapForced, so we need to account for that here.
|
||||
limit += text.size() + !wasWrapForced;
|
||||
} while (neededIndex >= limit);
|
||||
}
|
||||
|
||||
accessCurrentRow(ut) = y;
|
||||
ut->chunkNativeStart = start;
|
||||
ut->chunkNativeLimit = limit;
|
||||
ut->chunkLength = gsl::narrow_cast<int32_t>(text.size());
|
||||
assert(start >= 0);
|
||||
// If we have already calculated the total length we can also assert that the limit is in range.
|
||||
assert(ut->p == nullptr || static_cast<size_t>(limit) <= accessLength(ut));
|
||||
|
||||
// Even if we went out-of-bounds, we still need to update the chunkContents to contain the first/last chunk.
|
||||
if (limit != limitOld)
|
||||
{
|
||||
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;
|
||||
ut->chunkLength = gsl::narrow_cast<int32_t>(text.size());
|
||||
#pragma warning(suppress : 26490) // Don't use reinterpret_cast (type.1).
|
||||
ut->chunkContents = reinterpret_cast<const char16_t*>(text.data());
|
||||
ut->nativeIndexingLimit = ut->chunkLength;
|
||||
ut->chunkContents = reinterpret_cast<const char16_t*>(text.data());
|
||||
ut->nativeIndexingLimit = ut->chunkLength;
|
||||
}
|
||||
}
|
||||
|
||||
auto offset = gsl::narrow_cast<int32_t>(nativeIndex - start);
|
||||
|
||||
// The ICU documentation is a little bit misleading. It states:
|
||||
// > @param forward [...] If true, start<=index<limit. If false, [...] start<index<=limit.
|
||||
// but that's just for finding the target chunk. The chunkOffset is not actually constrained to that!
|
||||
// std::clamp will perform a<=b<=c, which is what we want.
|
||||
const auto clampedIndex = std::clamp(nativeIndex, start, limit);
|
||||
auto offset = gsl::narrow_cast<int32_t>(clampedIndex - start);
|
||||
// Don't leave the offset on a trailing surrogate pair. See U16_SET_CP_START.
|
||||
// This assumes that the TextBuffer contains valid UTF-16 which may theoretically not be the case.
|
||||
if (offset > 0 && offset < ut->chunkLength && U16_IS_TRAIL(til::at(ut->chunkContents, offset)))
|
||||
{
|
||||
offset--;
|
||||
}
|
||||
|
||||
ut->chunkOffset = offset;
|
||||
return true;
|
||||
|
||||
return neededIndex >= start && neededIndex < limit;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -256,18 +364,32 @@ catch (...)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void U_CALLCONV utextClose(UText* ut) noexcept
|
||||
{
|
||||
if (const auto buffer = accessBuffer(ut))
|
||||
{
|
||||
buffer->Release();
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr UTextFuncs utextFuncs{
|
||||
.tableSize = sizeof(UTextFuncs),
|
||||
.clone = utextClone,
|
||||
.nativeLength = utextNativeLength,
|
||||
.access = utextAccess,
|
||||
.close = utextClose,
|
||||
};
|
||||
|
||||
// Creates a UText from the given TextBuffer that spans rows [rowBeg,RowEnd).
|
||||
UText Microsoft::Console::ICU::UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept
|
||||
Microsoft::Console::ICU::unique_utext Microsoft::Console::ICU::UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept
|
||||
{
|
||||
#pragma warning(suppress : 26477) // Use 'nullptr' rather than 0 or NULL (es.47).
|
||||
UText ut = UTEXT_INITIALIZER;
|
||||
unique_utext ut{ UTEXT_INITIALIZER };
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
utext_setup(&ut, 0, &status);
|
||||
FAIL_FAST_IF(status > U_ZERO_ERROR);
|
||||
|
||||
ut.providerProperties = (1 << UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE) | (1 << UTEXT_PROVIDER_STABLE_CHUNKS);
|
||||
ut.pFuncs = &utextFuncs;
|
||||
ut.context = &textBuffer;
|
||||
|
||||
@@ -10,8 +10,9 @@ class TextBuffer;
|
||||
namespace Microsoft::Console::ICU
|
||||
{
|
||||
using unique_uregex = wistd::unique_ptr<URegularExpression, wil::function_deleter<decltype(&uregex_close), &uregex_close>>;
|
||||
using unique_utext = wil::unique_struct<UText, decltype(&utext_close), &utext_close>;
|
||||
|
||||
UText UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
|
||||
unique_utext UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
|
||||
unique_uregex CreateRegex(const std::wstring_view& pattern, uint32_t flags, UErrorCode* status) noexcept;
|
||||
til::point_span BufferRangeFromMatch(UText* ut, URegularExpression* re);
|
||||
}
|
||||
|
||||
@@ -188,11 +188,7 @@ void Cursor::_RedrawCursor() noexcept
|
||||
// - <none>
|
||||
void Cursor::_RedrawCursorAlways() noexcept
|
||||
{
|
||||
try
|
||||
{
|
||||
_parentBuffer.TriggerRedrawCursor(_cPosition);
|
||||
}
|
||||
CATCH_LOG();
|
||||
_parentBuffer.NotifyPaintFrame();
|
||||
}
|
||||
|
||||
void Cursor::SetPosition(const til::point cPosition) noexcept
|
||||
|
||||
@@ -8,37 +8,37 @@
|
||||
|
||||
using namespace Microsoft::Console::Types;
|
||||
|
||||
bool Search::ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive)
|
||||
bool Search::IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags) const noexcept
|
||||
{
|
||||
return _renderData != &renderData ||
|
||||
_needle != needle ||
|
||||
_flags != flags ||
|
||||
_lastMutationId != renderData.GetTextBuffer().GetLastMutationId();
|
||||
}
|
||||
|
||||
void Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse)
|
||||
{
|
||||
const auto& textBuffer = renderData.GetTextBuffer();
|
||||
const auto lastMutationId = textBuffer.GetLastMutationId();
|
||||
|
||||
if (_needle == needle &&
|
||||
_caseInsensitive == caseInsensitive &&
|
||||
_lastMutationId == lastMutationId)
|
||||
{
|
||||
_step = reverse ? -1 : 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
_renderData = &renderData;
|
||||
_needle = needle;
|
||||
_caseInsensitive = caseInsensitive;
|
||||
_lastMutationId = lastMutationId;
|
||||
_flags = flags;
|
||||
_lastMutationId = textBuffer.GetLastMutationId();
|
||||
|
||||
_results = textBuffer.SearchText(needle, caseInsensitive);
|
||||
auto result = textBuffer.SearchText(needle, _flags);
|
||||
_ok = result.has_value();
|
||||
_results = std::move(result).value_or(std::vector<til::point_span>{});
|
||||
_index = reverse ? gsl::narrow_cast<ptrdiff_t>(_results.size()) - 1 : 0;
|
||||
_step = reverse ? -1 : 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Search::MoveToCurrentSelection()
|
||||
{
|
||||
if (_renderData->IsSelectionActive())
|
||||
{
|
||||
MoveToPoint(_renderData->GetTextBuffer().ScreenToBufferPosition(_renderData->GetSelectionAnchor()));
|
||||
}
|
||||
else if (const auto span = _renderData->GetSearchHighlightFocused())
|
||||
{
|
||||
MoveToPoint(_step > 0 ? span->start : span->end);
|
||||
}
|
||||
}
|
||||
|
||||
void Search::MoveToPoint(const til::point anchor) noexcept
|
||||
@@ -93,8 +93,9 @@ void Search::MovePastPoint(const til::point anchor) noexcept
|
||||
_index = (index + count) % count;
|
||||
}
|
||||
|
||||
void Search::FindNext() noexcept
|
||||
void Search::FindNext(bool reverse) noexcept
|
||||
{
|
||||
_step = reverse ? -1 : 1;
|
||||
if (const auto count{ gsl::narrow_cast<ptrdiff_t>(_results.size()) })
|
||||
{
|
||||
_index = (_index + _step + count) % count;
|
||||
@@ -111,28 +112,6 @@ const til::point_span* Search::GetCurrent() const noexcept
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Search::HighlightResults() const
|
||||
{
|
||||
std::vector<til::inclusive_rect> toSelect;
|
||||
const auto& textBuffer = _renderData->GetTextBuffer();
|
||||
|
||||
for (const auto& r : _results)
|
||||
{
|
||||
const auto rbStart = textBuffer.BufferToScreenPosition(r.start);
|
||||
const auto rbEnd = textBuffer.BufferToScreenPosition(r.end);
|
||||
|
||||
til::inclusive_rect re;
|
||||
re.top = rbStart.y;
|
||||
re.bottom = rbEnd.y;
|
||||
re.left = rbStart.x;
|
||||
re.right = rbEnd.x;
|
||||
|
||||
toSelect.emplace_back(re);
|
||||
}
|
||||
|
||||
_renderData->SelectSearchRegions(std::move(toSelect));
|
||||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Takes the found word and selects it in the screen buffer
|
||||
|
||||
@@ -158,7 +137,17 @@ 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;
|
||||
}
|
||||
|
||||
bool Search::IsOk() const noexcept
|
||||
{
|
||||
return _ok;
|
||||
}
|
||||
|
||||
@@ -20,32 +20,44 @@ Revision History:
|
||||
#include "textBuffer.hpp"
|
||||
#include "../renderer/inc/IRenderData.hpp"
|
||||
|
||||
enum class SearchFlag : unsigned int
|
||||
{
|
||||
None = 0,
|
||||
|
||||
CaseInsensitive = 1 << 0,
|
||||
RegularExpression = 1 << 1,
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(SearchFlag);
|
||||
|
||||
class Search final
|
||||
{
|
||||
public:
|
||||
Search() = default;
|
||||
|
||||
bool ResetIfStale(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, bool reverse, bool caseInsensitive);
|
||||
bool IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags) const noexcept;
|
||||
void Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse);
|
||||
|
||||
void MoveToCurrentSelection();
|
||||
void MoveToPoint(til::point anchor) noexcept;
|
||||
void MovePastPoint(til::point anchor) noexcept;
|
||||
void FindNext() noexcept;
|
||||
void FindNext(bool reverse) noexcept;
|
||||
|
||||
const til::point_span* GetCurrent() const noexcept;
|
||||
void HighlightResults() const;
|
||||
bool SelectCurrent() const;
|
||||
|
||||
const std::vector<til::point_span>& Results() const noexcept;
|
||||
std::vector<til::point_span>&& ExtractResults() noexcept;
|
||||
ptrdiff_t CurrentMatch() const noexcept;
|
||||
bool IsOk() const noexcept;
|
||||
|
||||
private:
|
||||
// _renderData is a pointer so that Search() is constexpr default constructable.
|
||||
Microsoft::Console::Render::IRenderData* _renderData = nullptr;
|
||||
std::wstring _needle;
|
||||
bool _caseInsensitive = false;
|
||||
SearchFlag _flags{};
|
||||
uint64_t _lastMutationId = 0;
|
||||
|
||||
bool _ok{ false };
|
||||
std::vector<til::point_span> _results;
|
||||
ptrdiff_t _index = 0;
|
||||
ptrdiff_t _step = 0;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "../../types/inc/GlyphWidth.hpp"
|
||||
#include "../renderer/base/renderer.hpp"
|
||||
#include "../types/inc/utils.hpp"
|
||||
#include "search.h"
|
||||
|
||||
using namespace Microsoft::Console;
|
||||
using namespace Microsoft::Console::Types;
|
||||
@@ -562,7 +563,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::Write(til::CoordType row, const TextAttribute& attributes, RowWriteState& state)
|
||||
void TextBuffer::Replace(til::CoordType row, const TextAttribute& attributes, RowWriteState& state)
|
||||
{
|
||||
auto& r = GetMutableRowByOffset(row);
|
||||
r.ReplaceText(state);
|
||||
@@ -570,6 +571,36 @@ void TextBuffer::Write(til::CoordType row, const TextAttribute& attributes, RowW
|
||||
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)
|
||||
{
|
||||
@@ -1083,11 +1114,8 @@ 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);
|
||||
const auto fillLength = gsl::narrow<size_t>(GetSize().Width() - fillOffset);
|
||||
const OutputCellIterator fillData{ fillChar, fillAttributes, fillLength };
|
||||
row.WriteCells(fillData, fillOffset, false);
|
||||
FillRect({ fillOffset, rowIndex, til::CoordTypeMax, rowIndex + 1 }, L" ", fillAttributes);
|
||||
// We also need to make sure the cursor is clamped within the new width.
|
||||
GetCursor().SetPosition(ClampPositionWithinLine(cursorPosition));
|
||||
}
|
||||
@@ -1149,37 +1177,40 @@ void TextBuffer::Reset() noexcept
|
||||
_initialAttributes = _currentAttributes;
|
||||
}
|
||||
|
||||
void TextBuffer::ClearScrollback(const til::CoordType start, const til::CoordType height)
|
||||
// Arguments:
|
||||
// - newFirstRow: The current y-position of the viewport. We'll clear up until here.
|
||||
// - rowsToKeep: the number of rows to keep in the buffer.
|
||||
void TextBuffer::ClearScrollback(const til::CoordType newFirstRow, const til::CoordType rowsToKeep)
|
||||
{
|
||||
if (start <= 0)
|
||||
// We're already at the top? don't clear anything. There's no scrollback.
|
||||
if (newFirstRow <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (height <= 0)
|
||||
// The new viewport should keep 0 rows? Then just reset everything.
|
||||
if (rowsToKeep <= 0)
|
||||
{
|
||||
_decommit();
|
||||
return;
|
||||
}
|
||||
|
||||
ClearMarksInRange(til::point{ 0, 0 }, til::point{ _width, std::max(0, newFirstRow - 1) });
|
||||
|
||||
// Our goal is to move the viewport to the absolute start of the underlying memory buffer so that we can
|
||||
// MEM_DECOMMIT the remaining memory. _firstRow is used to make the TextBuffer behave like a circular buffer.
|
||||
// The start parameter is relative to the _firstRow. The trick to get the content to the absolute start
|
||||
// The newFirstRow parameter is relative to the _firstRow. The trick to get the content to the absolute start
|
||||
// is to simply add _firstRow ourselves and then reset it to 0. This causes ScrollRows() to write into
|
||||
// the absolute start while reading from relative coordinates. This works because GetRowByOffset()
|
||||
// operates modulo the buffer height and so the possibly-too-large startAbsolute won't be an issue.
|
||||
const auto startAbsolute = _firstRow + start;
|
||||
const auto startAbsolute = _firstRow + newFirstRow;
|
||||
_firstRow = 0;
|
||||
ScrollRows(startAbsolute, height, -startAbsolute);
|
||||
ScrollRows(startAbsolute, rowsToKeep, -startAbsolute);
|
||||
|
||||
const auto end = _estimateOffsetOfLastCommittedRow();
|
||||
for (auto y = height; y <= end; ++y)
|
||||
for (auto y = rowsToKeep; y <= end; ++y)
|
||||
{
|
||||
GetMutableRowByOffset(y).Reset(_initialAttributes);
|
||||
}
|
||||
|
||||
ScrollMarks(-start);
|
||||
ClearMarksInRange(til::point{ 0, height }, til::point{ _width, _height });
|
||||
}
|
||||
|
||||
// Routine Description:
|
||||
@@ -1239,6 +1270,14 @@ 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)
|
||||
@@ -1247,14 +1286,6 @@ void TextBuffer::TriggerRedraw(const Viewport& viewport)
|
||||
}
|
||||
}
|
||||
|
||||
void TextBuffer::TriggerRedrawCursor(const til::point position)
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
{
|
||||
_renderer.TriggerRedrawCursor(&position);
|
||||
}
|
||||
}
|
||||
|
||||
void TextBuffer::TriggerRedrawAll()
|
||||
{
|
||||
if (_isActiveBuffer)
|
||||
@@ -1297,7 +1328,8 @@ 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
|
||||
{
|
||||
return GetRowByOffset(pos.y).DelimiterClassAt(pos.x, wordDelimiters);
|
||||
const auto realPos = ScreenToBufferPosition(pos);
|
||||
return GetRowByOffset(realPos.y).DelimiterClassAt(realPos.x, wordDelimiters);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1413,10 +1445,23 @@ til::point TextBuffer::_GetWordStartForSelection(const til::point target, const
|
||||
// expand left until we hit the left boundary or a different delimiter class
|
||||
while (result != bufferSize.Origin() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
|
||||
{
|
||||
//prevent selection wrapping on whitespace selection
|
||||
if (isControlChar && result.x == bufferSize.Left())
|
||||
if (result.x == bufferSize.Left())
|
||||
{
|
||||
break;
|
||||
// Prevent wrapping to the previous line if the selection begins on whitespace
|
||||
if (isControlChar)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (result.y > 0)
|
||||
{
|
||||
// Prevent wrapping to the previous line if it was hard-wrapped (e.g. not forced by us to wrap)
|
||||
const auto& priorRow = GetRowByOffset(result.y - 1);
|
||||
if (!priorRow.WasWrapForced())
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
bufferSize.DecrementInBounds(result);
|
||||
}
|
||||
@@ -1536,10 +1581,22 @@ til::point TextBuffer::_GetWordEndForSelection(const til::point target, const st
|
||||
// expand right until we hit the right boundary as a ControlChar or a different delimiter class
|
||||
while (result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
|
||||
{
|
||||
if (isControlChar && result.x == bufferSize.RightInclusive())
|
||||
if (result.x == bufferSize.RightInclusive())
|
||||
{
|
||||
break;
|
||||
// Prevent wrapping to the next line if the selection begins on whitespace
|
||||
if (isControlChar)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent wrapping to the next line if this one was hard-wrapped (e.g. not forced by us to wrap)
|
||||
const auto& row = GetRowByOffset(result.y);
|
||||
if (!row.WasWrapForced())
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bufferSize.IncrementInBoundsCircular(result);
|
||||
}
|
||||
|
||||
@@ -1893,8 +1950,8 @@ std::vector<til::point_span> TextBuffer::GetTextSpans(til::point start, til::poi
|
||||
// equivalent buffer offsets, taking line rendition into account.
|
||||
if (!bufferCoordinates)
|
||||
{
|
||||
higherCoord = ScreenToBufferLine(higherCoord, GetLineRendition(higherCoord.y));
|
||||
lowerCoord = ScreenToBufferLine(lowerCoord, GetLineRendition(lowerCoord.y));
|
||||
higherCoord = ScreenToBufferLineInclusive(higherCoord, GetLineRendition(higherCoord.y));
|
||||
lowerCoord = ScreenToBufferLineInclusive(lowerCoord, GetLineRendition(lowerCoord.y));
|
||||
}
|
||||
|
||||
til::inclusive_rect asRect = { higherCoord.x, higherCoord.y, lowerCoord.x, lowerCoord.y };
|
||||
@@ -1968,25 +2025,10 @@ size_t TextBuffer::SpanLength(const til::point coordStart, const til::point coor
|
||||
// - end - where to end getting text
|
||||
// Return Value:
|
||||
// - Just the text.
|
||||
std::wstring TextBuffer::GetPlainText(const til::point& start, const til::point& end) const
|
||||
std::wstring TextBuffer::GetPlainText(const til::point start, const til::point end) const
|
||||
{
|
||||
std::wstring text;
|
||||
auto spanLength = SpanLength(start, end);
|
||||
text.reserve(spanLength);
|
||||
|
||||
auto it = GetCellDataAt(start);
|
||||
|
||||
for (; it && spanLength > 0; ++it, --spanLength)
|
||||
{
|
||||
const auto& cell = *it;
|
||||
if (cell.DbcsAttr() != DbcsAttribute::Trailing)
|
||||
{
|
||||
const auto chars = cell.Chars();
|
||||
text.append(chars);
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
const auto req = CopyRequest::FromConfig(*this, start, end, true, false, false, false);
|
||||
return GetPlainText(req);
|
||||
}
|
||||
|
||||
// Routine Description:
|
||||
@@ -2005,8 +2047,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 : ScreenToBufferLine(til::point{ req.minX, iRow }, lineRendition).x;
|
||||
const auto maxX = req.bufferCoordinates ? req.maxX : ScreenToBufferLine(til::point{ req.maxX, iRow }, lineRendition).x;
|
||||
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;
|
||||
|
||||
rowBeg = minX;
|
||||
rowEnd = maxX + 1; // +1 to get an exclusive end
|
||||
@@ -2014,8 +2056,8 @@ std::tuple<til::CoordType, til::CoordType, bool> TextBuffer::_RowCopyHelper(cons
|
||||
else
|
||||
{
|
||||
const auto lineRendition = row.GetLineRendition();
|
||||
const auto beg = req.bufferCoordinates ? req.beg : ScreenToBufferLine(req.beg, lineRendition);
|
||||
const auto end = req.bufferCoordinates ? req.end : ScreenToBufferLine(req.end, lineRendition);
|
||||
const auto beg = req.bufferCoordinates ? req.beg : ScreenToBufferLineInclusive(req.beg, lineRendition);
|
||||
const auto end = req.bufferCoordinates ? req.end : ScreenToBufferLineInclusive(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
|
||||
@@ -2374,7 +2416,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{}"), std::to_string(2 * fontHeightPoints));
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\fs{}"), 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
|
||||
@@ -2501,8 +2543,7 @@ void TextBuffer::_AppendRTFText(std::string& contentBuilder, const std::wstring_
|
||||
{
|
||||
// Windows uses unsigned wchar_t - RTF uses signed ones.
|
||||
// '?' is the fallback ascii character.
|
||||
const auto codeUnitRTFStr = std::to_string(std::bit_cast<int16_t>(codeUnit));
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\u{}?"), codeUnitRTFStr);
|
||||
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\u{}?"), std::bit_cast<int16_t>(codeUnit));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2523,6 +2564,7 @@ void TextBuffer::Serialize(const wchar_t* destination) const
|
||||
TextColor previousBg;
|
||||
TextColor previousUl;
|
||||
uint16_t previousHyperlinkId = 0;
|
||||
bool delayedLineBreak = false;
|
||||
|
||||
// This iterates through each row. The exit condition is at the end
|
||||
// of the for() loop so that we can properly handle file flushing.
|
||||
@@ -2542,9 +2584,11 @@ void TextBuffer::Serialize(const wchar_t* destination) const
|
||||
}
|
||||
|
||||
const auto& runs = row.Attributes().runs();
|
||||
auto it = runs.begin();
|
||||
const auto beg = runs.begin();
|
||||
const auto end = runs.end();
|
||||
auto it = beg;
|
||||
const auto last = end - 1;
|
||||
const auto lastCharX = row.MeasureRight();
|
||||
til::CoordType oldX = 0;
|
||||
|
||||
for (; it != end; ++it)
|
||||
@@ -2724,24 +2768,55 @@ void TextBuffer::Serialize(const wchar_t* destination) const
|
||||
}
|
||||
}
|
||||
|
||||
auto newX = oldX + it->length;
|
||||
// Trim whitespace with default attributes from the end of each line.
|
||||
if (it == last && it->value == TextAttribute{})
|
||||
// Initially, the buffer is initialized with the default attributes, but once it begins to scroll,
|
||||
// newly scrolled in rows are initialized with the current attributes. This means we need to set
|
||||
// the current attributes to those of the upcoming row before the row comes up. Or inversely:
|
||||
// We let the row come up, let it set its attributes and only then print the newline.
|
||||
if (delayedLineBreak)
|
||||
{
|
||||
// This can result in oldX > newX, but that's okay because GetText()
|
||||
// is robust against that and returns an empty string.
|
||||
newX = row.MeasureRight();
|
||||
buffer.append(L"\r\n");
|
||||
delayedLineBreak = false;
|
||||
}
|
||||
|
||||
auto newX = oldX + it->length;
|
||||
|
||||
// Since our text buffer doesn't store the original input text, the information over the amount of trailing
|
||||
// whitespaces was lost. If we don't do anything here then a row that just says "Hello" would be serialized
|
||||
// to "Hello ...". If the user restores the buffer dump with a different window size,
|
||||
// this would result in some fairly ugly reflow. This code attempts to at least trim trailing whitespaces.
|
||||
//
|
||||
// As mentioned above for `delayedLineBreak`, rows are initialized with their first attribute, BUT
|
||||
// only if the viewport has begun to scroll. Otherwise, they're initialized with the default attributes.
|
||||
// In other words, we can only skip \x1b[K = Erase in Line, if both the first/last attribute are the default attribute.
|
||||
static constexpr TextAttribute defaultAttr;
|
||||
const auto trimTrailingWhitespaces = it == last && lastCharX < newX;
|
||||
const auto clearToEndOfLine = trimTrailingWhitespaces && (beg->value != defaultAttr || last->value != defaultAttr);
|
||||
|
||||
if (trimTrailingWhitespaces)
|
||||
{
|
||||
newX = lastCharX;
|
||||
}
|
||||
|
||||
buffer.append(row.GetText(oldX, newX));
|
||||
|
||||
if (clearToEndOfLine)
|
||||
{
|
||||
buffer.append(L"\x1b[K");
|
||||
}
|
||||
|
||||
oldX = newX;
|
||||
}
|
||||
|
||||
const auto moreRowsRemaining = currentRow < lastRowWithText;
|
||||
delayedLineBreak = !row.WasWrapForced();
|
||||
|
||||
if (!row.WasWrapForced() || !moreRowsRemaining)
|
||||
if (!moreRowsRemaining)
|
||||
{
|
||||
buffer.append(L"\r\n");
|
||||
if (previousHyperlinkId)
|
||||
{
|
||||
buffer.append(L"\x1b]8;;\x1b\\");
|
||||
}
|
||||
buffer.append(L"\x1b[m\r\n");
|
||||
}
|
||||
|
||||
if (buffer.size() >= writeThreshold || !moreRowsRemaining)
|
||||
@@ -2749,10 +2824,8 @@ 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));
|
||||
if (bytesWritten != fileSize)
|
||||
{
|
||||
THROW_WIN32_MSG(ERROR_WRITE_FAULT, "failed to write");
|
||||
}
|
||||
THROW_WIN32_IF_MSG(ERROR_WRITE_FAULT, bytesWritten != fileSize, "failed to write");
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
if (!moreRowsRemaining)
|
||||
@@ -2871,6 +2944,18 @@ 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.
|
||||
@@ -2956,6 +3041,15 @@ void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const View
|
||||
}
|
||||
}
|
||||
|
||||
// The for loop right after this if condition will copy entire rows of attributes at a time.
|
||||
// This assumes of course that the "write cursor" (newX, newY) is at the start of a row.
|
||||
// If we didn't check for this, we may otherwise copy attributes from a later row into a previous one.
|
||||
if (newX != 0)
|
||||
{
|
||||
newX = 0;
|
||||
newY++;
|
||||
}
|
||||
|
||||
// Finish copying buffer attributes to remaining rows below the last
|
||||
// printable character. This is to fix the `color 2f` scenario, where you
|
||||
// change the buffer colors then resize and everything below the last
|
||||
@@ -2990,9 +3084,6 @@ 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:
|
||||
@@ -3103,14 +3194,15 @@ void TextBuffer::CopyHyperlinkMaps(const TextBuffer& other)
|
||||
|
||||
// Searches through the entire (committed) text buffer for `needle` and returns the coordinates in absolute coordinates.
|
||||
// The end coordinates of the returned ranges are considered inclusive.
|
||||
std::vector<til::point_span> TextBuffer::SearchText(const std::wstring_view& needle, bool caseInsensitive) const
|
||||
std::optional<std::vector<til::point_span>> TextBuffer::SearchText(const std::wstring_view& needle, SearchFlag flags) const
|
||||
{
|
||||
return SearchText(needle, caseInsensitive, 0, til::CoordTypeMax);
|
||||
return SearchText(needle, flags, 0, til::CoordTypeMax);
|
||||
}
|
||||
|
||||
// Searches through the given rows [rowBeg,rowEnd) for `needle` and returns the coordinates in absolute coordinates.
|
||||
// While the end coordinates of the returned ranges are considered inclusive, the [rowBeg,rowEnd) range is half-open.
|
||||
std::vector<til::point_span> TextBuffer::SearchText(const std::wstring_view& needle, bool caseInsensitive, til::CoordType rowBeg, til::CoordType rowEnd) const
|
||||
// Returns nullopt if the parameters were invalid (e.g. regex search was requested with an invalid regex)
|
||||
std::optional<std::vector<til::point_span>> TextBuffer::SearchText(const std::wstring_view& needle, SearchFlag flags, til::CoordType rowBeg, til::CoordType rowEnd) const
|
||||
{
|
||||
rowEnd = std::min(rowEnd, _estimateOffsetOfLastCommittedRow() + 1);
|
||||
|
||||
@@ -3124,11 +3216,25 @@ std::vector<til::point_span> TextBuffer::SearchText(const std::wstring_view& nee
|
||||
|
||||
auto text = ICU::UTextFromTextBuffer(*this, rowBeg, rowEnd);
|
||||
|
||||
uint32_t flags = UREGEX_LITERAL;
|
||||
WI_SetFlagIf(flags, UREGEX_CASE_INSENSITIVE, caseInsensitive);
|
||||
uint32_t icuFlags{ 0 };
|
||||
WI_SetFlagIf(icuFlags, UREGEX_CASE_INSENSITIVE, WI_IsFlagSet(flags, SearchFlag::CaseInsensitive));
|
||||
|
||||
if (WI_IsFlagSet(flags, SearchFlag::RegularExpression))
|
||||
{
|
||||
WI_SetFlag(icuFlags, UREGEX_MULTILINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
WI_SetFlag(icuFlags, UREGEX_LITERAL);
|
||||
}
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
const auto re = ICU::CreateRegex(needle, flags, &status);
|
||||
const auto re = ICU::CreateRegex(needle, icuFlags, &status);
|
||||
if (status > U_ZERO_ERROR)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
uregex_setUText(re.get(), &text, &status);
|
||||
|
||||
if (uregex_find(re.get(), -1, &status))
|
||||
@@ -3142,9 +3248,82 @@ std::vector<til::point_span> TextBuffer::SearchText(const std::wstring_view& nee
|
||||
return results;
|
||||
}
|
||||
|
||||
const std::vector<ScrollMark>& TextBuffer::GetMarks() const noexcept
|
||||
// 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
|
||||
{
|
||||
return _marks;
|
||||
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;
|
||||
}
|
||||
|
||||
// Remove all marks between `start` & `end`, inclusive.
|
||||
@@ -3152,115 +3331,318 @@ void TextBuffer::ClearMarksInRange(
|
||||
const til::point start,
|
||||
const til::point end)
|
||||
{
|
||||
auto inRange = [&start, &end](const ScrollMark& m) {
|
||||
return (m.start >= start && m.start <= end) ||
|
||||
(m.end >= start && m.end <= 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,
|
||||
};
|
||||
|
||||
_marks.erase(std::remove_if(_marks.begin(),
|
||||
_marks.end(),
|
||||
inRange),
|
||||
_marks.end());
|
||||
}
|
||||
void TextBuffer::ClearAllMarks() noexcept
|
||||
{
|
||||
_marks.clear();
|
||||
}
|
||||
bool startedPrompt = false;
|
||||
bool startedCommand = false;
|
||||
bool startedOutput = false;
|
||||
MarkKind lastMarkKind = MarkKind::Output;
|
||||
|
||||
// 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)
|
||||
{
|
||||
mark.start.y += delta;
|
||||
|
||||
// If the mark had sub-regions, then move those pointers too
|
||||
if (mark.commandEnd.has_value())
|
||||
const auto endThisMark = [&](auto x, auto y) {
|
||||
if (startedOutput)
|
||||
{
|
||||
(*mark.commandEnd).y += delta;
|
||||
mark.outputEnd = til::point{ x, y };
|
||||
}
|
||||
if (mark.outputEnd.has_value())
|
||||
if (!startedOutput && startedCommand)
|
||||
{
|
||||
(*mark.outputEnd).y += delta;
|
||||
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++)
|
||||
{
|
||||
// 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();
|
||||
x = 0;
|
||||
for (const auto& [attr, length] : runs)
|
||||
{
|
||||
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;
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
_trimMarksOutsideBuffer();
|
||||
}
|
||||
|
||||
// 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)
|
||||
void TextBuffer::SetScrollbarData(ScrollbarData mark, til::CoordType y)
|
||||
{
|
||||
_marks.push_back(m);
|
||||
auto& row = GetMutableRowByOffset(y);
|
||||
row.SetScrollbarData(mark);
|
||||
}
|
||||
// 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)
|
||||
void TextBuffer::ManuallyMarkRowAsPrompt(til::CoordType y)
|
||||
{
|
||||
_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)
|
||||
auto& row = GetMutableRowByOffset(y);
|
||||
for (auto& [attr, len] : row.Attributes().runs())
|
||||
{
|
||||
return L"";
|
||||
attr.SetMarkAttributes(MarkKind::Prompt);
|
||||
}
|
||||
|
||||
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,8 +49,6 @@ filling in the last row, and updating the screen.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "cursor.h"
|
||||
#include "Row.hpp"
|
||||
#include "TextAttribute.hpp"
|
||||
@@ -60,47 +58,13 @@ filling in the last row, and updating the screen.
|
||||
#include "../buffer/out/textBufferTextIterator.hpp"
|
||||
|
||||
struct URegularExpression;
|
||||
enum class SearchFlag : unsigned int;
|
||||
|
||||
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:
|
||||
@@ -142,7 +106,8 @@ public:
|
||||
til::point NavigateCursor(til::point position, til::CoordType distance) const;
|
||||
|
||||
// Text insertion functions
|
||||
void Write(til::CoordType row, const TextAttribute& attributes, RowWriteState& state);
|
||||
void Replace(til::CoordType row, const TextAttribute& attributes, RowWriteState& state);
|
||||
void Insert(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);
|
||||
@@ -203,8 +168,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);
|
||||
@@ -232,7 +197,7 @@ public:
|
||||
|
||||
size_t SpanLength(const til::point coordStart, const til::point coordEnd) const;
|
||||
|
||||
std::wstring GetPlainText(const til::point& start, const til::point& end) const;
|
||||
std::wstring GetPlainText(til::point start, til::point end) const;
|
||||
|
||||
struct CopyRequest
|
||||
{
|
||||
@@ -329,19 +294,22 @@ public:
|
||||
|
||||
static void Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const Microsoft::Console::Types::Viewport* lastCharacterViewport = nullptr, PositionInformation* positionInfo = nullptr);
|
||||
|
||||
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;
|
||||
std::optional<std::vector<til::point_span>> SearchText(const std::wstring_view& needle, SearchFlag flags) const;
|
||||
std::optional<std::vector<til::point_span>> SearchText(const std::wstring_view& needle, SearchFlag flags, til::CoordType rowBeg, til::CoordType rowEnd) const;
|
||||
|
||||
const std::vector<ScrollMark>& GetMarks() const noexcept;
|
||||
// Mark handling
|
||||
std::vector<ScrollMark> GetMarkRows() const;
|
||||
std::vector<MarkExtents> GetMarkExtents(size_t limit = SIZE_T_MAX) const;
|
||||
void ClearMarksInRange(const til::point start, const til::point end);
|
||||
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;
|
||||
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);
|
||||
|
||||
private:
|
||||
void _reserve(til::size screenBufferSize, const TextAttribute& defaultAttributes);
|
||||
@@ -366,7 +334,11 @@ 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();
|
||||
void _trimMarksOutsideBuffer();
|
||||
|
||||
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();
|
||||
|
||||
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);
|
||||
@@ -439,7 +411,6 @@ private:
|
||||
uint64_t _lastMutationId = 0;
|
||||
|
||||
Cursor _cursor;
|
||||
std::vector<ScrollMark> _marks;
|
||||
bool _isActiveBuffer = false;
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
|
||||
@@ -589,13 +589,13 @@ namespace
|
||||
TestBuffer{
|
||||
{ 2, 5 }, // reduce width aggressively
|
||||
{
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
{ L" ", false },
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
{ L" ", true },
|
||||
},
|
||||
{ 1, 0 },
|
||||
{ 1, 4 },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "WexTestClass.h"
|
||||
#include "../textBuffer.hpp"
|
||||
#include "../../renderer/inc/DummyRenderer.hpp"
|
||||
#include "../search.h"
|
||||
|
||||
template<>
|
||||
class WEX::TestExecution::VerifyOutputTraits<std::vector<til::point_span>>
|
||||
@@ -41,7 +42,7 @@ class UTextAdapterTests
|
||||
RowWriteState state{
|
||||
.text = L"abc 𝒶𝒷𝒸 abc ネコちゃん",
|
||||
};
|
||||
buffer.Write(0, TextAttribute{}, state);
|
||||
buffer.Replace(0, TextAttribute{}, state);
|
||||
VERIFY_IS_TRUE(state.text.empty());
|
||||
|
||||
static constexpr auto s = [](til::CoordType beg, til::CoordType end) -> til::point_span {
|
||||
@@ -49,15 +50,15 @@ class UTextAdapterTests
|
||||
};
|
||||
|
||||
auto expected = std::vector{ s(0, 2), s(8, 10) };
|
||||
auto actual = buffer.SearchText(L"abc", false);
|
||||
auto actual = buffer.SearchText(L"abc", SearchFlag::None);
|
||||
VERIFY_ARE_EQUAL(expected, actual);
|
||||
|
||||
expected = std::vector{ s(5, 5) };
|
||||
actual = buffer.SearchText(L"𝒷", false);
|
||||
actual = buffer.SearchText(L"𝒷", SearchFlag::None);
|
||||
VERIFY_ARE_EQUAL(expected, actual);
|
||||
|
||||
expected = std::vector{ s(12, 15) };
|
||||
actual = buffer.SearchText(L"ネコ", false);
|
||||
actual = buffer.SearchText(L"ネコ", SearchFlag::None);
|
||||
VERIFY_ARE_EQUAL(expected, actual);
|
||||
}
|
||||
};
|
||||
|
||||
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-cmd.scale-100.png
Normal file
|
After Width: | Height: | Size: 433 B |
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-cmd.scale-150.png
Normal file
|
After Width: | Height: | Size: 804 B |
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-cmd.scale-200.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-pwsh.scale-100.png
Normal file
|
After Width: | Height: | Size: 819 B |
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-pwsh.scale-150.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/cascadia/CascadiaPackage/ProfileIcons/vs-pwsh.scale-200.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
@@ -154,7 +154,7 @@
|
||||
<comment>{Locked=qps-ploc,qps-ploca,qps-plocm}</comment>
|
||||
</data>
|
||||
<data name="AppDescription" xml:space="preserve">
|
||||
<value>Nová Terminál Windows</value>
|
||||
<value>Nový Terminál Windows</value>
|
||||
</data>
|
||||
<data name="AppDescriptionPre" xml:space="preserve">
|
||||
<value>Terminál Windows s náhledem připravovaných funkcí</value>
|
||||
@@ -164,11 +164,11 @@
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Canary version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
<data name="ShellExtension_OpenInTerminalMenuItem_Preview" xml:space="preserve">
|
||||
<value>Otevřít náhled &aplikace Terminal</value>
|
||||
<value>Otevřít &náhled Terminálu</value>
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
<data name="ShellExtension_OpenInTerminalMenuItem" xml:space="preserve">
|
||||
<value>Otevřít v aplikaci &Terminal</value>
|
||||
<value>Otevřít v &Terminálu</value>
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the non-preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -381,14 +381,15 @@ namespace TerminalAppLocalTests
|
||||
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_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();
|
||||
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_ARE_EQUAL(L"powershell.exe \"This is an arg \"", myCommand);
|
||||
}
|
||||
{
|
||||
@@ -397,14 +398,15 @@ namespace TerminalAppLocalTests
|
||||
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_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();
|
||||
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_ARE_EQUAL(L"\" with spaces\"", myCommand);
|
||||
}
|
||||
}
|
||||
@@ -421,14 +423,15 @@ namespace TerminalAppLocalTests
|
||||
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_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();
|
||||
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_ARE_EQUAL(L"powershell.exe \"This is an arg ; with spaces\"", myCommand);
|
||||
}
|
||||
}
|
||||
@@ -468,14 +471,15 @@ namespace TerminalAppLocalTests
|
||||
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());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -489,15 +493,16 @@ namespace TerminalAppLocalTests
|
||||
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_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -511,15 +516,16 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -533,15 +539,16 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -555,16 +562,17 @@ namespace TerminalAppLocalTests
|
||||
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_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();
|
||||
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_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\"", myCommand);
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -578,16 +586,17 @@ namespace TerminalAppLocalTests
|
||||
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_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();
|
||||
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_ARE_EQUAL(L"powershell.exe \"This is an arg with spaces\" another-arg \"more spaces in this one\"", myCommand);
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
VERIFY_IS_TRUE(terminalArgs.ColorScheme().empty());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -601,15 +610,16 @@ namespace TerminalAppLocalTests
|
||||
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_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"Windows PowerShell", myArgs.TerminalArgs().Profile());
|
||||
VERIFY_IS_TRUE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -623,14 +633,15 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -644,16 +655,17 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -669,15 +681,16 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -693,15 +706,16 @@ namespace TerminalAppLocalTests
|
||||
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());
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().ColorScheme().empty());
|
||||
VERIFY_ARE_EQUAL(expectedScheme, myArgs.TerminalArgs().ColorScheme());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,7 +746,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -752,7 +767,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -774,7 +790,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(SplitType::Manual, myArgs.SplitMode());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -795,7 +812,8 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitType::Duplicate, myArgs.SplitMode());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -815,16 +833,17 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -844,16 +863,17 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, myArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -873,16 +893,17 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,13 +944,14 @@ namespace TerminalAppLocalTests
|
||||
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 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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -943,14 +965,15 @@ namespace TerminalAppLocalTests
|
||||
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_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -964,14 +987,15 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -985,14 +1009,15 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1006,14 +1031,15 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1469,32 +1495,38 @@ 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);
|
||||
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(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());
|
||||
}
|
||||
|
||||
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());
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1511,8 +1543,9 @@ namespace TerminalAppLocalTests
|
||||
auto myArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane -H", myArgs.TerminalArgs().Commandline());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
VERIFY_ARE_EQUAL(L"slpit-pane -H", terminalArgs.Commandline());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1530,9 +1563,10 @@ namespace TerminalAppLocalTests
|
||||
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_ARE_EQUAL(L"wsl -d Alpine", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
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());
|
||||
}
|
||||
{ // two parsing terminators, new-tab command
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1546,9 +1580,10 @@ namespace TerminalAppLocalTests
|
||||
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_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
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());
|
||||
}
|
||||
{ // two parsing terminators, *no* command
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1562,9 +1597,10 @@ namespace TerminalAppLocalTests
|
||||
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_ARE_EQUAL(L"wsl -d Alpine -- sleep 10", myArgs.TerminalArgs().Commandline());
|
||||
VERIFY_ARE_EQUAL(L"C:\\", myArgs.TerminalArgs().StartingDirectory());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1578,13 +1614,14 @@ namespace TerminalAppLocalTests
|
||||
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 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());
|
||||
}
|
||||
|
||||
void CommandlineTest::TestMultipleCommandExecuteCommandlineAction()
|
||||
@@ -1598,13 +1635,14 @@ namespace TerminalAppLocalTests
|
||||
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 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 = actions.at(1);
|
||||
@@ -1612,13 +1650,14 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(actionAndArgs.Args());
|
||||
auto myArgs = actionAndArgs.Args().try_as<SplitPaneArgs>();
|
||||
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 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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1739,13 +1778,14 @@ namespace TerminalAppLocalTests
|
||||
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_TRUE(myArgs.TerminalArgs().ProfileIndex() == nullptr);
|
||||
VERIFY_IS_FALSE(myArgs.TerminalArgs().Profile().empty());
|
||||
VERIFY_ARE_EQUAL(L"cmd", myArgs.TerminalArgs().Profile());
|
||||
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());
|
||||
}
|
||||
{
|
||||
Log::Comment(NoThrowString().Format(L"Pass a launch mode and command line"));
|
||||
@@ -1763,13 +1803,14 @@ namespace TerminalAppLocalTests
|
||||
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_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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1800,7 +1841,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.5f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1820,7 +1862,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
AppCommandlineArgs appArgs{};
|
||||
@@ -1841,7 +1884,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(2);
|
||||
@@ -1851,7 +1895,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.5f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -1873,7 +1918,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.3f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
{
|
||||
auto actionAndArgs = appArgs._startupActions.at(2);
|
||||
@@ -1883,7 +1929,8 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(myArgs);
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, myArgs.SplitDirection());
|
||||
VERIFY_ARE_EQUAL(0.7f, myArgs.SplitSize());
|
||||
VERIFY_IS_NOT_NULL(myArgs.TerminalArgs());
|
||||
auto terminalArgs{ myArgs.ContentArgs().try_as<NewTerminalArgs>() };
|
||||
VERIFY_IS_NOT_NULL(terminalArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,12 +176,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -201,12 +202,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -220,12 +222,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -239,12 +242,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,12 +306,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -328,12 +333,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -348,12 +354,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -368,12 +375,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,12 +441,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -459,12 +468,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -479,12 +489,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -499,12 +510,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -692,12 +704,13 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = childActionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
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());
|
||||
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_FALSE(child.HasNestedCommands());
|
||||
}
|
||||
@@ -712,12 +725,13 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = childActionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
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());
|
||||
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_FALSE(child.HasNestedCommands());
|
||||
}
|
||||
@@ -818,12 +832,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -839,12 +854,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -860,12 +876,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -951,12 +968,13 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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(name, realArgs.TerminalArgs().Profile());
|
||||
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_FALSE(command.HasNestedCommands());
|
||||
}
|
||||
@@ -1069,12 +1087,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1090,12 +1109,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Down, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1111,12 +1131,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Right, realArgs.SplitDirection());
|
||||
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());
|
||||
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_FALSE(childCommand.HasNestedCommands());
|
||||
}
|
||||
@@ -1245,12 +1266,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
const auto& expandedCommands{ settings.GlobalSettings().ActionMap().ExpandedCommands() };
|
||||
@@ -1274,12 +1296,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1294,12 +1317,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1314,12 +1338,13 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected value
|
||||
VERIFY_ARE_EQUAL(SplitDirection::Automatic, realArgs.SplitDirection());
|
||||
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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1385,15 +1410,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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_NULL(realArgs.TerminalArgs().Elevate());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1407,15 +1433,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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_NULL(realArgs.TerminalArgs().Elevate());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1429,15 +1456,16 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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_NULL(realArgs.TerminalArgs().Elevate());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1452,16 +1480,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1475,16 +1504,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1498,16 +1528,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
|
||||
@@ -1522,16 +1553,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1544,16 +1576,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
@@ -1567,16 +1600,17 @@ namespace TerminalAppLocalTests
|
||||
const auto& realArgs = actionAndArgs.Args().try_as<NewTabArgs>();
|
||||
VERIFY_IS_NOT_NULL(realArgs);
|
||||
// Verify the args have the expected 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());
|
||||
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());
|
||||
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, realArgs.TerminalArgs(), nullptr);
|
||||
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
|
||||
const auto termSettings = termSettingsResult.DefaultSettings();
|
||||
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
|
||||
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
|
||||
|
||||
@@ -96,7 +96,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
|
||||
peasant.ShowNotificationIconRequested([this](auto&&, auto&&) { ShowNotificationIconRequested.raise(*this, nullptr); });
|
||||
peasant.HideNotificationIconRequested([this](auto&&, auto&&) { HideNotificationIconRequested.raise(*this, nullptr); });
|
||||
peasant.QuitAllRequested({ this, &Monarch::_handleQuitAll });
|
||||
|
||||
{
|
||||
std::unique_lock lock{ _peasantsMutex };
|
||||
@@ -134,7 +133,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
// - <none> used
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Monarch::_handleQuitAll(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::Foundation::IInspectable& /*args*/)
|
||||
void Monarch::QuitAll()
|
||||
{
|
||||
if (_quitting.exchange(true, std::memory_order_relaxed))
|
||||
{
|
||||
@@ -166,12 +165,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
{
|
||||
peasantSearch->second.Quit();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Somehow we don't have our own peasant, this should never happen.
|
||||
// We are trying to quit anyways so just fail here.
|
||||
assert(peasantSearch != _peasants.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
|
||||
uint64_t AddPeasant(winrt::Microsoft::Terminal::Remoting::IPeasant peasant);
|
||||
void SignalClose(const uint64_t peasantId);
|
||||
void QuitAll();
|
||||
|
||||
uint64_t GetNumberOfPeasants();
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Microsoft.Terminal.Remoting
|
||||
void HandleActivatePeasant(WindowActivatedArgs args);
|
||||
void SummonWindow(SummonWindowSelectionArgs args);
|
||||
void SignalClose(UInt64 peasantId);
|
||||
void QuitAll();
|
||||
|
||||
void SummonAllWindows();
|
||||
Boolean DoesQuakeWindowExist();
|
||||
|
||||
@@ -260,22 +260,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
|
||||
}
|
||||
|
||||
void Peasant::RequestQuitAll()
|
||||
{
|
||||
try
|
||||
{
|
||||
QuitAllRequested.raise(*this, nullptr);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_CAUGHT_EXCEPTION();
|
||||
}
|
||||
TraceLoggingWrite(g_hRemotingProvider,
|
||||
"Peasant_RequestQuit",
|
||||
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
|
||||
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
|
||||
}
|
||||
|
||||
void Peasant::AttachContentToWindow(Remoting::AttachRequest request)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
void RequestRename(const winrt::Microsoft::Terminal::Remoting::RenameRequestArgs& args);
|
||||
void RequestShowNotificationIcon();
|
||||
void RequestHideNotificationIcon();
|
||||
void RequestQuitAll();
|
||||
void Quit();
|
||||
|
||||
void AttachContentToWindow(Remoting::AttachRequest request);
|
||||
@@ -76,7 +75,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
|
||||
til::typed_event<> ShowNotificationIconRequested;
|
||||
til::typed_event<> HideNotificationIconRequested;
|
||||
til::typed_event<> QuitAllRequested;
|
||||
til::typed_event<> QuitRequested;
|
||||
|
||||
til::typed_event<winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::AttachRequest> AttachRequested;
|
||||
|
||||
@@ -80,7 +80,6 @@ namespace Microsoft.Terminal.Remoting
|
||||
|
||||
void RequestShowNotificationIcon();
|
||||
void RequestHideNotificationIcon();
|
||||
void RequestQuitAll();
|
||||
void Quit();
|
||||
|
||||
void AttachContentToWindow(AttachRequest request);
|
||||
@@ -95,7 +94,6 @@ namespace Microsoft.Terminal.Remoting
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> ShowNotificationIconRequested;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> HideNotificationIconRequested;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> QuitAllRequested;
|
||||
event Windows.Foundation.TypedEventHandler<Object, Object> QuitRequested;
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, AttachRequest> AttachRequested;
|
||||
|
||||
@@ -130,6 +130,8 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
// We connected to a monarch instance, not us though. This won't hit
|
||||
// in isolated mode.
|
||||
|
||||
LOG_IF_FAILED(CoAllowSetForegroundWindow(winrt::get_unknown(_monarch), nullptr));
|
||||
|
||||
// Send the commandline over to the monarch process
|
||||
if (_proposeToMonarch(args))
|
||||
{
|
||||
@@ -373,6 +375,18 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
WindowClosed.raise(s, e);
|
||||
}
|
||||
|
||||
void WindowManager::QuitAll()
|
||||
{
|
||||
if (_monarch)
|
||||
{
|
||||
try
|
||||
{
|
||||
_monarch.QuitAll();
|
||||
}
|
||||
CATCH_LOG()
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::SignalClose(const Remoting::Peasant& peasant)
|
||||
{
|
||||
if (_monarch)
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
Remoting::Peasant CreatePeasant(const Remoting::WindowRequestedArgs& args);
|
||||
|
||||
void SignalClose(const Remoting::Peasant& peasant);
|
||||
void QuitAll();
|
||||
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
|
||||
void SummonAllWindows();
|
||||
Windows::Foundation::Collections::IVectorView<winrt::Microsoft::Terminal::Remoting::PeasantInfo> GetPeasantInfos();
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Microsoft.Terminal.Remoting
|
||||
Peasant CreatePeasant(WindowRequestedArgs args);
|
||||
|
||||
void SignalClose(Peasant p);
|
||||
void QuitAll();
|
||||
|
||||
void UpdateActiveTabTitle(String title, Peasant p);
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace winrt::TerminalApp::implementation
|
||||
auto originalOpacity{ control.BackgroundOpacity() };
|
||||
|
||||
// Apply the new opacity
|
||||
control.AdjustOpacity(args.Opacity() / 100.0, args.Relative());
|
||||
control.AdjustOpacity(args.Opacity() / 100.0f, args.Relative());
|
||||
|
||||
if (backup)
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleCloseWindow(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
CloseRequested.raise(nullptr, nullptr);
|
||||
CloseWindow();
|
||||
args.Handled(true);
|
||||
}
|
||||
|
||||
@@ -238,6 +238,32 @@ 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)
|
||||
{
|
||||
@@ -247,16 +273,10 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else if (const auto& realArgs = args.ActionArgs().try_as<SplitPaneArgs>())
|
||||
{
|
||||
if (const auto& newTerminalArgs{ realArgs.TerminalArgs() })
|
||||
if (_shouldBailForInvalidProfileIndex(_settings, realArgs.ContentArgs()))
|
||||
{
|
||||
if (const auto index = realArgs.TerminalArgs().ProfileIndex())
|
||||
{
|
||||
if (gsl::narrow<uint32_t>(index.Value()) >= _settings.ActiveProfiles().Size())
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& duplicateFromTab{ realArgs.SplitMode() == SplitType::Duplicate ? _GetFocusedTab() : nullptr };
|
||||
@@ -266,8 +286,8 @@ namespace winrt::TerminalApp::implementation
|
||||
_SplitPane(terminalTab,
|
||||
realArgs.SplitDirection(),
|
||||
// This is safe, we're already filtering so the value is (0, 1)
|
||||
::base::saturated_cast<float>(realArgs.SplitSize()),
|
||||
_MakePane(realArgs.TerminalArgs(), duplicateFromTab));
|
||||
realArgs.SplitSize(),
|
||||
_MakePane(realArgs.ContentArgs(), duplicateFromTab));
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -445,19 +465,13 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else if (const auto& realArgs = args.ActionArgs().try_as<NewTabArgs>())
|
||||
{
|
||||
if (const auto& newTerminalArgs{ realArgs.TerminalArgs() })
|
||||
if (_shouldBailForInvalidProfileIndex(_settings, realArgs.ContentArgs()))
|
||||
{
|
||||
if (const auto index = newTerminalArgs.ProfileIndex())
|
||||
{
|
||||
if (gsl::narrow<uint32_t>(index.Value()) >= _settings.ActiveProfiles().Size())
|
||||
{
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
args.Handled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_IF_FAILED(_OpenNewTab(realArgs.TerminalArgs()));
|
||||
LOG_IF_FAILED(_OpenNewTab(realArgs.ContentArgs()));
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -869,8 +883,23 @@ 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 NewTerminalArgs newTerminalArgs)
|
||||
fire_and_forget TerminalPage::_OpenNewWindow(const INewContentArgs newContentArgs)
|
||||
{
|
||||
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();
|
||||
|
||||
@@ -883,8 +912,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// `-w -1` will ensure a new window is created.
|
||||
winrt::hstring cmdline{
|
||||
fmt::format(L"-w -1 new-tab {}",
|
||||
newTerminalArgs ? newTerminalArgs.ToCommandline().c_str() :
|
||||
L"")
|
||||
terminalArgs.ToCommandline().c_str())
|
||||
};
|
||||
|
||||
// Build the args to ShellExecuteEx. We need to use ShellExecuteEx so we
|
||||
@@ -909,29 +937,32 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleNewWindow(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& actionArgs)
|
||||
{
|
||||
NewTerminalArgs newTerminalArgs{ nullptr };
|
||||
INewContentArgs newContentArgs{ nullptr };
|
||||
// If the caller provided NewTerminalArgs, then try to use those
|
||||
if (actionArgs)
|
||||
{
|
||||
if (const auto& realArgs = actionArgs.ActionArgs().try_as<NewWindowArgs>())
|
||||
{
|
||||
newTerminalArgs = realArgs.TerminalArgs();
|
||||
newContentArgs = realArgs.ContentArgs();
|
||||
}
|
||||
}
|
||||
// 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 (!newTerminalArgs)
|
||||
if (!newContentArgs)
|
||||
{
|
||||
newTerminalArgs = NewTerminalArgs();
|
||||
newContentArgs = NewTerminalArgs{};
|
||||
}
|
||||
|
||||
const auto profile{ _settings.GetProfileForArgs(newTerminalArgs) };
|
||||
if (const auto& terminalArgs{ newContentArgs.try_as<NewTerminalArgs>() })
|
||||
{
|
||||
const auto profile{ _settings.GetProfileForArgs(terminalArgs) };
|
||||
terminalArgs.Profile(::Microsoft::Console::Utils::GuidToString(profile.Guid()));
|
||||
}
|
||||
|
||||
// Manually fill in the evaluated profile.
|
||||
newTerminalArgs.Profile(::Microsoft::Console::Utils::GuidToString(profile.Guid()));
|
||||
_OpenNewWindow(newTerminalArgs);
|
||||
_OpenNewWindow(newContentArgs);
|
||||
actionArgs.Handled(true);
|
||||
}
|
||||
|
||||
@@ -1216,7 +1247,7 @@ namespace winrt::TerminalApp::implementation
|
||||
if (const auto& realArgs = args.ActionArgs().try_as<AdjustOpacityArgs>())
|
||||
{
|
||||
const auto res = _ApplyToActiveControls([&](auto& control) {
|
||||
control.AdjustOpacity(realArgs.Opacity() / 100.0, realArgs.Relative());
|
||||
control.AdjustOpacity(realArgs.Opacity() / 100.0f, realArgs.Relative());
|
||||
});
|
||||
args.Handled(res);
|
||||
}
|
||||
@@ -1418,7 +1449,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())
|
||||
@@ -1431,7 +1462,7 @@ namespace winrt::TerminalApp::implementation
|
||||
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
|
||||
const auto resultPane = std::make_shared<Pane>(*scratchPane);
|
||||
_SplitPane(_GetFocusedTabImpl(), SplitDirection::Automatic, 0.5f, resultPane);
|
||||
_SplitPane(_senderOrFocusedTab(sender), SplitDirection::Automatic, 0.5f, resultPane);
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,27 @@
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<!-- KeyChordText styles -->
|
||||
<Style x:Key="KeyChordBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="2" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
<Style x:Key="KeyChordTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
<!-- ParsedCommandLineText styles -->
|
||||
<Style x:Key="ParsedCommandLineBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
|
||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="ListItemTemplate"
|
||||
x:DataType="local:FilteredCommand">
|
||||
<ListViewItem HorizontalContentAlignment="Stretch"
|
||||
@@ -69,12 +90,12 @@
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Background="{ThemeResource FlyoutPresenterBackground}"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
Style="{StaticResource KeyChordBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Item.KeyChordText), Mode=OneWay}">
|
||||
|
||||
<TextBlock AutomationProperties.AccessibilityView="Raw"
|
||||
FontSize="12"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Style="{StaticResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind Item.KeyChordText, Mode=OneWay}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -118,12 +139,12 @@
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
Style="{StaticResource KeyChordBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Item.KeyChordText), Mode=OneWay}">
|
||||
|
||||
<TextBlock AutomationProperties.AccessibilityView="Raw"
|
||||
FontSize="12"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Style="{StaticResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind Item.KeyChordText, Mode=OneWay}" />
|
||||
</Border>
|
||||
|
||||
@@ -212,79 +233,6 @@
|
||||
GeneralItemTemplate="{StaticResource GeneralItemTemplate}"
|
||||
NestedItemTemplate="{StaticResource NestedItemTemplate}"
|
||||
TabItemTemplate="{StaticResource TabItemTemplate}" />
|
||||
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
|
||||
<!-- KeyChordText styles -->
|
||||
<Style x:Key="KeyChordBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="2" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
<Style x:Key="KeyChordTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
|
||||
<!-- ParsedCommandLineText styles -->
|
||||
<Style x:Key="ParsedCommandLineBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
|
||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||
</Style>
|
||||
<Style x:Key="ParsedCommandLineTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
|
||||
<!-- KeyChordText styles -->
|
||||
<Style x:Key="KeyChordBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="2" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
<Style x:Key="KeyChordTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
|
||||
<!-- ParsedCommandLineText styles -->
|
||||
<Style x:Key="ParsedCommandLineBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
|
||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||
</Style>
|
||||
<Style x:Key="ParsedCommandLineTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
|
||||
<!-- KeyChordText styles (use XAML defaults for High Contrast theme) -->
|
||||
<Style x:Key="KeyChordBorderStyle"
|
||||
TargetType="Border" />
|
||||
<Style x:Key="KeyChordTextBlockStyle"
|
||||
TargetType="TextBlock" />
|
||||
|
||||
<!-- ParsedCommandLineText styles (use XAML defaults for High Contrast theme) -->
|
||||
<Style x:Key="ParsedCommandLineBorderStyle"
|
||||
TargetType="Border" />
|
||||
<Style x:Key="ParsedCommandLineTextBlockStyle"
|
||||
TargetType="TextBlock" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
@@ -368,7 +316,7 @@
|
||||
Padding="16,12"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Style="{ThemeResource ParsedCommandLineBorderStyle}"
|
||||
Style="{StaticResource ParsedCommandLineBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(ParsedCommandLineText), Mode=OneWay}">
|
||||
|
||||
<ScrollViewer MaxHeight="200"
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace TerminalApp
|
||||
interface IPaneContent
|
||||
{
|
||||
Windows.UI.Xaml.FrameworkElement GetRoot();
|
||||
void UpdateSettings(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
|
||||
|
||||
Windows.Foundation.Size MinimumSize { get; };
|
||||
|
||||
@@ -26,8 +27,11 @@ 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.NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind);
|
||||
Microsoft.Terminal.Settings.Model.INewContentArgs GetNewTerminalArgs(BuildStartupKind kind);
|
||||
|
||||
void Focus(Windows.UI.Xaml.FocusState reason);
|
||||
|
||||
|
||||
@@ -116,6 +116,9 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
switch (visualState)
|
||||
{
|
||||
case WindowVisualState::WindowVisualStateIconified:
|
||||
// Iconified (aka minimized) state should preserve the active window styling
|
||||
break;
|
||||
case WindowVisualState::WindowVisualStateMaximized:
|
||||
VisualStateManager::GoToState(MaximizeButton(), L"WindowStateMaximized", false);
|
||||
|
||||
@@ -124,9 +127,7 @@ namespace winrt::TerminalApp::implementation
|
||||
CloseButton().Height(maximizedHeight);
|
||||
MaximizeToolTip().Text(RS_(L"WindowRestoreDownButtonToolTip"));
|
||||
break;
|
||||
|
||||
case WindowVisualState::WindowVisualStateNormal:
|
||||
case WindowVisualState::WindowVisualStateIconified:
|
||||
default:
|
||||
VisualStateManager::GoToState(MaximizeButton(), L"WindowStateNormal", false);
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ static const int CombinedPaneBorderSize = 2 * PaneBorderSize;
|
||||
static const int AnimationDurationInMilliseconds = 200;
|
||||
static const Duration AnimationDuration = DurationHelper::FromTimeSpan(winrt::Windows::Foundation::TimeSpan(std::chrono::milliseconds(AnimationDurationInMilliseconds)));
|
||||
|
||||
Pane::Pane(const IPaneContent& content, const bool lastFocused) :
|
||||
_content{ content },
|
||||
Pane::Pane(IPaneContent content, const bool lastFocused) :
|
||||
_lastActive{ lastFocused }
|
||||
{
|
||||
_setPaneContent(std::move(content));
|
||||
_root.Children().Append(_borderFirst);
|
||||
|
||||
const auto& control{ _content.GetRoot() };
|
||||
@@ -47,14 +47,8 @@ Pane::Pane(const IPaneContent& content, const bool lastFocused) :
|
||||
// LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
|
||||
// Colors::Transparent! The border won't get Tapped events, and they'll fall
|
||||
// through to something else.
|
||||
_borderFirst.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderSecond.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderFirst.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
}
|
||||
|
||||
Pane::Pane(std::shared_ptr<Pane> first,
|
||||
@@ -88,19 +82,13 @@ Pane::Pane(std::shared_ptr<Pane> first,
|
||||
// LOAD-BEARING: This will NOT work if the border's BorderBrush is set to
|
||||
// Colors::Transparent! The border won't get Tapped events, and they'll fall
|
||||
// through to something else.
|
||||
_borderFirst.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderSecond.Tapped([this](auto&, auto& e) {
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
});
|
||||
_borderFirst.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
_borderSecond.Tapped({ this, &Pane::_borderTappedHandler });
|
||||
}
|
||||
|
||||
// Extract the terminal settings from the current (leaf) pane's control
|
||||
// to be used to create an equivalent control
|
||||
NewTerminalArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
|
||||
INewContentArgs Pane::GetTerminalArgsForPane(BuildStartupKind kind) const
|
||||
{
|
||||
// Leaves are the only things that have controls
|
||||
assert(_IsLeaf());
|
||||
@@ -151,7 +139,7 @@ Pane::BuildStartupState Pane::BuildStartupActions(uint32_t currentId, uint32_t n
|
||||
// When creating a pane the split size is the size of the new pane
|
||||
// and not position.
|
||||
const auto splitDirection = _splitState == SplitState::Horizontal ? SplitDirection::Down : SplitDirection::Right;
|
||||
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? .5 : 1. - _desiredSplitPosition);
|
||||
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? 0.5f : 1.0f - _desiredSplitPosition);
|
||||
SplitPaneArgs args{ SplitType::Manual, splitDirection, splitSize, terminalArgs };
|
||||
actionAndArgs.Args(args);
|
||||
|
||||
@@ -479,7 +467,7 @@ std::shared_ptr<Pane> Pane::NextPane(const std::shared_ptr<Pane> targetPane)
|
||||
std::shared_ptr<Pane> nextPane = nullptr;
|
||||
auto foundTarget = false;
|
||||
|
||||
auto foundNext = WalkTree([&](auto pane) {
|
||||
auto foundNext = WalkTree([&](const auto& pane) {
|
||||
// If we are a parent pane we don't want to move to one of our children
|
||||
if (foundTarget && targetPane->_HasChild(pane))
|
||||
{
|
||||
@@ -997,6 +985,7 @@ void Pane::_ContentLostFocusHandler(const winrt::Windows::Foundation::IInspectab
|
||||
// - <none>
|
||||
void Pane::Close()
|
||||
{
|
||||
_setPaneContent(nullptr);
|
||||
// Fire our Closed event to tell our parent that we should be removed.
|
||||
Closed.raise(nullptr, nullptr);
|
||||
}
|
||||
@@ -1008,7 +997,7 @@ void Pane::Shutdown()
|
||||
{
|
||||
if (_IsLeaf())
|
||||
{
|
||||
_content.Close();
|
||||
_setPaneContent(nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1075,6 +1064,29 @@ 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;
|
||||
@@ -1214,8 +1226,19 @@ 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);
|
||||
_content.Focus(FocusState::Programmatic);
|
||||
if (const auto& lastContent{ GetLastFocusedContent() })
|
||||
{
|
||||
lastContent.Focus(FocusState::Programmatic);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1254,20 +1277,11 @@ void Pane::_FocusFirstChild()
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
void Pane::UpdateSettings(const CascadiaSettings& settings)
|
||||
{
|
||||
assert(_IsLeaf());
|
||||
|
||||
if (const auto& terminalPane{ _getTerminalContent() })
|
||||
if (_content)
|
||||
{
|
||||
return terminalPane.UpdateSettings(settings, profile);
|
||||
_content.UpdateSettings(settings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1328,7 +1342,7 @@ std::shared_ptr<Pane> Pane::DetachPane(std::shared_ptr<Pane> pane)
|
||||
detached->_ApplySplitDefinitions();
|
||||
|
||||
// Trigger the detached event on each child
|
||||
detached->WalkTree([](auto pane) {
|
||||
detached->WalkTree([](const auto& pane) {
|
||||
pane->Detached.raise(pane);
|
||||
});
|
||||
|
||||
@@ -1387,7 +1401,7 @@ void Pane::_CloseChild(const bool closeFirst)
|
||||
_borders = _GetCommonBorders();
|
||||
|
||||
// take the control, profile, id and isDefTermSession of the pane that _wasn't_ closed.
|
||||
_content = remainingChild->_content;
|
||||
_setPaneContent(remainingChild->_takePaneContent());
|
||||
_id = remainingChild->Id();
|
||||
|
||||
// Revoke the old event handlers. Remove both the handlers for the panes
|
||||
@@ -1529,7 +1543,7 @@ void Pane::_CloseChild(const bool closeFirst)
|
||||
{
|
||||
// update our path to our first remaining leaf
|
||||
_parentChildPath = _firstChild;
|
||||
_firstChild->WalkTree([](auto p) {
|
||||
_firstChild->WalkTree([](const auto& p) {
|
||||
if (p->_IsLeaf())
|
||||
{
|
||||
return true;
|
||||
@@ -1578,12 +1592,12 @@ void Pane::_CloseChildRoutine(const bool closeFirst)
|
||||
const auto splitWidth = _splitState == SplitState::Vertical;
|
||||
|
||||
Size removedOriginalSize{
|
||||
::base::saturated_cast<float>(removedChild->_root.ActualWidth()),
|
||||
::base::saturated_cast<float>(removedChild->_root.ActualHeight())
|
||||
static_cast<float>(removedChild->_root.ActualWidth()),
|
||||
static_cast<float>(removedChild->_root.ActualHeight())
|
||||
};
|
||||
Size remainingOriginalSize{
|
||||
::base::saturated_cast<float>(remainingChild->_root.ActualWidth()),
|
||||
::base::saturated_cast<float>(remainingChild->_root.ActualHeight())
|
||||
static_cast<float>(remainingChild->_root.ActualWidth()),
|
||||
static_cast<float>(remainingChild->_root.ActualHeight())
|
||||
};
|
||||
|
||||
// Remove both children from the grid
|
||||
@@ -1692,6 +1706,33 @@ void Pane::_SetupChildCloseHandlers()
|
||||
});
|
||||
}
|
||||
|
||||
// With this method you take ownership of the control from this Pane.
|
||||
// Assign it to another Pane with _setPaneContent() or Close() it.
|
||||
IPaneContent Pane::_takePaneContent()
|
||||
{
|
||||
_closeRequestedRevoker.revoke();
|
||||
return std::move(_content);
|
||||
}
|
||||
|
||||
// This method safely sets the content of the Pane. It'll ensure to revoke and
|
||||
// assign event handlers, and to Close() the existing content if there's any.
|
||||
// The new content can be nullptr to remove any content.
|
||||
void Pane::_setPaneContent(IPaneContent content)
|
||||
{
|
||||
// The IPaneContent::Close() implementation may be buggy and raise the CloseRequested event again.
|
||||
// _takePaneContent() avoids this as it revokes the event handler.
|
||||
if (const auto c = _takePaneContent())
|
||||
{
|
||||
c.Close();
|
||||
}
|
||||
|
||||
if (content)
|
||||
{
|
||||
_content = std::move(content);
|
||||
_closeRequestedRevoker = _content.CloseRequested(winrt::auto_revoke, [this](auto&&, auto&&) { Close(); });
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Sets up row/column definitions for this pane. There are three total
|
||||
// row/cols. The middle one is for the separator. The first and third are for
|
||||
@@ -1885,7 +1926,7 @@ void Pane::_SetupEntranceAnimation()
|
||||
// looks bad.
|
||||
_secondChild->_root.Background(_themeResources.unfocusedBorderBrush);
|
||||
|
||||
const auto [firstSize, secondSize] = _CalcChildrenSizes(::base::saturated_cast<float>(totalSize));
|
||||
const auto [firstSize, secondSize] = _CalcChildrenSizes(static_cast<float>(totalSize));
|
||||
|
||||
// This is safe to capture this, because it's only being called in the
|
||||
// context of this method (not on another thread)
|
||||
@@ -1893,7 +1934,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.GetRoot();
|
||||
auto control = child->_content ? child->_content.GetRoot() : nullptr;
|
||||
// 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
|
||||
@@ -2242,8 +2283,7 @@ std::pair<std::shared_ptr<Pane>, std::shared_ptr<Pane>> Pane::_Split(SplitDirect
|
||||
else
|
||||
{
|
||||
// Move our control, guid, isDefTermSession into the first one.
|
||||
_firstChild = std::make_shared<Pane>(_content);
|
||||
_content = nullptr;
|
||||
_firstChild = std::make_shared<Pane>(_takePaneContent());
|
||||
_firstChild->_broadcastEnabled = _broadcastEnabled;
|
||||
}
|
||||
|
||||
@@ -2385,7 +2425,7 @@ void Pane::Id(uint32_t id) noexcept
|
||||
bool Pane::FocusPane(const uint32_t id)
|
||||
{
|
||||
// Always clear the parent child path if we are focusing a leaf
|
||||
return WalkTree([=](auto p) {
|
||||
return WalkTree([=](const auto& p) {
|
||||
p->_parentChildPath.reset();
|
||||
if (p->_id == id)
|
||||
{
|
||||
@@ -2408,7 +2448,7 @@ bool Pane::FocusPane(const uint32_t id)
|
||||
// - true if focus was set
|
||||
bool Pane::FocusPane(const std::shared_ptr<Pane> pane)
|
||||
{
|
||||
return WalkTree([&](auto p) {
|
||||
return WalkTree([&](const auto& p) {
|
||||
if (p == pane)
|
||||
{
|
||||
p->_Focus();
|
||||
@@ -2438,6 +2478,11 @@ bool Pane::_HasChild(const std::shared_ptr<Pane> child)
|
||||
});
|
||||
}
|
||||
|
||||
winrt::TerminalApp::TerminalPaneContent Pane::_getTerminalContent() const
|
||||
{
|
||||
return _IsLeaf() ? _content.try_as<winrt::TerminalApp::TerminalPaneContent>() : nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Recursive function that finds a pane with the given ID
|
||||
// Arguments:
|
||||
@@ -2910,13 +2955,13 @@ bool Pane::ContainsReadOnly() const
|
||||
// - <none>
|
||||
void Pane::CollectTaskbarStates(std::vector<winrt::TerminalApp::TaskbarState>& states)
|
||||
{
|
||||
if (_IsLeaf())
|
||||
if (_content)
|
||||
{
|
||||
auto tbState{ winrt::make<winrt::TerminalApp::implementation::TaskbarState>(_content.TaskbarState(),
|
||||
_content.TaskbarProgress()) };
|
||||
states.push_back(tbState);
|
||||
}
|
||||
else
|
||||
else if (_firstChild && _secondChild)
|
||||
{
|
||||
_firstChild->CollectTaskbarStates(states);
|
||||
_secondChild->CollectTaskbarStates(states);
|
||||
@@ -3004,3 +3049,9 @@ winrt::Windows::UI::Xaml::Media::SolidColorBrush Pane::_ComputeBorderColor()
|
||||
|
||||
return _themeResources.unfocusedBorderBrush;
|
||||
}
|
||||
|
||||
void Pane::_borderTappedHandler(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::UI::Xaml::Input::TappedRoutedEventArgs& e)
|
||||
{
|
||||
_FocusFirstChild();
|
||||
e.Handled(true);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ struct PaneResources
|
||||
class Pane : public std::enable_shared_from_this<Pane>
|
||||
{
|
||||
public:
|
||||
Pane(const winrt::TerminalApp::IPaneContent& content,
|
||||
Pane(winrt::TerminalApp::IPaneContent content,
|
||||
const bool lastFocused = false);
|
||||
|
||||
Pane(std::shared_ptr<Pane> first,
|
||||
@@ -73,6 +73,7 @@ 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;
|
||||
@@ -105,10 +106,9 @@ public:
|
||||
uint32_t panesCreated;
|
||||
};
|
||||
BuildStartupState BuildStartupActions(uint32_t currentId, uint32_t nextId, winrt::TerminalApp::BuildStartupKind kind);
|
||||
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetTerminalArgsForPane(winrt::TerminalApp::BuildStartupKind kind) const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetTerminalArgsForPane(winrt::TerminalApp::BuildStartupKind kind) const;
|
||||
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult& settings,
|
||||
const winrt::Microsoft::Terminal::Settings::Model::Profile& profile);
|
||||
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
|
||||
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,
|
||||
@@ -248,13 +248,13 @@ private:
|
||||
|
||||
std::optional<uint32_t> _id;
|
||||
std::weak_ptr<Pane> _parentChildPath{};
|
||||
|
||||
bool _lastActive{ false };
|
||||
winrt::event_token _firstClosedToken{ 0 };
|
||||
winrt::event_token _secondClosedToken{ 0 };
|
||||
|
||||
winrt::Windows::UI::Xaml::UIElement::GotFocus_revoker _gotFocusRevoker;
|
||||
winrt::Windows::UI::Xaml::UIElement::LostFocus_revoker _lostFocusRevoker;
|
||||
winrt::TerminalApp::IPaneContent::CloseRequested_revoker _closeRequestedRevoker;
|
||||
|
||||
Borders _borders{ Borders::None };
|
||||
|
||||
@@ -264,11 +264,10 @@ private:
|
||||
bool _IsLeaf() const noexcept;
|
||||
bool _HasFocusedChild() const noexcept;
|
||||
void _SetupChildCloseHandlers();
|
||||
winrt::TerminalApp::IPaneContent _takePaneContent();
|
||||
void _setPaneContent(winrt::TerminalApp::IPaneContent content);
|
||||
bool _HasChild(const std::shared_ptr<Pane> child);
|
||||
winrt::TerminalApp::TerminalPaneContent _getTerminalContent() const
|
||||
{
|
||||
return _IsLeaf() ? _content.try_as<winrt::TerminalApp::TerminalPaneContent>() : nullptr;
|
||||
}
|
||||
winrt::TerminalApp::TerminalPaneContent _getTerminalContent() const;
|
||||
|
||||
std::pair<std::shared_ptr<Pane>, std::shared_ptr<Pane>> _Split(winrt::Microsoft::Terminal::Settings::Model::SplitDirection splitType,
|
||||
const float splitSize,
|
||||
@@ -314,6 +313,8 @@ private:
|
||||
|
||||
SplitState _convertAutomaticOrDirectionalSplitState(const winrt::Microsoft::Terminal::Settings::Model::SplitDirection& splitType) const;
|
||||
|
||||
void _borderTappedHandler(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::Input::TappedRoutedEventArgs& e);
|
||||
|
||||
// Function Description:
|
||||
// - Returns true if the given direction can be used with the given split
|
||||
// type.
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<comment>{Locked=qps-ploc,qps-ploca,qps-plocm}</comment>
|
||||
</data>
|
||||
<data name="AppDescription" xml:space="preserve">
|
||||
<value>Nová Terminál Windows</value>
|
||||
<value>Nový Terminál Windows</value>
|
||||
</data>
|
||||
<data name="AppDescriptionPre" xml:space="preserve">
|
||||
<value>Terminál Windows s náhledem připravovaných funkcí</value>
|
||||
@@ -164,11 +164,11 @@
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Canary version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
<data name="ShellExtension_OpenInTerminalMenuItem_Preview" xml:space="preserve">
|
||||
<value>Otevřít náhled &aplikace Terminal</value>
|
||||
<value>Otevřít &náhled Terminálu</value>
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
<data name="ShellExtension_OpenInTerminalMenuItem" xml:space="preserve">
|
||||
<value>Otevřít v aplikaci &Terminal</value>
|
||||
<value>Otevřít v &Terminálu</value>
|
||||
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the non-preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -190,16 +190,16 @@
|
||||
<value>Mehrere Bereiche</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Schließen...</value>
|
||||
<value>Schließen</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Registerkarten auf der rechten Seite schließen</value>
|
||||
<value>Tabs nach rechts schließen</value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Andere Registerkarten schließen</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Registerkarte schließen</value>
|
||||
<value>Tab schließen</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Bereich schließen</value>
|
||||
@@ -208,16 +208,16 @@
|
||||
<value>Registerkarte teilen</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Geteilter Bereich</value>
|
||||
<value>Bereich teilen</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Websuche</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Farbe...</value>
|
||||
<value>Registerkartenfarbe ändern</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Benutzerdefiniert...</value>
|
||||
<value>Benutzerdefiniert</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Zurücksetzen</value>
|
||||
@@ -226,7 +226,7 @@
|
||||
<value>Registerkarte umbenennen</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Registerkarte duplizieren</value>
|
||||
<value>Registerkarte kopieren</value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>Profil mit einem ungültigen "backgroundImage" gefunden. Dieses Profil hat standardmäßig kein Hintergrundbild. Stellen Sie sicher, dass beim Festlegen eines "backgroundImage" der Wert ein gültiger Dateipfad zu einem Bild ist.</value>
|
||||
@@ -487,7 +487,7 @@
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Drittanbieter-Hinweise</value>
|
||||
<value>Hinweise von Drittanbietern</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -761,7 +761,7 @@
|
||||
<value>Suchen</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Nur Text</value>
|
||||
<value>Unformatierter Text</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>Das Beendigungsverhalten kann in den erweiterten Profileinstellungen konfiguriert werden.</value>
|
||||
@@ -830,7 +830,7 @@
|
||||
<value>Diese Registerkarte schließen</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Leer...</value>
|
||||
<value>Leer</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Bereich schließen</value>
|
||||
|
||||
@@ -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>Color...</value>
|
||||
<value>Change tab 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 Admin</value>
|
||||
<value>This Terminal window is running as administrator</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,7 +893,7 @@
|
||||
<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>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<value>Varios paneles</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Cerrar...</value>
|
||||
<value>Cerrar</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Cerrar las pestañas de la derecha</value>
|
||||
@@ -202,19 +202,19 @@
|
||||
<value>Cerrar panel</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Dividir tabla</value>
|
||||
<value>Dividir pestaña</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Panel dividido</value>
|
||||
<value>Dividir panel</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Búsqueda en la Web</value>
|
||||
<value>Búsqueda en la web</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Color...</value>
|
||||
<value>Cambiar color de pestaña</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Configuración personalizada...</value>
|
||||
<value>Personalizar</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Restablecer</value>
|
||||
@@ -464,7 +464,7 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Tareas iniciales</value>
|
||||
<value>Introducción</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
@@ -480,7 +480,7 @@
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Directiva de privacidad</value>
|
||||
<value>Política de privacidad</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
@@ -723,7 +723,7 @@
|
||||
<value>Maximizar</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Restaurar a tamaño normal</value>
|
||||
<value>Restaurar</value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Paleta de comandos</value>
|
||||
@@ -827,7 +827,7 @@
|
||||
<value>Cerrar esta pestaña</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Vacío...</value>
|
||||
<value>Vacío</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Cerrar panel</value>
|
||||
@@ -840,7 +840,7 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Mover la Pestaña a una Nueva ventana</value>
|
||||
<value>Mover pestaña a nueva ventana</value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Mueve la pestaña a una nueva ventana </value>
|
||||
|
||||
@@ -187,13 +187,13 @@
|
||||
<value>Volets multiples</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Fermez...</value>
|
||||
<value>Fermer</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Fermer les Onglets à Droite</value>
|
||||
<value>Fermer les onglets à droite</value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Fermez les Autres onglets</value>
|
||||
<value>Fermer les autres onglets</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Fermer 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>Couleur...</value>
|
||||
<value>Modifier la couleur de l’onglet</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personnalisée...</value>
|
||||
<value>Personnalisé</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Réinitialiser</value>
|
||||
@@ -464,7 +464,7 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Prise en main</value>
|
||||
<value>Bien démarrer</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
@@ -480,11 +480,11 @@
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Politique de confidentialité</value>
|
||||
<value>Charte de confidentialité</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Avis de tiers</value>
|
||||
<value>Mentions tierces</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -723,7 +723,7 @@
|
||||
<value>Agrandir</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Niveau inférieur</value>
|
||||
<value>Restaurer</value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Palette de commandes</value>
|
||||
@@ -767,7 +767,7 @@
|
||||
<value>Ne plus afficher</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Cette fenêtre de terminal 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 tant qu'administrateur</value>
|
||||
<value>Exécuter en temps qu'administrateur (restreint)</value>
|
||||
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<value>Più riquadri</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Chiudi...</value>
|
||||
<value>Chiudi</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Chiudi schede a destra</value>
|
||||
@@ -199,7 +199,7 @@
|
||||
<value>Chiudi scheda</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Chiudi riquadro</value>
|
||||
<value>Chiudi il riquadro</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Dividi scheda</value>
|
||||
@@ -211,10 +211,10 @@
|
||||
<value>Ricerca nel Web</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Colore...</value>
|
||||
<value>Cambia colore scheda</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personalizzato...</value>
|
||||
<value>Personalizzato</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Reimposta</value>
|
||||
@@ -421,13 +421,13 @@
|
||||
<value>Apri nuova scheda</value>
|
||||
</data>
|
||||
<data name="NewPaneRun.Text" xml:space="preserve">
|
||||
<value>ALT + clic per dividere la finestra corrente</value>
|
||||
<value>ALT+CLIC per dividere la finestra corrente</value>
|
||||
</data>
|
||||
<data name="NewWindowRun.Text" xml:space="preserve">
|
||||
<value>MAIUSC+clic per aprire una nuova finestra</value>
|
||||
<value>MAIUSC+CLIC per aprire una nuova finestra</value>
|
||||
</data>
|
||||
<data name="ElevatedRun.Text" xml:space="preserve">
|
||||
<value>CTRL+Clic per aprire come amministratore</value>
|
||||
<value>CTRL+CLIC per aprire come amministratore</value>
|
||||
</data>
|
||||
<data name="WindowCloseButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Chiudi</value>
|
||||
@@ -464,7 +464,7 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Attività iniziali</value>
|
||||
<value>Introduzione</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
@@ -484,7 +484,7 @@
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Informative di terze parti</value>
|
||||
<value>Comunicazioni di terze parti</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -723,7 +723,7 @@
|
||||
<value>Ingrandisci</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Ripristina visualizzazione normale</value>
|
||||
<value>Ripristina in basso</value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Riquadro comandi</value>
|
||||
@@ -830,7 +830,7 @@
|
||||
<value>Vuoto</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Chiudi riquadro</value>
|
||||
<value>Chiudi il riquadro</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Chiude il riquadro attivo se sono presenti più riquadri</value>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="InitialJsonParseErrorText" xml:space="preserve">
|
||||
<value>파일에서 설정을 로드 하지 못했습니다. 후행 쉼표를 포함 하 여 구문 오류가 있는지 확인 합니다.</value>
|
||||
<value>파일에서 설정을 로드하지 못했습니다. 후행 쉼표를 포함하여 구문 오류가 있는지 확인합니다.</value>
|
||||
</data>
|
||||
<data name="MissingDefaultProfileText" xml:space="preserve">
|
||||
<value>첫 번째 프로필을 사용하여 프로필 목록에서 기본 프로필을 찾을 수 없습니다. "defaultProfile"이 프로필 중 하나의 GUID와 일치하는지 확인합니다.</value>
|
||||
@@ -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>
|
||||
@@ -310,7 +310,7 @@
|
||||
<value>상위 창의 백분율로 크기를 지정합니다. (0,1) 사이 값만 유효합니다.</value>
|
||||
</data>
|
||||
<data name="CmdNewTabDesc" xml:space="preserve">
|
||||
<value>새 작업 만들기</value>
|
||||
<value>새 탭 만들기</value>
|
||||
</data>
|
||||
<data name="CmdNTDesc" xml:space="preserve">
|
||||
<value>"new-tab" 하위 명령의 별칭입니다.</value>
|
||||
@@ -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">
|
||||
@@ -515,7 +515,7 @@
|
||||
<value>경고</value>
|
||||
</data>
|
||||
<data name="CloseReadOnlyDialog.Content" xml:space="preserve">
|
||||
<value>읽기 전용 터미널을 닫으려고 합니다. 계속하시겠어요?</value>
|
||||
<value>읽기 전용 터미널을 닫으려고 합니다. 계속하시겠습니까?</value>
|
||||
</data>
|
||||
<data name="LargePasteDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>취소</value>
|
||||
@@ -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>
|
||||
@@ -607,7 +607,7 @@
|
||||
<comment>{0} will be replaced with a number.</comment>
|
||||
</data>
|
||||
<data name="CrimsonColorButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>심홍</value>
|
||||
<value>진홍</value>
|
||||
</data>
|
||||
<data name="SteelBlueColorButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>강철색</value>
|
||||
@@ -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 Painel</value>
|
||||
<value>Fechar o painel</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Dividir Guia</value>
|
||||
<value>Guia Dividir</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Painel dividido</value>
|
||||
<value>Dividir painel</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Pesquisa na web</value>
|
||||
<value>Pesquisa na Web</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Cor...</value>
|
||||
<value>Alterar cor da guia</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Personalizados...</value>
|
||||
<value>Personalizado</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Restaurar</value>
|
||||
@@ -223,7 +223,7 @@
|
||||
<value>Renomear guia</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Duplicar Guia</value>
|
||||
<value>Duplicar guia</value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>Foi encontrado um perfil com um "backgroundImage" inválido. O perfil deve ser o padrão para que não haja nenhuma imagem de tela de fundo. Certifique-se de que, ao definir um "backgroundImage", o valor é um caminho de arquivo válido para uma imagem.</value>
|
||||
@@ -454,7 +454,7 @@
|
||||
<value>Sobre</value>
|
||||
</data>
|
||||
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Enviar Comentários</value>
|
||||
<value>Enviar comentários</value>
|
||||
</data>
|
||||
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
@@ -464,7 +464,7 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Ponto de Partida</value>
|
||||
<value>Introdução</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
@@ -484,7 +484,7 @@
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Avisos de terceiros</value>
|
||||
<value>Avisos de Terceiros</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -571,10 +571,10 @@
|
||||
<value>Falha ao analisar a linha de comando:</value>
|
||||
</data>
|
||||
<data name="CommandPaletteControlName" xml:space="preserve">
|
||||
<value>Paleta de Comandos</value>
|
||||
<value>Paleta de comandos</value>
|
||||
</data>
|
||||
<data name="TabSwitcherControlName" xml:space="preserve">
|
||||
<value>Seletor de guias</value>
|
||||
<value>Alternador de guias</value>
|
||||
</data>
|
||||
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
|
||||
<value>Digite o nome da guia...</value>
|
||||
@@ -726,7 +726,7 @@
|
||||
<value>Restaurar Tamanho Original</value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Paleta de Comandos</value>
|
||||
<value>Paleta de comandos</value>
|
||||
</data>
|
||||
<data name="NotificationIconFocusTerminal" xml:space="preserve">
|
||||
<value>Terminal de foco</value>
|
||||
@@ -746,7 +746,7 @@
|
||||
<value>Dividir a janela e iniciar em determinado diretório</value>
|
||||
</data>
|
||||
<data name="ExportTabText" xml:space="preserve">
|
||||
<value>Exportar Texto</value>
|
||||
<value>Exportar texto</value>
|
||||
</data>
|
||||
<data name="ExportFailure" xml:space="preserve">
|
||||
<value>Falha ao exportar o conteúdo do terminal</value>
|
||||
@@ -758,7 +758,7 @@
|
||||
<value>Localizar</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Texto Simples</value>
|
||||
<value>Texto sem formatação</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>O comportamento de término pode ser configurado nas configurações avançadas do perfil.</value>
|
||||
@@ -767,7 +767,7 @@
|
||||
<value>Não mostra de novo</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Esta janela do Terminal está funcionando como Administrador</value>
|
||||
<value>Esta janela do Terminal está sendo executada como administrador</value>
|
||||
</data>
|
||||
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
|
||||
<value>Sugestões encontradas: {0}</value>
|
||||
@@ -827,10 +827,10 @@
|
||||
<value>Fechar esta guia</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Vazio...</value>
|
||||
<value>Vazio</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Fechar Painel</value>
|
||||
<value>Fechar o painel</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Feche o painel ativo se vários painéis estiverem presentes</value>
|
||||
@@ -840,13 +840,13 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Mover Guia para Nova Janela</value>
|
||||
<value>Mover guia para nova janela</value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Move a guia para uma nova janela</value>
|
||||
</data>
|
||||
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
|
||||
<value>Executar como Administrador</value>
|
||||
<value>Executar como administrador</value>
|
||||
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
@@ -885,7 +885,7 @@
|
||||
<value>Se definido, o comando será acrescentado ao comando padrão do perfil em vez de substituí-lo.</value>
|
||||
</data>
|
||||
<data name="RestartConnectionText" xml:space="preserve">
|
||||
<value>Reiniciar Conexão</value>
|
||||
<value>Reiniciar conexão</value>
|
||||
</data>
|
||||
<data name="RestartConnectionToolTip" xml:space="preserve">
|
||||
<value>Reiniciar a conexão do painel ativo</value>
|
||||
|
||||
@@ -191,43 +191,43 @@
|
||||
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Ćļôŝέ... !!</value>
|
||||
<value>Ćļôŝέ !</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
|
||||
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
|
||||
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Сĺôšę Ťăв !!!</value>
|
||||
<value>Сĺôšę ťăв !!!</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Ćŀöśё Раņé !!!</value>
|
||||
<value>Ćŀöśё ρаņé !!!</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Šрľīτ Τàв !!!</value>
|
||||
<value>Šрľīτ τàв !!!</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Šрŀіт Ρªňë !!!</value>
|
||||
<value>Šрŀіт φªňë !!!</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Ẅёв Şĕаŕčĥ !!!</value>
|
||||
<value>Ẅёв şĕаŕčĥ !!!</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Ċõŀόř... !!</value>
|
||||
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Ċµѕťøм... !!!</value>
|
||||
<value>Ċµѕťøм !</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Яěšěŧ !</value>
|
||||
</data>
|
||||
<data name="RenameTabText" xml:space="preserve">
|
||||
<value>Γεñамē Ťãв !!!</value>
|
||||
<value>Γεñамē ťãв !!!</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Ďϋφľіčάтέ Τàв !!! </value>
|
||||
<value>Ďϋφľіčάтέ τàв !!! </value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
@@ -462,7 +462,7 @@
|
||||
<value>Åвōύţ !</value>
|
||||
</data>
|
||||
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Ѕеηð ₣ę℮đвäçк !!! </value>
|
||||
<value>Ѕеηð ƒę℮đвäçк !!! </value>
|
||||
</data>
|
||||
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>ΦΚ </value>
|
||||
@@ -472,11 +472,11 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
|
||||
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
<value>Ѕοџŗсė Çŏđе !!!</value>
|
||||
<value>Ѕοџŗсė ¢ŏđе !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
|
||||
@@ -484,15 +484,15 @@
|
||||
<comment>A hyperlink name for user documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
|
||||
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
|
||||
<value>Ŗеľ℮àşε πòτéš !!! </value>
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
|
||||
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Ţћĩřð-Ρářŧγ ∏οŧīĉęŝ !!! !!!</value>
|
||||
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -579,10 +579,10 @@
|
||||
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPaletteControlName" xml:space="preserve">
|
||||
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
|
||||
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
|
||||
</data>
|
||||
<data name="TabSwitcherControlName" xml:space="preserve">
|
||||
<value>Τăь Ѕωîťςћêг !!! </value>
|
||||
<value>Τăь ѕωîťςћêг !!! </value>
|
||||
</data>
|
||||
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
|
||||
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
|
||||
@@ -731,10 +731,10 @@
|
||||
<value>Μą×ìmϊżé !!</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
|
||||
<value>Ŕèšŧòяё ďǿẃи !!! </value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
|
||||
<value>Ċòмmāńδ рªľėτťë !!! !</value>
|
||||
</data>
|
||||
<data name="NotificationIconFocusTerminal" xml:space="preserve">
|
||||
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
|
||||
@@ -754,7 +754,7 @@
|
||||
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="ExportTabText" xml:space="preserve">
|
||||
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
|
||||
<value>Ė×φōŗŧ ţєхŧ !!!</value>
|
||||
</data>
|
||||
<data name="ExportFailure" xml:space="preserve">
|
||||
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
|
||||
@@ -766,7 +766,7 @@
|
||||
<value>₣ìпđ !</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Ρĺáīň Тěхт !!!</value>
|
||||
<value>Ρĺáīň тěхт !!!</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
|
||||
@@ -775,7 +775,7 @@
|
||||
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
|
||||
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
|
||||
@@ -835,10 +835,10 @@
|
||||
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Ёмφţγ... !!</value>
|
||||
<value>Ёмφţγ !</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Ĉĺοŝе Ρаиę !!!</value>
|
||||
<value>Ĉĺοŝе φаиę !!!</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
|
||||
@@ -848,13 +848,13 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
|
||||
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
|
||||
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
|
||||
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
@@ -893,7 +893,7 @@
|
||||
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RestartConnectionText" xml:space="preserve">
|
||||
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
|
||||
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
|
||||
</data>
|
||||
<data name="RestartConnectionToolTip" xml:space="preserve">
|
||||
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
|
||||
|
||||
@@ -191,43 +191,43 @@
|
||||
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Ćļôŝέ... !!</value>
|
||||
<value>Ćļôŝέ !</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
|
||||
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
|
||||
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Сĺôšę Ťăв !!!</value>
|
||||
<value>Сĺôšę ťăв !!!</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Ćŀöśё Раņé !!!</value>
|
||||
<value>Ćŀöśё ρаņé !!!</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Šрľīτ Τàв !!!</value>
|
||||
<value>Šрľīτ τàв !!!</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Šрŀіт Ρªňë !!!</value>
|
||||
<value>Šрŀіт φªňë !!!</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Ẅёв Şĕаŕčĥ !!!</value>
|
||||
<value>Ẅёв şĕаŕčĥ !!!</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Ċõŀόř... !!</value>
|
||||
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Ċµѕťøм... !!!</value>
|
||||
<value>Ċµѕťøм !</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Яěšěŧ !</value>
|
||||
</data>
|
||||
<data name="RenameTabText" xml:space="preserve">
|
||||
<value>Γεñамē Ťãв !!!</value>
|
||||
<value>Γεñамē ťãв !!!</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Ďϋφľіčάтέ Τàв !!! </value>
|
||||
<value>Ďϋφľіčάтέ τàв !!! </value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
@@ -462,7 +462,7 @@
|
||||
<value>Åвōύţ !</value>
|
||||
</data>
|
||||
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Ѕеηð ₣ę℮đвäçк !!! </value>
|
||||
<value>Ѕеηð ƒę℮đвäçк !!! </value>
|
||||
</data>
|
||||
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>ΦΚ </value>
|
||||
@@ -472,11 +472,11 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
|
||||
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
<value>Ѕοџŗсė Çŏđе !!!</value>
|
||||
<value>Ѕοџŗсė ¢ŏđе !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
|
||||
@@ -484,15 +484,15 @@
|
||||
<comment>A hyperlink name for user documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
|
||||
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
|
||||
<value>Ŗеľ℮àşε πòτéš !!! </value>
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
|
||||
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Ţћĩřð-Ρářŧγ ∏οŧīĉęŝ !!! !!!</value>
|
||||
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -579,10 +579,10 @@
|
||||
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPaletteControlName" xml:space="preserve">
|
||||
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
|
||||
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
|
||||
</data>
|
||||
<data name="TabSwitcherControlName" xml:space="preserve">
|
||||
<value>Τăь Ѕωîťςћêг !!! </value>
|
||||
<value>Τăь ѕωîťςћêг !!! </value>
|
||||
</data>
|
||||
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
|
||||
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
|
||||
@@ -731,10 +731,10 @@
|
||||
<value>Μą×ìmϊżé !!</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
|
||||
<value>Ŕèšŧòяё ďǿẃи !!! </value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
|
||||
<value>Ċòмmāńδ рªľėτťë !!! !</value>
|
||||
</data>
|
||||
<data name="NotificationIconFocusTerminal" xml:space="preserve">
|
||||
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
|
||||
@@ -754,7 +754,7 @@
|
||||
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="ExportTabText" xml:space="preserve">
|
||||
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
|
||||
<value>Ė×φōŗŧ ţєхŧ !!!</value>
|
||||
</data>
|
||||
<data name="ExportFailure" xml:space="preserve">
|
||||
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
|
||||
@@ -766,7 +766,7 @@
|
||||
<value>₣ìпđ !</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Ρĺáīň Тěхт !!!</value>
|
||||
<value>Ρĺáīň тěхт !!!</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
|
||||
@@ -775,7 +775,7 @@
|
||||
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
|
||||
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
|
||||
@@ -835,10 +835,10 @@
|
||||
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Ёмφţγ... !!</value>
|
||||
<value>Ёмφţγ !</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Ĉĺοŝе Ρаиę !!!</value>
|
||||
<value>Ĉĺοŝе φаиę !!!</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
|
||||
@@ -848,13 +848,13 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
|
||||
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
|
||||
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
|
||||
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
@@ -893,7 +893,7 @@
|
||||
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RestartConnectionText" xml:space="preserve">
|
||||
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
|
||||
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
|
||||
</data>
|
||||
<data name="RestartConnectionToolTip" xml:space="preserve">
|
||||
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
|
||||
|
||||
@@ -191,43 +191,43 @@
|
||||
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>Ćļôŝέ... !!</value>
|
||||
<value>Ćļôŝέ !</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>Ċĺοşέ Ţаъş ťό ŧђé Яΐğђт !!! !!! </value>
|
||||
<value>Ċĺοşέ ţаъş ťό ŧђé яΐğђт !!! !!! </value>
|
||||
</data>
|
||||
<data name="TabCloseOther" xml:space="preserve">
|
||||
<value>Ćĺόѕ℮ Όтђèř Ŧâьś !!! !</value>
|
||||
<value>Ćĺόѕ℮ őтђèř ŧâьś !!! !</value>
|
||||
</data>
|
||||
<data name="TabClose" xml:space="preserve">
|
||||
<value>Сĺôšę Ťăв !!!</value>
|
||||
<value>Сĺôšę ťăв !!!</value>
|
||||
</data>
|
||||
<data name="PaneClose" xml:space="preserve">
|
||||
<value>Ćŀöśё Раņé !!!</value>
|
||||
<value>Ćŀöśё ρаņé !!!</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Šрľīτ Τàв !!!</value>
|
||||
<value>Šрľīτ τàв !!!</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>Šрŀіт Ρªňë !!!</value>
|
||||
<value>Šрŀіт φªňë !!!</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Ẅёв Şĕаŕčĥ !!!</value>
|
||||
<value>Ẅёв şĕаŕčĥ !!!</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>Ċõŀόř... !!</value>
|
||||
<value>Ċħāņğě τāв ςōĺöя !!! !</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>Ċµѕťøм... !!!</value>
|
||||
<value>Ċµѕťøм !</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>Яěšěŧ !</value>
|
||||
</data>
|
||||
<data name="RenameTabText" xml:space="preserve">
|
||||
<value>Γεñамē Ťãв !!!</value>
|
||||
<value>Γεñамē ťãв !!!</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>Ďϋφľіčάтέ Τàв !!! </value>
|
||||
<value>Ďϋφľіčάтέ τàв !!! </value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
@@ -462,7 +462,7 @@
|
||||
<value>Åвōύţ !</value>
|
||||
</data>
|
||||
<data name="AboutDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Ѕеηð ₣ę℮đвäçк !!! </value>
|
||||
<value>Ѕеηð ƒę℮đвäçк !!! </value>
|
||||
</data>
|
||||
<data name="AboutDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>ΦΚ </value>
|
||||
@@ -472,11 +472,11 @@
|
||||
<comment>This is the heading for a version number label</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_GettingStartedLink.Content" xml:space="preserve">
|
||||
<value>Ġеťтΐñĝ Ѕτдŗτęď !!! !</value>
|
||||
<value>Ġеťтΐñĝ ѕτдŗτęď !!! !</value>
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
<value>Ѕοџŗсė Çŏđе !!!</value>
|
||||
<value>Ѕοџŗсė ¢ŏđе !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
|
||||
@@ -484,15 +484,15 @@
|
||||
<comment>A hyperlink name for user documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ReleaseNotesLink.Content" xml:space="preserve">
|
||||
<value>Ŗеľ℮àşε Ŋòτéš !!! </value>
|
||||
<value>Ŗеľ℮àşε πòτéš !!! </value>
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>Ρґїνãсÿ Рöĺĩςỳ !!! !</value>
|
||||
<value>Ρґїνãсÿ ρöĺĩςỳ !!! !</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>Ţћĩřð-Ρářŧγ ∏οŧīĉęŝ !!! !!!</value>
|
||||
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -579,10 +579,10 @@
|
||||
<value>₣āіľ℮ď рàгśīпģ ¢бммäⁿδ ĺīñè: !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPaletteControlName" xml:space="preserve">
|
||||
<value>Ćσmmăηδ Рάŀĕтţ℮ !!! !</value>
|
||||
<value>Ćσmmăηδ ράŀĕтţ℮ !!! !</value>
|
||||
</data>
|
||||
<data name="TabSwitcherControlName" xml:space="preserve">
|
||||
<value>Τăь Ѕωîťςћêг !!! </value>
|
||||
<value>Τăь ѕωîťςћêг !!! </value>
|
||||
</data>
|
||||
<data name="TabSwitcher_SearchBoxText" xml:space="preserve">
|
||||
<value>Ţýρё ă тăъ пâmě... !!! !!</value>
|
||||
@@ -731,10 +731,10 @@
|
||||
<value>Μą×ìmϊżé !!</value>
|
||||
</data>
|
||||
<data name="WindowRestoreDownButtonToolTip" xml:space="preserve">
|
||||
<value>Ŕèšŧòяё Ðǿẃи !!! </value>
|
||||
<value>Ŕèšŧòяё ďǿẃи !!! </value>
|
||||
</data>
|
||||
<data name="CommandPaletteMenuItem" xml:space="preserve">
|
||||
<value>Ċòмmāńδ Рªľėτťë !!! !</value>
|
||||
<value>Ċòмmāńδ рªľėτťë !!! !</value>
|
||||
</data>
|
||||
<data name="NotificationIconFocusTerminal" xml:space="preserve">
|
||||
<value>₣ôćűŝ Ţеґмĭйâŀ !!! !</value>
|
||||
@@ -754,7 +754,7 @@
|
||||
<value>Ŝρℓΐŧ ŧнė ẁίňďõŵ άпδ ŝţâґţ ίń ģįνëʼn δϊгέ¢ŧøяў !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="ExportTabText" xml:space="preserve">
|
||||
<value>Ė×φōŗŧ Ţєхŧ !!!</value>
|
||||
<value>Ė×φōŗŧ ţєхŧ !!!</value>
|
||||
</data>
|
||||
<data name="ExportFailure" xml:space="preserve">
|
||||
<value>₣ăìľεď ťθ эхроґт ţеґmίñдļ ¢ōйт℮лť !!! !!! !!! </value>
|
||||
@@ -766,7 +766,7 @@
|
||||
<value>₣ìпđ !</value>
|
||||
</data>
|
||||
<data name="PlainText" xml:space="preserve">
|
||||
<value>Ρĺáīň Тěхт !!!</value>
|
||||
<value>Ρĺáīň тěхт !!!</value>
|
||||
</data>
|
||||
<data name="CloseOnExitInfoBar.Message" xml:space="preserve">
|
||||
<value>Ťéямїлâŧîόň ь℮ћäνįőř čªή вĕ ċοñƒĩġџřèδ įŋ ăδνåл¢êð ряòƒιļє şėŧтіиĝś. !!! !!! !!! !!! !!! !!! !!</value>
|
||||
@@ -775,7 +775,7 @@
|
||||
<value>Ďόń'ţ šħόω ãĝάϊл !!! !</value>
|
||||
</data>
|
||||
<data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ Ãðmĭⁿ !!! !!! !!! !!!</value>
|
||||
<value>Ţђіś Тĕřмїηǻℓ шĩⁿðöŵ ïѕ ѓüñňĩñģ ãŝ áðmĭⁿîşŧŕãţθŕ !!! !!! !!! !!! !!</value>
|
||||
</data>
|
||||
<data name="CommandPalette_MatchesAvailable" xml:space="preserve">
|
||||
<value>Ѕũğġεšтįóпş ƒōцʼnđ: {0} !!! !!! </value>
|
||||
@@ -835,10 +835,10 @@
|
||||
<value>Ĉłоśэ ťĥìŝ ţªъ !!! !</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>Ёмφţγ... !!</value>
|
||||
<value>Ёмφţγ !</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>Ĉĺοŝе Ρаиę !!!</value>
|
||||
<value>Ĉĺοŝе φаиę !!!</value>
|
||||
</data>
|
||||
<data name="ClosePaneToolTip" xml:space="preserve">
|
||||
<value>Çĺόś℮ τнĕ ă¢τίν℮ рáлĕ ιƒ mϋŀţїрĺë φàńęś άŗє рřęšеńт !!! !!! !!! !!! !!!</value>
|
||||
@@ -848,13 +848,13 @@
|
||||
<comment>Text used to identify the reset button</comment>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowText" xml:space="preserve">
|
||||
<value>Мόνз Ţǻь ŧö П℮ω Щĭŋδōώ !!! !!! </value>
|
||||
<value>Мόνз ţǻь ŧö ʼn℮ω ώĭŋδōώ !!! !!! </value>
|
||||
</data>
|
||||
<data name="MoveTabToNewWindowToolTip" xml:space="preserve">
|
||||
<value>Мøνëŝ ŧªъ ŧǿ ã пεẃ шίŋđоẁ !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RunAsAdminFlyout.Text" xml:space="preserve">
|
||||
<value>Ŕμŋ ąś Āďmįиíšťґąţőя !!! !!!</value>
|
||||
<value>Ŕμŋ ąś åďmįиíšťґąţőя !!! !!!</value>
|
||||
<comment>This text is displayed on context menu for profile entries in add new tab button.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
@@ -893,7 +893,7 @@
|
||||
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
</data>
|
||||
<data name="RestartConnectionText" xml:space="preserve">
|
||||
<value>Γēѕŧâяŧ Ĉǿńńēčťїöл !!! !!</value>
|
||||
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
|
||||
</data>
|
||||
<data name="RestartConnectionToolTip" xml:space="preserve">
|
||||
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
|
||||
|
||||
@@ -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>Web 搜索</value>
|
||||
<value>网络搜索</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>颜色...</value>
|
||||
<value>更改选项卡颜色</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>自定义...</value>
|
||||
<value>自定义</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>重置</value>
|
||||
@@ -223,7 +223,7 @@
|
||||
<value>重命名选项卡</value>
|
||||
</data>
|
||||
<data name="DuplicateTabText" xml:space="preserve">
|
||||
<value>复制选项卡</value>
|
||||
<value>复制标签页</value>
|
||||
</data>
|
||||
<data name="InvalidBackgroundImage" xml:space="preserve">
|
||||
<value>找到一个具有无效 "backgroundImage" 的配置文件。将该配置文件设置为默认设置为不包含背景图像。请确保在设置 "backgroundImage" 时,该值是指向图像的有效文件路径。</value>
|
||||
@@ -480,7 +480,7 @@
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>隐私策略</value>
|
||||
<value>隐私政策</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
@@ -827,7 +827,7 @@
|
||||
<value>关闭此选项卡</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>空白...</value>
|
||||
<value>空</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>关闭窗格</value>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<value>多個窗格</value>
|
||||
</data>
|
||||
<data name="TabCloseSubMenu" xml:space="preserve">
|
||||
<value>關閉...</value>
|
||||
<value>關閉</value>
|
||||
</data>
|
||||
<data name="TabCloseAfter" xml:space="preserve">
|
||||
<value>關閉右側的索引標籤</value>
|
||||
@@ -202,19 +202,19 @@
|
||||
<value>關閉窗格</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>分割 Tab</value>
|
||||
<value>分割索引標籤</value>
|
||||
</data>
|
||||
<data name="SplitPaneText" xml:space="preserve">
|
||||
<value>分割窗格</value>
|
||||
</data>
|
||||
<data name="SearchWebText" xml:space="preserve">
|
||||
<value>Web 搜尋</value>
|
||||
<value>網頁搜尋</value>
|
||||
</data>
|
||||
<data name="TabColorChoose" xml:space="preserve">
|
||||
<value>色彩...</value>
|
||||
<value>變更索引標籤色彩</value>
|
||||
</data>
|
||||
<data name="TabColorCustomButton.Content" xml:space="preserve">
|
||||
<value>自訂...</value>
|
||||
<value>自訂</value>
|
||||
</data>
|
||||
<data name="TabColorClearButton.Content" xml:space="preserve">
|
||||
<value>重設</value>
|
||||
@@ -468,7 +468,7 @@
|
||||
<comment>A hyperlink name for a guide on how to get started using Terminal</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_SourceCodeLink.Content" xml:space="preserve">
|
||||
<value>原始程式碼</value>
|
||||
<value>原始碼</value>
|
||||
<comment>A hyperlink name for the Terminal's documentation</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_DocumentationLink.Content" xml:space="preserve">
|
||||
@@ -480,11 +480,11 @@
|
||||
<comment>A hyperlink name for the Terminal's release notes</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_PrivacyPolicyLink.Content" xml:space="preserve">
|
||||
<value>隱私權原則</value>
|
||||
<value>隱私權政策</value>
|
||||
<comment>A hyperlink name for the Terminal's privacy policy</comment>
|
||||
</data>
|
||||
<data name="AboutDialog_ThirdPartyNoticesLink.Content" xml:space="preserve">
|
||||
<value>第三方聲明</value>
|
||||
<value>第三方注意事項</value>
|
||||
<comment>A hyperlink name for the Terminal's third-party notices</comment>
|
||||
</data>
|
||||
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
|
||||
@@ -827,7 +827,7 @@
|
||||
<value>關閉此索引標籤</value>
|
||||
</data>
|
||||
<data name="NewTabMenuFolderEmpty" xml:space="preserve">
|
||||
<value>空白...</value>
|
||||
<value>清空</value>
|
||||
</data>
|
||||
<data name="ClosePaneText" xml:space="preserve">
|
||||
<value>關閉窗格</value>
|
||||
|
||||
@@ -26,6 +26,11 @@ 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;
|
||||
@@ -40,11 +45,21 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
void ScratchpadContent::Close()
|
||||
{
|
||||
CloseRequested.raise(*this, nullptr);
|
||||
}
|
||||
|
||||
NewTerminalArgs ScratchpadContent::GetNewTerminalArgs(const BuildStartupKind /* kind */) const
|
||||
INewContentArgs ScratchpadContent::GetNewTerminalArgs(const BuildStartupKind /* kind */) const
|
||||
{
|
||||
return nullptr;
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,16 +13,21 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
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::NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind) const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs 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();
|
||||
|
||||
til::typed_event<> ConnectionStateChanged;
|
||||
til::typed_event<IPaneContent> CloseRequested;
|
||||
|
||||
80
src/cascadia/TerminalApp/SettingsPaneContent.cpp
Normal file
@@ -0,0 +1,80 @@
|
||||
// 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()
|
||||
{
|
||||
}
|
||||
|
||||
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>();
|
||||
}
|
||||
}
|
||||
46
src/cascadia/TerminalApp/SettingsPaneContent.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
#include "winrt/TerminalApp.h"
|
||||
#include <LibraryResources.h>
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
class SettingsPaneContent : public winrt::implements<SettingsPaneContent, IPaneContent>
|
||||
{
|
||||
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();
|
||||
|
||||
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::Settings::Editor::MainPage _sui{ nullptr };
|
||||
winrt::Windows::UI::Xaml::ElementTheme _requestedTheme;
|
||||
};
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
// 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>();
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/*++
|
||||
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;
|
||||
};
|
||||
}
|
||||