mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-21 06:18:34 +00:00
Compare commits
7 Commits
dev/duhowe
...
dev/cazamo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
730a8eb3c5 | ||
|
|
1bcd2e4d4f | ||
|
|
1154428f9c | ||
|
|
197969255a | ||
|
|
34e973fd18 | ||
|
|
f990fc2fbb | ||
|
|
da1d3224a1 |
2
.github/ISSUE_TEMPLATE/Bug_Report.yml
vendored
2
.github/ISSUE_TEMPLATE/Bug_Report.yml
vendored
@@ -8,7 +8,7 @@ body:
|
||||
value: |
|
||||
Please make sure to [search for existing issues](https://github.com/microsoft/terminal/issues) and [check the FAQ](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)) before filing a new one!
|
||||
|
||||
If this is an application crash, please provide a [Feedback Hub](https://aka.ms/terminal-feedback-hub) submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal" and choose "Share My Feedback" after submission to get the link.
|
||||
If this is an application crash, please also provide a [Feedback Hub](https://aka.ms/terminal-feedback-hub) submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal" and choose "Share My Feedback" after submission to get the link.
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
|
||||
1
.github/actions/spelling/README.md
vendored
1
.github/actions/spelling/README.md
vendored
@@ -10,7 +10,6 @@ File | Purpose | Format | Info
|
||||
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
|
||||
[expect/*.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
|
||||
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
|
||||
[config.json](config.json) | Action Configuration | JSON key (action configuration variable) value (action configuration value) | [config](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-config)
|
||||
|
||||
Note: you can replace any of these files with a directory by the same name (minus the suffix)
|
||||
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
|
||||
|
||||
1
.github/actions/spelling/advice.md
vendored
1
.github/actions/spelling/advice.md
vendored
@@ -22,7 +22,6 @@ See the `README.md` in each directory for more information.
|
||||
<details><summary>If the flagged items are :exploding_head: false positives</summary>
|
||||
|
||||
If items relate to a ...
|
||||
|
||||
* binary file (or some other file you wouldn't want to check at all).
|
||||
|
||||
Please add a file path to the `excludes.txt` file matching the containing file.
|
||||
|
||||
9
.github/actions/spelling/allow/allow.txt
vendored
9
.github/actions/spelling/allow/allow.txt
vendored
@@ -23,10 +23,8 @@ FTCS
|
||||
gantt
|
||||
gfm
|
||||
ghe
|
||||
github
|
||||
godbolt
|
||||
hstrings
|
||||
https
|
||||
hyperlinking
|
||||
hyperlinks
|
||||
Kbds
|
||||
@@ -46,7 +44,6 @@ mru
|
||||
notwrapped
|
||||
NTMTo
|
||||
overlined
|
||||
passthrough
|
||||
perlw
|
||||
postmodern
|
||||
Powerline
|
||||
@@ -68,7 +65,6 @@ rubyw
|
||||
runtimes
|
||||
servicebus
|
||||
slnt
|
||||
ssh
|
||||
stakeholders
|
||||
subpage
|
||||
subpages
|
||||
@@ -76,11 +72,10 @@ sustainability
|
||||
sxn
|
||||
Tencent
|
||||
toolset
|
||||
ubuntu
|
||||
UEFI
|
||||
uiatextrange
|
||||
Uids
|
||||
UEFI
|
||||
UIDs
|
||||
uiatextrange
|
||||
und
|
||||
vsdevcmd
|
||||
westus
|
||||
|
||||
84
.github/actions/spelling/candidate.patterns
vendored
84
.github/actions/spelling/candidate.patterns
vendored
@@ -1,5 +1,5 @@
|
||||
# Repeated letters
|
||||
\b([A-Za-z])\g{-1}{2,}\b
|
||||
\b([a-z])\g{-1}{2,}\b
|
||||
|
||||
# marker to ignore all code on line
|
||||
^.*/\* #no-spell-check-line \*/.*$
|
||||
@@ -11,7 +11,7 @@
|
||||
^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b
|
||||
|
||||
# copyright
|
||||
Copyright (?:\([Cc]\)|©|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
|
||||
Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
|
||||
|
||||
# patch hunk comments
|
||||
^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .*
|
||||
@@ -19,10 +19,10 @@ Copyright (?:\([Cc]\)|©|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
|
||||
index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
|
||||
|
||||
# file permissions
|
||||
(?:^|['"`\s])(?!-+\s)[-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s]
|
||||
['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s]
|
||||
|
||||
# css fonts
|
||||
\bfont(?:-family(?:[-\w+]*)|):[^;}]+
|
||||
\bfont(?:-family|):[^;}]+
|
||||
|
||||
# css url wrappings
|
||||
\burl\([^)]+\)
|
||||
@@ -36,10 +36,10 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
|
||||
# data url in quotes
|
||||
([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
|
||||
# data url
|
||||
\bdata:[-a-zA-Z=;:/0-9+_]*,\S*
|
||||
\bdata:[-a-zA-Z=;:/0-9+]*,\S*
|
||||
|
||||
# https/http/file urls
|
||||
#(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
|
||||
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
|
||||
|
||||
# mailto urls
|
||||
mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,}
|
||||
@@ -88,9 +88,6 @@ arn:aws:[-/:\w]+
|
||||
# AWS VPC
|
||||
vpc-\w+
|
||||
|
||||
# Azure AD
|
||||
\baad\.\w{48}\b
|
||||
|
||||
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
|
||||
# YouTube url
|
||||
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
|
||||
@@ -172,7 +169,7 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
|
||||
GHSA(?:-[0-9a-z]{4}){3}
|
||||
|
||||
# GitHub actions
|
||||
\buses:\s+(['"]?)[-\w.]+/[-\w./]+@[-\w.]+\g{-1}
|
||||
\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+
|
||||
|
||||
# GitLab commit
|
||||
\bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b
|
||||
@@ -241,7 +238,7 @@ accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
|
||||
\bmedium\.com/@?[^/\s"]+/[-\w]+
|
||||
|
||||
# microsoft
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%?#]*
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
|
||||
# powerbi
|
||||
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
|
||||
# vs devops
|
||||
@@ -415,7 +412,7 @@ ipfs://[0-9a-zA-Z]{3,}
|
||||
\bgetopts\s+(?:"[^"]+"|'[^']+')
|
||||
|
||||
# ANSI color codes
|
||||
#(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[(?:\d+(?:;\d+)*|)m
|
||||
(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
|
||||
|
||||
# URL escaped characters
|
||||
%[0-9A-F][A-F](?=[A-Za-z])
|
||||
@@ -433,7 +430,7 @@ sha\d+:[0-9a-f]*?[a-f]{3,}[0-9a-f]*
|
||||
# sha-... -- uses a fancy capture
|
||||
(\\?['"]|")[0-9a-f]{40,}\g{-1}
|
||||
# hex runs
|
||||
\b(?=(?:[a-fA-F]{0,2}\d)*[a-fA-F]{3})[0-9a-fA-F]{16,}\b
|
||||
\b[0-9a-fA-F]{16,}\b
|
||||
# hex in url queries
|
||||
=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
|
||||
# ssh
|
||||
@@ -457,12 +454,8 @@ LS0tLS1CRUdJT.*
|
||||
|
||||
# uuid:
|
||||
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
|
||||
|
||||
# unicode escaped characters (4)
|
||||
\\u[0-9a-fA-F]{4}
|
||||
|
||||
# hex digits including css/html color classes
|
||||
(?:[\\0][xX]|\\u\{?|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
|
||||
# hex digits including css/html color classes:
|
||||
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
|
||||
|
||||
# integrity
|
||||
integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
|
||||
@@ -484,7 +477,7 @@ Name\[[^\]]+\]=.*
|
||||
(?:(?:\b|_|(?<=[a-z]))I|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
|
||||
|
||||
# python
|
||||
\b(?i)py(?!gment|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
|
||||
\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
|
||||
|
||||
# crypt
|
||||
(['"])\$2[ayb]\$.{56}\g{-1}
|
||||
@@ -504,21 +497,12 @@ Name\[[^\]]+\]=.*
|
||||
# go.sum
|
||||
\bh1:\S+
|
||||
|
||||
# golang print-f-style functions
|
||||
#(?i)(?<=append|comma|debug|equal|err|error|exit|fatal|format|info|log|name|panic|print|skip|scan|string|trace|true|warn|warning|wrap|write)(?:f|ln)(?:[ (]|$)
|
||||
|
||||
# golang regular expression
|
||||
#(?<!")\br".+?"
|
||||
|
||||
# imports
|
||||
^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+(?:\s+from (['"]).*?\g{-1}|)
|
||||
^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+
|
||||
|
||||
# scala modules
|
||||
("[^"]+"\s*%%?\s*){2,3}"[^"]+"
|
||||
|
||||
# Dataframes / NumPy
|
||||
\b(?:df|np)\.\w{3,}
|
||||
|
||||
# container images
|
||||
image: [-\w./:@]+
|
||||
|
||||
@@ -529,7 +513,7 @@ image: [-\w./:@]+
|
||||
\s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B
|
||||
|
||||
# Intel intrinsics
|
||||
_mm\d*_(?!dd)\w+
|
||||
_mm_(?!dd)\w+
|
||||
|
||||
# Input to GitHub JSON
|
||||
content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
|
||||
@@ -548,18 +532,12 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
|
||||
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
|
||||
(?<!['"])\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)['"](?=[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
|
||||
|
||||
# Regular expression for word breaks
|
||||
#\\b(?=[a-z]{2})
|
||||
|
||||
# Regular expressions for (P|p)assword
|
||||
\([A-Z]\|[a-z]\)[a-z]+
|
||||
|
||||
# Java regular expressions
|
||||
Pattern\.(?:compile|matches)\(".*"
|
||||
|
||||
# JavaScript regular expressions
|
||||
# javascript exec/test regex
|
||||
/.{3,}?/[gim]*\.(?:exec|test)\(
|
||||
# javascript test regex
|
||||
/.{3,}/[gim]*\.test\(
|
||||
# javascript match regex
|
||||
\.match\(/[^/\s"]{3,}/[gim]*\s*
|
||||
# javascript match regex
|
||||
@@ -586,7 +564,7 @@ perl(?:\s+-[a-zA-Z]\w*)+
|
||||
regexp?\.MustCompile\((?:`[^`]*`|".*"|'.*')\)
|
||||
|
||||
# regex choice
|
||||
#\((?=[^)]*[a-zA-Z]{3})(?:\?:|)[^)|]+(?<! )\|(?!(?:jq|xargs)\b)[^)| ][^)]*\)
|
||||
\(\?:[^)]+\|[^)]+\)
|
||||
|
||||
# proto
|
||||
^\s*(\w+)\s\g{-1} =
|
||||
@@ -609,9 +587,6 @@ urn:shemas-jetbrains-com
|
||||
# Debian changelog severity
|
||||
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b
|
||||
|
||||
# Red Hat Package management spec file dependencies
|
||||
^(?:Build|)Requires: [-.\w]+
|
||||
|
||||
# kubernetes pod status lists
|
||||
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
|
||||
\w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+
|
||||
@@ -666,8 +641,6 @@ PrependWithABINamepsace
|
||||
>[-a-zA-Z=;:/0-9+]{3,}=</
|
||||
# base64 encoded content, possibly wrapped in mime
|
||||
#(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)
|
||||
# jwt
|
||||
(?:\be[wy][-a-zA-Z=;:/0-9+]+\.){2}[-_\w]+
|
||||
# base64 encoded json
|
||||
\beyJ[-a-zA-Z=;:/0-9+]+
|
||||
# base64 encoded pkcs
|
||||
@@ -705,9 +678,9 @@ systemd.*?running in system mode \([-+].*\)$
|
||||
|
||||
# Non-English
|
||||
# Even repositories expecting pure English content can unintentionally have Non-English content... People will occasionally mistakenly enter [homoglyphs](https://en.wikipedia.org/wiki/Homoglyph) which are essentially typos, and using this pattern will mean check-spelling will not complain about them.
|
||||
# .
|
||||
#
|
||||
# If the content to be checked should be written in English and the only Non-English items will be people's names, then you can consider adding this.
|
||||
# .
|
||||
#
|
||||
# Alternatively, if you're using check-spelling v0.0.25+, and you would like to _check_ the Non-English content for spelling errors, you can. For information on how to do so, see:
|
||||
# https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode
|
||||
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
|
||||
@@ -719,7 +692,7 @@ systemd.*?running in system mode \([-+].*\)$
|
||||
# This corpus only had capital letters, but you probably want lowercase ones as well.
|
||||
\b[LN]'+[a-z]{2,}\b
|
||||
|
||||
# LaTeX
|
||||
# latex (check-spelling >= 0.0.22)
|
||||
\\\w{2,}\{
|
||||
|
||||
# American Mathematical Society (AMS) / Doxygen
|
||||
@@ -746,6 +719,7 @@ nolint:\s*[\w,]+
|
||||
# cygwin paths
|
||||
/cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+
|
||||
|
||||
# in check-spelling@v0.0.22+, printf markers aren't automatically consumed
|
||||
# printf markers
|
||||
#(?<!\\)\\[nrt](?=[a-z]{2,})
|
||||
|
||||
@@ -776,20 +750,18 @@ W/"[^"]+"
|
||||
|
||||
# Compiler flags (Unix, Java/Scala)
|
||||
# Use if you have things like `-Pdocker` and want to treat them as `docker`
|
||||
#(?:^|[\t ,>"'`=\[(#])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
|
||||
#(?:^|[\t ,>"'`=(#])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
|
||||
|
||||
# Compiler flags (Windows / PowerShell)
|
||||
# This is a subset of the more general compiler flags pattern.
|
||||
# It avoids matching `-Path` to prevent it from being treated as `ath`
|
||||
#(?:^|[\t ,"'`=\[(#])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
|
||||
#(?:^|[\t ,"'`=(#])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
|
||||
|
||||
# Compiler flags (linker)
|
||||
,-B
|
||||
|
||||
# Library prefix
|
||||
# e.g., `lib`+`archive`, `lib`+`raw`, `lib`+`unwind`
|
||||
# (ignores some words that happen to start with `lib`)
|
||||
#(?:\b|_)[Ll]ib(?!era[lt])(?:re(?=office)|era|)(?!ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
|
||||
# libraries
|
||||
#(?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
|
||||
|
||||
# iSCSI iqn (approximate regex)
|
||||
\biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b
|
||||
@@ -800,9 +772,9 @@ W/"[^"]+"
|
||||
# curl arguments
|
||||
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
|
||||
# set arguments
|
||||
\b(?:bash|(?<!\.)sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
|
||||
\b(?:bash|sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
|
||||
# tar arguments
|
||||
\b(?:\\n|)g?tar(?:\.exe|)(?:\s-C \S+|(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
|
||||
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
|
||||
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
|
||||
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
|
||||
# macOS temp folders
|
||||
|
||||
105
.github/actions/spelling/config.json
vendored
105
.github/actions/spelling/config.json
vendored
@@ -1,105 +0,0 @@
|
||||
{
|
||||
"dictionary_source_prefixes": {
|
||||
"asm": "https://raw.githubusercontent.com/check-spelling/assembly-dictionaries/20231110/",
|
||||
"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/",
|
||||
"census": "https://raw.githubusercontent.com/check-spelling-sandbox/census/dictionaries-d90e686f89dd241ad61d30f26619e54d73e73c6e/dictionaries/"
|
||||
},
|
||||
"extra_dictionaries": [
|
||||
"cspell:software-terms/softwareTerms.txt",
|
||||
"cspell:cpp/stdlib-c.txt",
|
||||
"census:census-5.txt",
|
||||
"cspell:cpp/stdlib-cpp.txt",
|
||||
"cspell:python/python/python-lib.txt",
|
||||
"cspell:php/php.txt",
|
||||
"cspell:dart/dart.txt",
|
||||
"cspell:css/css.txt",
|
||||
"cspell:node/node.txt",
|
||||
"cspell:filetypes/filetypes.txt",
|
||||
"cspell:npm/npm.txt",
|
||||
"cspell:java/java.txt",
|
||||
"cspell:dotnet/dotnet.txt",
|
||||
"cspell:fullstack/fullstack.txt",
|
||||
"cspell:java/java-terms.txt",
|
||||
"cspell:cpp/stdlib-cmath.txt",
|
||||
"cspell:typescript/typescript.txt",
|
||||
"cspell:cpp/compiler-msvc.txt",
|
||||
"cspell:python/common/extra.txt",
|
||||
"cspell:html/html.txt",
|
||||
"cspell:golang/go.txt",
|
||||
"cspell:cpp/ecosystem.txt",
|
||||
"cspell:powershell/powershell.txt",
|
||||
"cspell:mnemonics/mnemonics.txt",
|
||||
""
|
||||
],
|
||||
"check_extra_dictionaries": [
|
||||
"asm:amd64-isa.txt",
|
||||
"asm:ia64-isa.txt",
|
||||
"asm:power-isa.txt",
|
||||
"cspell:ada/ada.txt",
|
||||
"cspell:aws/aws.txt",
|
||||
"cspell:clojure/clojure.txt",
|
||||
"cspell:companies/companies.txt",
|
||||
"cspell:cpp/compiler-clang-attributes.txt",
|
||||
"cspell:cpp/compiler-gcc.txt",
|
||||
"cspell:cpp/compiler-msvc.txt",
|
||||
"cspell:cpp/ecosystem.txt",
|
||||
"cspell:cpp/lang-jargon.txt",
|
||||
"cspell:cpp/lang-keywords.txt",
|
||||
"cspell:cpp/people.txt",
|
||||
"cspell:cpp/stdlib-c.txt",
|
||||
"cspell:cpp/stdlib-cerrno.txt",
|
||||
"cspell:cpp/stdlib-cmath.txt",
|
||||
"cspell:cpp/stdlib-cpp.txt",
|
||||
"cspell:cpp/template-strings.txt",
|
||||
"cspell:cryptocurrencies/cryptocurrencies.txt",
|
||||
"cspell:csharp/csharp.txt",
|
||||
"cspell:css/css.txt",
|
||||
"cspell:dart/dart.txt",
|
||||
"cspell:django/django.txt",
|
||||
"cspell:django/requirements.txt",
|
||||
"cspell:docker/docker-words.txt",
|
||||
"cspell:dotnet/dotnet.txt",
|
||||
"cspell:elixir/elixir.txt",
|
||||
"cspell:filetypes/filetypes.txt",
|
||||
"cspell:fonts/fonts.txt",
|
||||
"cspell:fullstack/fullstack.txt",
|
||||
"cspell:gaming-terms/gaming-terms.txt",
|
||||
"cspell:golang/go.txt",
|
||||
"cspell:haskell/haskell.txt",
|
||||
"cspell:html/html.txt",
|
||||
"cspell:java/java-terms.txt",
|
||||
"cspell:java/java.txt",
|
||||
"cspell:k8s/k8s.txt",
|
||||
"cspell:latex/latex.txt",
|
||||
"cspell:latex/samples/sample-words.txt",
|
||||
"cspell:lisp/lisp.txt",
|
||||
"cspell:lorem-ipsum/dictionary.txt",
|
||||
"cspell:lua/lua.txt",
|
||||
"cspell:mnemonics/mnemonics.txt",
|
||||
"cspell:monkeyc/monkeyc_keywords.txt",
|
||||
"cspell:node/node.txt",
|
||||
"cspell:npm/npm.txt",
|
||||
"cspell:php/php.txt",
|
||||
"cspell:powershell/powershell.txt",
|
||||
"cspell:public-licenses/generated/public-licenses.txt",
|
||||
"cspell:python/additional_words.txt",
|
||||
"cspell:python/common/extra.txt",
|
||||
"cspell:python/python/python-lib.txt",
|
||||
"cspell:python/python/python.txt",
|
||||
"cspell:r/r.txt",
|
||||
"cspell:redis/redis.txt",
|
||||
"cspell:ruby/ruby.txt",
|
||||
"cspell:rust/rust.txt",
|
||||
"cspell:scala/scala.txt",
|
||||
"cspell:shell/shell-all-words.txt",
|
||||
"cspell:software-terms/software-terms.txt",
|
||||
"cspell:software-terms/webServices.txt",
|
||||
"cspell:sql/sql.txt",
|
||||
"cspell:sql/tsql.txt",
|
||||
"cspell:svelte/svelte.txt",
|
||||
"cspell:swift/swift.txt",
|
||||
"cspell:typescript/typescript.txt",
|
||||
"census:census-5.txt",
|
||||
""
|
||||
]
|
||||
}
|
||||
5
.github/actions/spelling/excludes.txt
vendored
5
.github/actions/spelling/excludes.txt
vendored
@@ -16,7 +16,6 @@
|
||||
ignore$
|
||||
Resources/(?!en)
|
||||
[^/]\.vsdx$
|
||||
-lock\.yaml$
|
||||
\.a$
|
||||
\.ai$
|
||||
\.all-contributorsrc$
|
||||
@@ -121,19 +120,17 @@ Resources/(?!en)
|
||||
^src/types/ut_types/UtilsTests\.cpp$
|
||||
^tools/ReleaseEngineering/ServicingPipeline\.ps1$
|
||||
^XamlStyler\.json$
|
||||
^\.clang-format$
|
||||
^\.github/actions/spelling/
|
||||
^\.github/workflows/spelling\d*\.yml$
|
||||
^\.vsconfig$
|
||||
^\Qbuild/config/release.gdnbaselines\E$
|
||||
^\Qdep/WinAppDriver/EULA.rtf\E$
|
||||
^\Qdoc/reference/windows-terminal-logo.ans\E$
|
||||
^\Qsrc/cascadia/ut_app/FzfTests.cpp\E$
|
||||
^\Qsrc/host/ft_host/chafa.txt\E$
|
||||
^\Qsrc/host/ft_host/Host.Tests.Feature.rc\E$
|
||||
^\Qsrc/host/ft_uia/run.bat\E$
|
||||
^\Qsrc/host/runft.bat\E$
|
||||
^\Qsrc/terminal/parser/ft_fuzzer/run.bat\E$
|
||||
^\Qsrc/terminal/parser/ft_fuzzwrapper/run.bat\E$
|
||||
^\Qsrc/tools/lnkd/lnkd.bat\E$
|
||||
^\Qsrc/tools/pixels/pixels.bat\E$
|
||||
^\Qsrc/cascadia/ut_app/FzfTests.cpp\E$
|
||||
|
||||
1
.github/actions/spelling/expect/74d92373e136649071b3c04dc8773f18deaf5e04.txt
vendored
Normal file
1
.github/actions/spelling/expect/74d92373e136649071b3c04dc8773f18deaf5e04.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ftcs
|
||||
1
.github/actions/spelling/expect/alphabet.txt
vendored
1
.github/actions/spelling/expect/alphabet.txt
vendored
@@ -5,6 +5,7 @@ BBDM
|
||||
BBGGRR
|
||||
CBN
|
||||
cbt
|
||||
Ccc
|
||||
cch
|
||||
efg
|
||||
efgh
|
||||
|
||||
143
.github/actions/spelling/expect/expect.txt
vendored
143
.github/actions/spelling/expect/expect.txt
vendored
@@ -1,13 +1,13 @@
|
||||
aaaaabbb
|
||||
aabbcc
|
||||
ABANDONFONT
|
||||
abbcc
|
||||
abcc
|
||||
abgr
|
||||
ABANDONFONT
|
||||
ABORTIFHUNG
|
||||
ACCESSTOKEN
|
||||
acidev
|
||||
ACIOSS
|
||||
ACL'd
|
||||
acp
|
||||
actctx
|
||||
ACTCTXW
|
||||
@@ -51,6 +51,7 @@ appletname
|
||||
APPLMODAL
|
||||
Applocal
|
||||
appmodel
|
||||
appshellintegration
|
||||
APPWINDOW
|
||||
APPXMANIFESTVERSION
|
||||
APrep
|
||||
@@ -59,10 +60,12 @@ ARRAYSIZE
|
||||
ARROWKEYS
|
||||
ASBSET
|
||||
ASetting
|
||||
ASingle
|
||||
ASYNCDONTCARE
|
||||
ASYNCWINDOWPOS
|
||||
atch
|
||||
ATest
|
||||
atg
|
||||
aumid
|
||||
Authenticode
|
||||
AUTOBUDDY
|
||||
@@ -77,12 +80,14 @@ Autowrap
|
||||
AVerify
|
||||
awch
|
||||
azurecr
|
||||
AZZ
|
||||
backgrounded
|
||||
Backgrounder
|
||||
backgrounding
|
||||
backstory
|
||||
Bazz
|
||||
bbccb
|
||||
BBDM
|
||||
bbwe
|
||||
bcount
|
||||
bcx
|
||||
@@ -108,6 +113,7 @@ bitmasks
|
||||
BITOPERATION
|
||||
BKCOLOR
|
||||
BKGND
|
||||
BKMK
|
||||
Bksp
|
||||
Blt
|
||||
blu
|
||||
@@ -116,6 +122,7 @@ bmi
|
||||
bodgy
|
||||
BOLDFONT
|
||||
Borland
|
||||
boutput
|
||||
boxheader
|
||||
BPBF
|
||||
bpp
|
||||
@@ -160,7 +167,7 @@ CFuzz
|
||||
cgmanifest
|
||||
cgscrn
|
||||
chafa
|
||||
changelist
|
||||
changelists
|
||||
CHARSETINFO
|
||||
chshdng
|
||||
CHT
|
||||
@@ -193,7 +200,6 @@ colorizing
|
||||
COLORONCOLOR
|
||||
COLORREFs
|
||||
colorschemes
|
||||
colorspaces
|
||||
colorspec
|
||||
colortable
|
||||
colortbl
|
||||
@@ -224,12 +230,14 @@ CONKBD
|
||||
conlibk
|
||||
conmsgl
|
||||
CONNECTINFO
|
||||
connyection
|
||||
CONOUT
|
||||
conprops
|
||||
conpropsp
|
||||
conpty
|
||||
conptylib
|
||||
conserv
|
||||
consoleaccessibility
|
||||
consoleapi
|
||||
CONSOLECONTROL
|
||||
CONSOLEENDTASK
|
||||
@@ -239,6 +247,7 @@ CONSOLEIME
|
||||
CONSOLESETFOREGROUND
|
||||
consoletaeftemplates
|
||||
consoleuwp
|
||||
Consolewait
|
||||
CONSOLEWINDOWOWNER
|
||||
consrv
|
||||
constexprable
|
||||
@@ -257,6 +266,7 @@ CPG
|
||||
cpinfo
|
||||
CPINFOEX
|
||||
CPLINFO
|
||||
cplusplus
|
||||
CPPCORECHECK
|
||||
cppcorecheckrules
|
||||
cpprestsdk
|
||||
@@ -267,6 +277,7 @@ CREATESTRUCT
|
||||
CREATESTRUCTW
|
||||
createvpack
|
||||
crisman
|
||||
crloew
|
||||
CRTLIBS
|
||||
csbi
|
||||
csbiex
|
||||
@@ -277,6 +288,7 @@ csrutil
|
||||
CSTYLE
|
||||
CSwitch
|
||||
CTerminal
|
||||
ctl
|
||||
ctlseqs
|
||||
CTRLEVENT
|
||||
CTRLFREQUENCY
|
||||
@@ -286,7 +298,6 @@ CTRLVOLUME
|
||||
CUAS
|
||||
CUF
|
||||
cupxy
|
||||
curated
|
||||
CURRENTFONT
|
||||
currentmode
|
||||
CURRENTPAGE
|
||||
@@ -319,6 +330,7 @@ CYVIRTUALSCREEN
|
||||
CYVSCROLL
|
||||
dai
|
||||
DATABLOCK
|
||||
DBatch
|
||||
dbcs
|
||||
DBCSFONT
|
||||
DBGALL
|
||||
@@ -327,12 +339,15 @@ DBGFONTS
|
||||
DBGOUTPUT
|
||||
dbh
|
||||
dblclk
|
||||
DBUILD
|
||||
Dcd
|
||||
DColor
|
||||
DCOMMON
|
||||
DComposition
|
||||
DDESHARE
|
||||
DDevice
|
||||
DEADCHAR
|
||||
Debian
|
||||
debugtype
|
||||
DECAC
|
||||
DECALN
|
||||
@@ -438,8 +453,10 @@ depersist
|
||||
deprioritized
|
||||
devicecode
|
||||
Dext
|
||||
DFactory
|
||||
DFF
|
||||
dialogbox
|
||||
DINLINE
|
||||
directio
|
||||
DIRECTX
|
||||
DISABLEDELAYEDEXPANSION
|
||||
@@ -454,9 +471,9 @@ dllinit
|
||||
dllmain
|
||||
DLLVERSIONINFO
|
||||
DLOOK
|
||||
doc'd
|
||||
DONTCARE
|
||||
doskey
|
||||
dotnet
|
||||
DPG
|
||||
DPIAPI
|
||||
DPICHANGE
|
||||
@@ -470,6 +487,7 @@ DRAWITEM
|
||||
DRAWITEMSTRUCT
|
||||
drcs
|
||||
DROPFILES
|
||||
drv
|
||||
DSBCAPS
|
||||
DSBLOCK
|
||||
DSBPLAY
|
||||
@@ -479,8 +497,11 @@ dsm
|
||||
dsound
|
||||
DSRCPR
|
||||
DSSCL
|
||||
DSwap
|
||||
DTo
|
||||
DTTERM
|
||||
DUNICODE
|
||||
DUNIT
|
||||
dup'ed
|
||||
dvi
|
||||
dwl
|
||||
@@ -509,9 +530,9 @@ ELEMENTNOTAVAILABLE
|
||||
EMPTYBOX
|
||||
enabledelayedexpansion
|
||||
ENDCAP
|
||||
endptr
|
||||
ENTIREBUFFER
|
||||
ENU
|
||||
Enum'd
|
||||
ENUMLOGFONT
|
||||
ENUMLOGFONTEX
|
||||
EOB
|
||||
@@ -520,13 +541,13 @@ EPres
|
||||
EQU
|
||||
ERASEBKGND
|
||||
ERRORONEXIT
|
||||
espt
|
||||
esrp
|
||||
ESV
|
||||
ETW
|
||||
EUDC
|
||||
eventing
|
||||
evflags
|
||||
evt
|
||||
execd
|
||||
executionengine
|
||||
exemain
|
||||
@@ -551,7 +572,6 @@ FGHIJ
|
||||
fgidx
|
||||
FGs
|
||||
FILEDESCRIPTION
|
||||
filehops
|
||||
FILESUBTYPE
|
||||
FILESYSPATH
|
||||
FILEW
|
||||
@@ -587,14 +607,14 @@ FORCEOFFFEEDBACK
|
||||
FORCEONFEEDBACK
|
||||
FRAMECHANGED
|
||||
fre
|
||||
Free'd
|
||||
frontends
|
||||
fsanitize
|
||||
Fscreen
|
||||
FSINFOCLASS
|
||||
ftcs
|
||||
fte
|
||||
Ftm
|
||||
Fullscreens
|
||||
Fullwidth
|
||||
FUNCTIONCALL
|
||||
fuzzmain
|
||||
fuzzmap
|
||||
@@ -655,13 +675,16 @@ GETWAITTOKILLTIMEOUT
|
||||
GETWHEELSCROLLCHARACTERS
|
||||
GETWHEELSCROLLCHARS
|
||||
GETWHEELSCROLLLINES
|
||||
Gfun
|
||||
gfx
|
||||
gfycat
|
||||
GGI
|
||||
GHgh
|
||||
GHIJK
|
||||
GHIJKL
|
||||
gitcheckin
|
||||
gitfilters
|
||||
gitlab
|
||||
gle
|
||||
GLOBALFOCUS
|
||||
GLYPHENTRY
|
||||
@@ -669,13 +692,13 @@ GMEM
|
||||
Goldmine
|
||||
gonce
|
||||
goutput
|
||||
GPUs
|
||||
GREENSCROLL
|
||||
Grehan
|
||||
Greyscale
|
||||
gridline
|
||||
gset
|
||||
gsl
|
||||
Guake
|
||||
guc
|
||||
GUIDATOM
|
||||
GValue
|
||||
@@ -697,6 +720,7 @@ hbr
|
||||
hbrush
|
||||
HCmd
|
||||
hdc
|
||||
hdr
|
||||
HDROP
|
||||
hdrstop
|
||||
HEIGHTSCROLL
|
||||
@@ -761,6 +785,7 @@ ICONWARNING
|
||||
IDCANCEL
|
||||
IDD
|
||||
IDISHWND
|
||||
idl
|
||||
idllib
|
||||
IDOK
|
||||
IDR
|
||||
@@ -774,8 +799,9 @@ IIo
|
||||
ILC
|
||||
ILCo
|
||||
ILD
|
||||
IMEs
|
||||
ime
|
||||
IMPEXP
|
||||
inbox
|
||||
inclusivity
|
||||
INCONTEXT
|
||||
INDEXID
|
||||
@@ -788,7 +814,6 @@ INITGUID
|
||||
INITMENU
|
||||
inkscape
|
||||
INLINEPREFIX
|
||||
inlines
|
||||
inproc
|
||||
Inputkeyinfo
|
||||
Inputreadhandledata
|
||||
@@ -801,6 +826,7 @@ INTERNALNAME
|
||||
intsafe
|
||||
INVALIDARG
|
||||
INVALIDATERECT
|
||||
Ioctl
|
||||
ipch
|
||||
ipsp
|
||||
iterm
|
||||
@@ -843,12 +869,14 @@ KLF
|
||||
KLMNO
|
||||
KOK
|
||||
KPRIORITY
|
||||
KVM
|
||||
kyouhaishaheiku
|
||||
langid
|
||||
LANGUAGELIST
|
||||
lasterror
|
||||
LASTEXITCODE
|
||||
LAYOUTRTL
|
||||
lbl
|
||||
LBN
|
||||
LBUTTON
|
||||
LBUTTONDBLCLK
|
||||
@@ -869,8 +897,10 @@ LINESELECTION
|
||||
LINEWRAP
|
||||
LINKERRCAP
|
||||
LINKERROR
|
||||
linputfile
|
||||
listptr
|
||||
listptrsize
|
||||
lld
|
||||
llx
|
||||
LMENU
|
||||
lnkd
|
||||
@@ -927,11 +957,12 @@ LPWINDOWPOS
|
||||
lpwpos
|
||||
lpwstr
|
||||
LRESULT
|
||||
LSBs
|
||||
lsb
|
||||
lsconfig
|
||||
lstatus
|
||||
lstrcmp
|
||||
LTEXT
|
||||
lto
|
||||
ltsc
|
||||
LUID
|
||||
luma
|
||||
@@ -953,7 +984,6 @@ MAKELRESULT
|
||||
MAPBITMAP
|
||||
MAPVIRTUALKEY
|
||||
MAPVK
|
||||
matrix'd
|
||||
MAXDIMENSTRING
|
||||
MAXSHORT
|
||||
maxval
|
||||
@@ -966,6 +996,7 @@ MBUTTONDOWN
|
||||
MBUTTONUP
|
||||
mdmerge
|
||||
MDs
|
||||
mdtauk
|
||||
MEASUREITEM
|
||||
megamix
|
||||
memallocator
|
||||
@@ -1019,9 +1050,9 @@ MSGMARKMODE
|
||||
MSGSCROLLMODE
|
||||
MSGSELECTMODE
|
||||
msiexec
|
||||
MSIL
|
||||
msix
|
||||
MSRC
|
||||
msvcrt
|
||||
MSVCRTD
|
||||
MTSM
|
||||
murmurhash
|
||||
@@ -1032,7 +1063,6 @@ mydir
|
||||
Mypair
|
||||
Myval
|
||||
NAMELENGTH
|
||||
nameof
|
||||
namestream
|
||||
NCACTIVATE
|
||||
NCCALCSIZE
|
||||
@@ -1072,7 +1102,6 @@ NOCLIP
|
||||
NOCOMM
|
||||
NOCONTEXTHELP
|
||||
NOCOPYBITS
|
||||
nodiscard
|
||||
NODUP
|
||||
noexcepts
|
||||
NOFONT
|
||||
@@ -1087,6 +1116,7 @@ NOMOVE
|
||||
NONALERT
|
||||
nonbreaking
|
||||
nonclient
|
||||
NONINFRINGEMENT
|
||||
NONPREROTATED
|
||||
nonspace
|
||||
NOOWNERZORDER
|
||||
@@ -1129,7 +1159,6 @@ ntuser
|
||||
NTVDM
|
||||
nugetversions
|
||||
NUKTA
|
||||
nullability
|
||||
nullness
|
||||
nullonfailure
|
||||
nullopts
|
||||
@@ -1169,6 +1198,8 @@ osc
|
||||
OSDEPENDSROOT
|
||||
OSG
|
||||
OSGENG
|
||||
oss
|
||||
outdir
|
||||
OUTOFCONTEXT
|
||||
Outptr
|
||||
outstr
|
||||
@@ -1208,7 +1239,6 @@ PCONSOLEENDTASK
|
||||
PCONSOLESETFOREGROUND
|
||||
PCONSOLEWINDOWOWNER
|
||||
pcoord
|
||||
pcs
|
||||
pcshell
|
||||
PCSHORT
|
||||
PCSR
|
||||
@@ -1302,7 +1332,8 @@ PREVIEWLABEL
|
||||
PREVIEWWINDOW
|
||||
PREVLINE
|
||||
prg
|
||||
PRIs
|
||||
pri
|
||||
prioritization
|
||||
processhost
|
||||
PROCESSINFOCLASS
|
||||
PRODEXT
|
||||
@@ -1340,14 +1371,18 @@ PUCHAR
|
||||
pvar
|
||||
pwch
|
||||
PWDDMCONSOLECONTEXT
|
||||
Pwease
|
||||
pweview
|
||||
pws
|
||||
pwstr
|
||||
pwsz
|
||||
pythonw
|
||||
Qaabbcc
|
||||
QUERYOPEN
|
||||
quickedit
|
||||
QUZ
|
||||
QWER
|
||||
Qxxxxxxxxxxxxxxx
|
||||
qzmp
|
||||
RAII
|
||||
RALT
|
||||
@@ -1370,17 +1405,18 @@ RCOCA
|
||||
RCOCW
|
||||
RCONTROL
|
||||
RCOW
|
||||
rcv
|
||||
readback
|
||||
READCONSOLE
|
||||
READCONSOLEOUTPUT
|
||||
READCONSOLEOUTPUTSTRING
|
||||
READMODE
|
||||
rectread
|
||||
redef
|
||||
redefinable
|
||||
redist
|
||||
REDSCROLL
|
||||
REFCLSID
|
||||
Reference'd
|
||||
REFGUID
|
||||
REFIID
|
||||
REFPROPERTYKEY
|
||||
@@ -1465,7 +1501,7 @@ SCRBUFSIZE
|
||||
screenbuffer
|
||||
SCREENBUFFERINFO
|
||||
screeninfo
|
||||
screenshot
|
||||
screenshots
|
||||
scriptload
|
||||
scrollback
|
||||
SCROLLFORWARD
|
||||
@@ -1476,6 +1512,7 @@ SCROLLSCALE
|
||||
SCROLLSCREENBUFFER
|
||||
sddl
|
||||
SDKDDK
|
||||
segfault
|
||||
SELCHANGE
|
||||
SELECTEDFONT
|
||||
SELECTSTRING
|
||||
@@ -1562,7 +1599,7 @@ snapcy
|
||||
snk
|
||||
SOLIDBOX
|
||||
Solutiondir
|
||||
spec'd
|
||||
sourced
|
||||
SRCAND
|
||||
SRCCODEPAGE
|
||||
SRCCOPY
|
||||
@@ -1593,7 +1630,6 @@ STDEXT
|
||||
STDMETHODCALLTYPE
|
||||
STDMETHODIMP
|
||||
STGM
|
||||
stl
|
||||
STRINGTABLE
|
||||
STRSAFE
|
||||
STUBHEAD
|
||||
@@ -1606,8 +1642,9 @@ SUBLANG
|
||||
swapchain
|
||||
swapchainpanel
|
||||
SWMR
|
||||
SWP
|
||||
swrapped
|
||||
SYMED
|
||||
sync'd
|
||||
SYNCPAINT
|
||||
syscalls
|
||||
SYSCHAR
|
||||
@@ -1632,12 +1669,14 @@ TARGETNAME
|
||||
targetver
|
||||
tbc
|
||||
tbi
|
||||
Tbl
|
||||
TBM
|
||||
TCHAR
|
||||
TCHFORMAT
|
||||
TCI
|
||||
tcommands
|
||||
tdbuild
|
||||
Tdd
|
||||
TDP
|
||||
Teb
|
||||
Techo
|
||||
@@ -1654,6 +1693,7 @@ testenvs
|
||||
testlab
|
||||
testlist
|
||||
testmd
|
||||
testname
|
||||
TESTNULL
|
||||
testpass
|
||||
testpasses
|
||||
@@ -1669,7 +1709,6 @@ TEXTMETRICW
|
||||
textmode
|
||||
texttests
|
||||
TFCAT
|
||||
threadpool
|
||||
THUMBPOSITION
|
||||
THUMBTRACK
|
||||
tilunittests
|
||||
@@ -1678,6 +1717,7 @@ titlebars
|
||||
TITLEISLINKNAME
|
||||
TLDP
|
||||
TLEN
|
||||
Tlgg
|
||||
TMAE
|
||||
TMPF
|
||||
tmultiple
|
||||
@@ -1691,6 +1731,7 @@ tracelogging
|
||||
traceviewpp
|
||||
trackbar
|
||||
trackpad
|
||||
transitioning
|
||||
Trd
|
||||
triaged
|
||||
triaging
|
||||
@@ -1707,7 +1748,6 @@ TTM
|
||||
TTo
|
||||
tvpp
|
||||
tvtseq
|
||||
typeparam
|
||||
TYUI
|
||||
uap
|
||||
uapadmin
|
||||
@@ -1732,7 +1772,6 @@ uldash
|
||||
uldb
|
||||
ULONGLONG
|
||||
ulwave
|
||||
Unaccess
|
||||
Unadvise
|
||||
unattend
|
||||
UNCPRIORITY
|
||||
@@ -1742,10 +1781,12 @@ unhosted
|
||||
UNICODETEXT
|
||||
UNICRT
|
||||
Unintense
|
||||
Unittesting
|
||||
unittesting
|
||||
unittests
|
||||
unk
|
||||
unknwn
|
||||
UNORM
|
||||
unparseable
|
||||
untextured
|
||||
UPDATEDISPLAY
|
||||
UPDOWN
|
||||
@@ -1790,9 +1831,12 @@ vga
|
||||
vgaoem
|
||||
viewkind
|
||||
VIRAMA
|
||||
Virt
|
||||
VIRTTERM
|
||||
visualstudiosdk
|
||||
vkey
|
||||
VKKEYSCAN
|
||||
VMs
|
||||
VPA
|
||||
vpack
|
||||
vpackdirectory
|
||||
@@ -1842,15 +1886,21 @@ wddm
|
||||
wddmcon
|
||||
WDDMCONSOLECONTEXT
|
||||
wdm
|
||||
webpage
|
||||
websites
|
||||
wekyb
|
||||
wewoad
|
||||
wex
|
||||
wextest
|
||||
WFill
|
||||
wfopen
|
||||
WHelper
|
||||
wic
|
||||
WIDTHSCROLL
|
||||
Widthx
|
||||
Wiggum
|
||||
wil
|
||||
WImpl
|
||||
WINAPI
|
||||
winbasep
|
||||
wincon
|
||||
@@ -1890,9 +1940,11 @@ winmm
|
||||
WINMSAPP
|
||||
winnt
|
||||
Winperf
|
||||
WInplace
|
||||
winres
|
||||
winrt
|
||||
winternl
|
||||
winui
|
||||
winuser
|
||||
WINVER
|
||||
wistd
|
||||
@@ -1905,16 +1957,24 @@ WNDCLASSEX
|
||||
WNDCLASSEXW
|
||||
WNDCLASSW
|
||||
Wndproc
|
||||
WNegative
|
||||
WNull
|
||||
wordi
|
||||
wordiswrapped
|
||||
workarea
|
||||
WOutside
|
||||
WOWARM
|
||||
WOWx
|
||||
wparam
|
||||
WPartial
|
||||
wpf
|
||||
wpfdotnet
|
||||
WPR
|
||||
WPrep
|
||||
WPresent
|
||||
wprp
|
||||
wprpi
|
||||
wrappe
|
||||
wregex
|
||||
writeback
|
||||
WRITECONSOLE
|
||||
@@ -1923,12 +1983,15 @@ WRITECONSOLEOUTPUT
|
||||
WRITECONSOLEOUTPUTSTRING
|
||||
wrkstr
|
||||
wrl
|
||||
WRL
|
||||
wrp
|
||||
WRunoff
|
||||
WSLENV
|
||||
wstr
|
||||
wstrings
|
||||
wsz
|
||||
wtd
|
||||
WTest
|
||||
WTEXT
|
||||
WTo
|
||||
wtof
|
||||
@@ -1937,6 +2000,8 @@ WTSOFTFONT
|
||||
wtw
|
||||
Wtypes
|
||||
WUX
|
||||
WVerify
|
||||
WWith
|
||||
wxh
|
||||
wyhash
|
||||
wymix
|
||||
@@ -1950,22 +2015,34 @@ xbutton
|
||||
XBUTTONDBLCLK
|
||||
XBUTTONDOWN
|
||||
XBUTTONUP
|
||||
XCast
|
||||
XCENTER
|
||||
xcopy
|
||||
XCount
|
||||
xdy
|
||||
XEncoding
|
||||
xes
|
||||
XFG
|
||||
XFile
|
||||
XFORM
|
||||
XIn
|
||||
xkcd
|
||||
XManifest
|
||||
XMath
|
||||
XNamespace
|
||||
xorg
|
||||
XPan
|
||||
XResource
|
||||
xsi
|
||||
xstyler
|
||||
XSubstantial
|
||||
XTest
|
||||
XTPOPSGR
|
||||
XTPUSHSGR
|
||||
xtr
|
||||
XTWINOPS
|
||||
xunit
|
||||
xutr
|
||||
xvalue
|
||||
XVIRTUALSCREEN
|
||||
yact
|
||||
YCast
|
||||
@@ -1981,6 +2058,6 @@ Zabcdefghijklmn
|
||||
Zabcdefghijklmnopqrstuvwxyz
|
||||
ZCmd
|
||||
ZCtrl
|
||||
zero'd
|
||||
ZWJs
|
||||
ZYXWVU
|
||||
ZYXWVUTd
|
||||
|
||||
572
.github/actions/spelling/line_forbidden.patterns
vendored
572
.github/actions/spelling/line_forbidden.patterns
vendored
File diff suppressed because one or more lines are too long
56
.github/actions/spelling/patterns/patterns.txt
vendored
56
.github/actions/spelling/patterns/patterns.txt
vendored
@@ -1,51 +1,5 @@
|
||||
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
|
||||
|
||||
# src/host/ut_host/AliasTests.cpp
|
||||
\$\d\$[A-ZA-z]
|
||||
|
||||
# src/cascadia/TerminalSettingsEditor/Appearances.cpp
|
||||
// Pwease call.*
|
||||
|
||||
# src/host/ft_host/CJK_DbcsTests.cpp
|
||||
// \|Q.*|^\s+// \|\s*aa\w+
|
||||
|
||||
# App Package trailer
|
||||
__[a-z\d]{13}\b
|
||||
|
||||
# src/host/ut_host/TextBufferTests.cpp
|
||||
// \d\|.{10}\|
|
||||
|
||||
# contributors
|
||||
\[@[-_\w]+\]
|
||||
|
||||
# src/types/CodepointWidthDetector.cpp
|
||||
fallback to
|
||||
|
||||
Include=".*?"
|
||||
|
||||
^author = \w+
|
||||
|
||||
D2D
|
||||
|
||||
# Compiler flags
|
||||
\s-D(?=[A-Z])
|
||||
|
||||
# Automatically suggested patterns
|
||||
|
||||
# hit-count: 26 file-count: 12
|
||||
# unicode escaped characters (4)
|
||||
\\u[0-9a-fA-F]{4}
|
||||
|
||||
# hit-count: 6 file-count: 5
|
||||
# ANSI color codes
|
||||
(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[(?:\d+(?:;\d+)*|)m(?=[a-z])
|
||||
|
||||
# profiles.schema.json
|
||||
"pattern": ".*?"
|
||||
|
||||
# Intentionally reversed binomials
|
||||
\b(?:bottom to top|down and up)\b
|
||||
|
||||
# Windows accelerators
|
||||
\b[A-Z][a-z]*&[a-z]+(?!;)\b
|
||||
|
||||
@@ -89,7 +43,7 @@ L"[0-9A-F]{4}"
|
||||
|
||||
# hit-count: 3904 file-count: 577
|
||||
# IServiceProvider / isAThing
|
||||
(?:(?:\b|_|(?<=[a-z]))[ITWX]|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
|
||||
(?:(?:\b|_|(?<=[a-z]))[IT]|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
|
||||
|
||||
# hit-count: 2437 file-count: 826
|
||||
# #includes
|
||||
@@ -176,7 +130,7 @@ mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,}
|
||||
|
||||
# hit-count: 1 file-count: 1
|
||||
# microsoft
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%?#]*
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
|
||||
|
||||
# hit-count: 1 file-count: 1
|
||||
# Punycode
|
||||
@@ -217,7 +171,7 @@ Scro\&ll
|
||||
:\\windows\\syste\b
|
||||
TestUtils::VerifyExpectedString\(tb, L"[^"]+"
|
||||
(?:hostSm|mach)\.ProcessString\(L"[^"]+"
|
||||
|
||||
\b([A-Za-z])\g{-1}{3,}\b
|
||||
Base64::s_(?:En|De)code\(L"[^"]+"
|
||||
VERIFY_ARE_EQUAL\(L"[^"]+"
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/"
|
||||
@@ -266,15 +220,13 @@ equals_insensitive_ascii\("\w+", "\w+"
|
||||
# mount
|
||||
\bmount\s+-t\s+(\w+)\s+\g{-1}\b
|
||||
# C/idl types, repeated CSS values, + English ...
|
||||
\s(auto|await|buffalo|center|div|Guid|GUID|inherit|long|LONG|none|normal|solid|that|thin|transparent|very)(?:\s\g{-1})+\s
|
||||
\s(auto|buffalo|center|div|Guid|GUID|inherit|long|LONG|none|normal|solid|that|thin|transparent|very)(?: \g{-1})+\s
|
||||
# C enum and struct
|
||||
\b(?:enum|struct)\s+(\w+)\s+\g{-1}\b
|
||||
# go templates
|
||||
\s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml):
|
||||
# doxygen / javadoc / .net
|
||||
(?:[\\@](?:brief|defgroup|groupname|link|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+(?:static|override|readonly|required|virtual))*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s
|
||||
# C# getter/setter
|
||||
\s(\w+)\s+\g{-1}\s*\{\s*[gs]et;
|
||||
|
||||
# macOS file path
|
||||
(?:Contents\W+|(?!iOS)/)MacOS\b
|
||||
|
||||
49
.github/actions/spelling/reject.txt
vendored
49
.github/actions/spelling/reject.txt
vendored
@@ -1,30 +1,25 @@
|
||||
attache
|
||||
aroynt.*
|
||||
bellows?
|
||||
^attache$
|
||||
^attacher$
|
||||
^attachers$
|
||||
^bellow?$
|
||||
benefitting
|
||||
occurences?
|
||||
.+dnt
|
||||
dependan.*
|
||||
developement
|
||||
developp?e
|
||||
Devers?
|
||||
devex.*
|
||||
devide
|
||||
Devinn?[ae]
|
||||
devisals?
|
||||
devisors?
|
||||
diables?
|
||||
hasta?
|
||||
hastat.*
|
||||
immediatly
|
||||
inisle
|
||||
inital
|
||||
linge
|
||||
oer
|
||||
^dependan.*
|
||||
^develope$
|
||||
^developement$
|
||||
^developpe
|
||||
^Devers?$
|
||||
^devex
|
||||
^devide
|
||||
^Devinn?[ae]
|
||||
^devisal
|
||||
^devisor
|
||||
^diables?$
|
||||
^oer$
|
||||
Sorce
|
||||
[Ss]pae.*
|
||||
Teh
|
||||
untill
|
||||
untilling
|
||||
venders?
|
||||
wether.*
|
||||
^[Ss]pae.*
|
||||
^Teh$
|
||||
^untill$
|
||||
^untilling$
|
||||
^venders?$
|
||||
^wether.*
|
||||
|
||||
72
.github/workflows/spelling2.yml
vendored
72
.github/workflows/spelling2.yml
vendored
@@ -55,7 +55,7 @@ name: Spell checking
|
||||
# spelling:
|
||||
# # remove `security-events: write` and `use_sarif: 1`
|
||||
# # remove `experimental_apply_changes_via_bot: 1`
|
||||
# ... otherwise, adjust the `with:` as you wish
|
||||
# ... otherwise adjust the `with:` as you wish
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -74,8 +74,6 @@ on:
|
||||
types:
|
||||
- "created"
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
spelling:
|
||||
name: Check Spelling
|
||||
@@ -87,7 +85,7 @@ jobs:
|
||||
outputs:
|
||||
followup: ${{ steps.spelling.outputs.followup }}
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ (contains(github.event_name, 'pull_request') && github.event.pull_request.state == 'open') || github.event_name == 'push' }}
|
||||
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
|
||||
concurrency:
|
||||
group: spelling-${{ github.event.pull_request.number || github.ref }}
|
||||
# note: If you use only_check_changed_files, you do not want cancel-in-progress
|
||||
@@ -95,7 +93,7 @@ jobs:
|
||||
steps:
|
||||
- name: check-spelling
|
||||
id: spelling
|
||||
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
|
||||
uses: check-spelling/check-spelling@v0.0.25
|
||||
with:
|
||||
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
|
||||
checkout: true
|
||||
@@ -107,25 +105,47 @@ jobs:
|
||||
warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
|
||||
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
|
||||
use_sarif: 1
|
||||
allow-hunspell: false
|
||||
load-config-from: |
|
||||
check_extra_dictionaries: ""
|
||||
dictionary_source_prefixes: >
|
||||
{
|
||||
"pr-base-keys": [
|
||||
""
|
||||
],
|
||||
"pr-trusted-keys": [
|
||||
"check_extra_dictionaries",
|
||||
"dictionary_source_prefixes",
|
||||
"extra_dictionaries",
|
||||
""
|
||||
],
|
||||
"": []
|
||||
"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"
|
||||
}
|
||||
extra_dictionaries: |
|
||||
cspell:software-terms/softwareTerms.txt
|
||||
cspell:cpp/stdlib-cpp.txt
|
||||
cspell:cpp/stdlib-c.txt
|
||||
cspell:python/python/python-lib.txt
|
||||
cspell:php/php.txt
|
||||
cspell:node/node.txt
|
||||
cspell:dart/dart.txt
|
||||
cspell:filetypes/filetypes.txt
|
||||
cspell:java/java.txt
|
||||
cspell:css/css.txt
|
||||
cspell:dotnet/dotnet.txt
|
||||
cspell:npm/npm.txt
|
||||
cspell:fullstack/fullstack.txt
|
||||
cspell:java/java-terms.txt
|
||||
cspell:r/r.txt
|
||||
cspell:golang/go.txt
|
||||
cspell:cpp/stdlib-cmath.txt
|
||||
cspell:typescript/typescript.txt
|
||||
cspell:html/html.txt
|
||||
cspell:cpp/compiler-msvc.txt
|
||||
cspell:django/django.txt
|
||||
cspell:aws/aws.txt
|
||||
cspell:python/common/extra.txt
|
||||
cspell:cpp/ecosystem.txt
|
||||
cspell:cpp/lang-keywords.txt
|
||||
cspell:csharp/csharp.txt
|
||||
cspell:cpp/compiler-clang-attributes.txt
|
||||
cspell:python/python/python.txt
|
||||
cspell:mnemonics/mnemonics.txt
|
||||
cspell:powershell/powershell.txt
|
||||
|
||||
comment-push:
|
||||
name: Report (Push)
|
||||
# If your workflow isn't running on push, you can remove this job
|
||||
runs-on: ubuntu-slim
|
||||
runs-on: ubuntu-latest
|
||||
needs: spelling
|
||||
permissions:
|
||||
actions: read
|
||||
@@ -133,24 +153,27 @@ jobs:
|
||||
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
|
||||
steps:
|
||||
- name: comment
|
||||
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
|
||||
uses: check-spelling/check-spelling@v0.0.25
|
||||
with:
|
||||
checkout: true
|
||||
spell_check_this: microsoft/terminal@main
|
||||
task: ${{ needs.spelling.outputs.followup }}
|
||||
|
||||
comment-pr:
|
||||
name: Report (PR)
|
||||
# If you workflow isn't running on pull_request*, you can remove this job
|
||||
runs-on: ubuntu-slim
|
||||
runs-on: ubuntu-latest
|
||||
needs: spelling
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
pull-requests: write
|
||||
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
|
||||
steps:
|
||||
- name: comment
|
||||
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
|
||||
uses: check-spelling/check-spelling@v0.0.25
|
||||
with:
|
||||
checkout: true
|
||||
spell_check_this: microsoft/terminal@main
|
||||
task: ${{ needs.spelling.outputs.followup }}
|
||||
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
|
||||
@@ -161,13 +184,12 @@ jobs:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
actions: read
|
||||
runs-on: ubuntu-slim
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{
|
||||
github.repository_owner != 'microsoft' &&
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request &&
|
||||
contains(github.event.comment.body, '@check-spelling-bot') &&
|
||||
contains(github.event.comment.body, 'apply') &&
|
||||
contains(github.event.comment.body, '@check-spelling-bot apply') &&
|
||||
contains(github.event.comment.body, 'https://')
|
||||
}}
|
||||
concurrency:
|
||||
@@ -175,7 +197,7 @@ jobs:
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: apply spelling updates
|
||||
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
|
||||
uses: check-spelling/check-spelling@v0.0.25
|
||||
with:
|
||||
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
|
||||
checkout: true
|
||||
|
||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -127,5 +127,4 @@
|
||||
"**/obj/**": true,
|
||||
"**/packages/**": true,
|
||||
},
|
||||
"sarif-viewer.connectToGithubCodeScanning": "on",
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
- [Via Chocolatey (unofficial)](#via-chocolatey-unofficial)
|
||||
- [Via Scoop (unofficial)](#via-scoop-unofficial)
|
||||
- [Installing Windows Terminal Canary](#installing-windows-terminal-canary)
|
||||
- [Windows Terminal Roadmap](#windows-terminal-roadmap)
|
||||
- [Terminal \& Console Overview](#terminal--console-overview)
|
||||
- [Windows Terminal](#windows-terminal)
|
||||
- [The Windows Console Host](#the-windows-console-host)
|
||||
@@ -177,6 +178,11 @@ _Learn more about the [types of Windows Terminal distributions](https://learn.mi
|
||||
|
||||
---
|
||||
|
||||
## Windows Terminal Roadmap
|
||||
|
||||
The plan for the Windows Terminal [is described here](/doc/roadmap-2023.md) and
|
||||
will be updated as the project proceeds.
|
||||
|
||||
## Terminal & Console Overview
|
||||
|
||||
Please take a few minutes to review the overview below before diving into the
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"codebaseName": "VSTS_Microsoft_OSGS_OpenConsole",
|
||||
"instanceUrl": "https://microsoft.visualstudio.com",
|
||||
"projectName": "OS",
|
||||
"areaPath": "OS\\Windows Client and Services\\WinPD\\DFX-Developer Fundamentals and Experiences\\DEFT\\SHINE\\Terminal",
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
trigger: none
|
||||
pr: none
|
||||
schedules:
|
||||
- cron: "30 3 * * 2-6" # Run at 03:30 UTC Tuesday through Saturday (After the work day in Pacific, Mon-Fri)
|
||||
displayName: "Nightly Terminal Build"
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: false # only run if there's code changes!
|
||||
|
||||
parameters:
|
||||
- name: publishToAzure
|
||||
displayName: "Deploy to **PUBLIC** Azure Storage"
|
||||
type: boolean
|
||||
default: true
|
||||
- name: official
|
||||
displayName: "Run on Official 1ES Pipeline Templates"
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
|
||||
variables:
|
||||
- template: templates-v2/variables-nuget-package-version.yml
|
||||
parameters:
|
||||
branding: Canary
|
||||
|
||||
extends:
|
||||
template: templates-v2/pipeline-1espt-full-release-build.yml
|
||||
parameters:
|
||||
official: ${{ parameters.official }}
|
||||
branding: Canary
|
||||
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
|
||||
symbolExpiryTime: 15
|
||||
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
|
||||
symbolPublishingProject: $(SymbolPublishingProject)
|
||||
${{ if eq(true, parameters.publishToAzure) }}:
|
||||
extraPublishJobs:
|
||||
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self
|
||||
parameters:
|
||||
pool:
|
||||
name: SHINE-INT-S
|
||||
os: windows
|
||||
dependsOn: [PublishSymbols]
|
||||
storagePublicRootURL: $(AppInstallerRootURL)
|
||||
subscription: $(AzureSubscriptionName)
|
||||
storageAccount: $(AzureStorageAccount)
|
||||
storageContainer: $(AzureStorageContainer)
|
||||
buildConfiguration: Release
|
||||
buildPlatforms: [x64, x86, arm64]
|
||||
environment: production-canary
|
||||
|
||||
@@ -30,13 +30,9 @@ parameters:
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
- name: outerTemplateContext
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
templateContext: ${{ parameters.outerTemplateContext }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
${{ if eq(parameters.codeSign, true) }}:
|
||||
|
||||
@@ -74,13 +74,9 @@ parameters:
|
||||
- name: afterBuildSteps
|
||||
type: stepList
|
||||
default: []
|
||||
- name: outerTemplateContext
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
templateContext: ${{ parameters.outerTemplateContext }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
strategy:
|
||||
|
||||
@@ -35,13 +35,9 @@ parameters:
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
- name: outerTemplateContext
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
templateContext: ${{ parameters.outerTemplateContext }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
${{ if eq(parameters.codeSign, true) }}:
|
||||
|
||||
@@ -30,13 +30,9 @@ parameters:
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
- name: outerTemplateContext
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
templateContext: ${{ parameters.outerTemplateContext }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
${{ if eq(parameters.codeSign, true) }}:
|
||||
|
||||
@@ -1,233 +0,0 @@
|
||||
parameters:
|
||||
- name: official
|
||||
type: boolean
|
||||
default: false
|
||||
- name: branding
|
||||
type: string
|
||||
default: Release
|
||||
values:
|
||||
- Release
|
||||
- Preview
|
||||
- Canary
|
||||
- Dev
|
||||
- name: buildTerminal
|
||||
type: boolean
|
||||
default: true
|
||||
- name: buildConPTY
|
||||
type: boolean
|
||||
default: false
|
||||
- name: buildWPF
|
||||
type: boolean
|
||||
default: false
|
||||
- name: pgoBuildMode
|
||||
type: string
|
||||
default: Optimize
|
||||
values:
|
||||
- Optimize
|
||||
- Instrument
|
||||
- None
|
||||
- name: buildConfigurations
|
||||
type: object
|
||||
default:
|
||||
- Release
|
||||
- name: buildPlatforms
|
||||
type: object
|
||||
default:
|
||||
- x64
|
||||
- x86
|
||||
- arm64
|
||||
- name: codeSign
|
||||
type: boolean
|
||||
default: true
|
||||
- name: terminalInternalPackageVersion
|
||||
type: string
|
||||
default: '0.0.8'
|
||||
|
||||
- name: publishSymbolsToPublic
|
||||
type: boolean
|
||||
default: true
|
||||
- name: symbolExpiryTime
|
||||
type: string
|
||||
default: 36530 # This is the default from PublishSymbols@2
|
||||
- name: symbolPublishingSubscription
|
||||
type: string
|
||||
- name: symbolPublishingProject
|
||||
type: string
|
||||
|
||||
- name: extraPublishJobs
|
||||
type: object
|
||||
default: []
|
||||
- name: signingIdentity
|
||||
type: object
|
||||
default: {}
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1esPipelines
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
${{ if eq(parameters.official, true) }}:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
||||
${{ else }}:
|
||||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
|
||||
parameters:
|
||||
customBuildTags:
|
||||
- 1ES.PT.ViaStartRight
|
||||
pool:
|
||||
name: SHINE-INT-L
|
||||
os: windows
|
||||
sdl:
|
||||
tsa:
|
||||
enabled: true
|
||||
configFile: '$(Build.SourcesDirectory)\build\config\tsa.json'
|
||||
binskim:
|
||||
enabled: true
|
||||
policheck:
|
||||
enabled: false
|
||||
severity: Note
|
||||
baseline:
|
||||
baselineFile: '$(Build.SourcesDirectory)\build\config\release.gdnbaselines'
|
||||
suppressionSet: default
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
displayName: Build
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
|
||||
parameters:
|
||||
outerTemplateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(JobOutputDirectory)
|
||||
artifactName: $(JobOutputArtifactName)
|
||||
publishArtifacts: false # Handled by 1ESPT
|
||||
branding: ${{ parameters.branding }}
|
||||
buildTerminal: ${{ parameters.buildTerminal }}
|
||||
buildConPTY: ${{ parameters.buildConPTY }}
|
||||
buildWPF: ${{ parameters.buildWPF }}
|
||||
pgoBuildMode: ${{ parameters.pgoBuildMode }}
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # this is handled by 1ESPT
|
||||
removeAllNonSignedFiles: true # appease the overlords
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
beforeBuildSteps:
|
||||
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
|
||||
|
||||
- template: ./build/pipelines/templates-v2/steps-install-terrapin.yml@self
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download terminal-internal Universal Package
|
||||
inputs:
|
||||
feedListDownload: 2b3f8893-a6e8-411f-b197-a9e05576da48
|
||||
packageListDownload: e82d490c-af86-4733-9dc4-07b772033204
|
||||
versionListDownload: ${{ parameters.terminalInternalPackageVersion }}
|
||||
|
||||
- ${{ if eq(parameters.buildWPF, true) }}:
|
||||
# Add an Any CPU build flavor for the WPF control bits
|
||||
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
|
||||
parameters:
|
||||
outerTemplateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(JobOutputDirectory)
|
||||
artifactName: $(JobOutputArtifactName)
|
||||
publishArtifacts: false # Handled by 1ESPT
|
||||
jobName: BuildWPF
|
||||
branding: ${{ parameters.branding }}
|
||||
buildTerminal: false
|
||||
buildWPFDotNetComponents: true
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms:
|
||||
- Any CPU
|
||||
generateSbom: false # this is handled by 1ESPT
|
||||
removeAllNonSignedFiles: true # appease the overlords
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
beforeBuildSteps:
|
||||
- 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
|
||||
displayName: Package
|
||||
dependsOn: [Build]
|
||||
jobs:
|
||||
- ${{ if eq(parameters.buildTerminal, true) }}:
|
||||
- template: ./build/pipelines/templates-v2/job-merge-msix-into-bundle.yml@self
|
||||
parameters:
|
||||
pool:
|
||||
name: SHINE-INT-S
|
||||
os: windows
|
||||
outerTemplateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(JobOutputDirectory)
|
||||
artifactName: $(JobOutputArtifactName)
|
||||
publishArtifacts: false # Handled by 1ESPT
|
||||
jobName: Bundle
|
||||
branding: ${{ parameters.branding }}
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # Handled by 1ESPT
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
|
||||
- ${{ if eq(parameters.buildConPTY, true) }}:
|
||||
- template: ./build/pipelines/templates-v2/job-package-conpty.yml@self
|
||||
parameters:
|
||||
pool:
|
||||
name: SHINE-INT-S
|
||||
os: windows
|
||||
outerTemplateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(JobOutputDirectory)
|
||||
artifactName: $(JobOutputArtifactName)
|
||||
publishArtifacts: false # Handled by 1ESPT
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # this is handled by 1ESPT
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
|
||||
- ${{ if eq(parameters.buildWPF, true) }}:
|
||||
- template: ./build/pipelines/templates-v2/job-build-package-wpf.yml@self
|
||||
parameters:
|
||||
pool:
|
||||
name: SHINE-INT-S
|
||||
os: windows
|
||||
outerTemplateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(JobOutputDirectory)
|
||||
artifactName: $(JobOutputArtifactName)
|
||||
publishArtifacts: false # Handled by 1ESPT
|
||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
generateSbom: false # this is handled by 1ESPT
|
||||
codeSign: ${{ parameters.codeSign }}
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
|
||||
- stage: Publish
|
||||
displayName: Publish
|
||||
dependsOn:
|
||||
- Build
|
||||
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
|
||||
- Package
|
||||
jobs:
|
||||
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
|
||||
parameters:
|
||||
pool:
|
||||
name: SHINE-INT-S
|
||||
os: windows
|
||||
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
|
||||
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
|
||||
subscription: ${{ parameters.symbolPublishingSubscription }}
|
||||
symbolProject: ${{ parameters.symbolPublishingProject }}
|
||||
|
||||
- ${{ parameters.extraPublishJobs }}
|
||||
@@ -153,10 +153,7 @@ stages:
|
||||
- stage: Publish
|
||||
displayName: Publish
|
||||
pool: ${{ parameters.pool }}
|
||||
dependsOn:
|
||||
- Build
|
||||
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
|
||||
- Package
|
||||
dependsOn: [Build, Package]
|
||||
jobs:
|
||||
# We only support the vpack for Release builds that include Terminal
|
||||
- ${{ if and(containsValue(parameters.buildConfigurations, 'Release'), parameters.buildTerminal, parameters.publishVpackToWindows) }}:
|
||||
|
||||
@@ -211,7 +211,7 @@ extends:
|
||||
ob_createvpack_verbose: true
|
||||
ob_createvpack_vpackdirectory: '$(JobOutputDirectory)\vpack'
|
||||
ob_createvpack_versionAs: string
|
||||
ob_createvpack_version: '$(XES_PACKAGEVERSIONNUMBER)'
|
||||
ob_createvpack_version: '$(XES_APPXMANIFESTVERSION)'
|
||||
ob_updateOSManifest_gitcheckinConfigPath: '$(Build.SourcesDirectory)\build\config\GitCheckin.json'
|
||||
# We're skipping the 'fetch' part of the OneBranch rules, but that doesn't mean
|
||||
# that it doesn't expect to have downloaded a manifest directly to some 'destination'
|
||||
@@ -279,10 +279,7 @@ extends:
|
||||
|
||||
- stage: Publish
|
||||
displayName: Publish
|
||||
dependsOn:
|
||||
- Build
|
||||
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
|
||||
- Package
|
||||
dependsOn: [Build]
|
||||
jobs:
|
||||
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
steps:
|
||||
- pwsh: |-
|
||||
nuget install -source "https://pkgs.dev.azure.com/microsoft/_packaging/WindowsTerminal/nuget/v3/index.json" TerrapinRetrievalTool -Prerelease -OutputDirectory _trt
|
||||
$TerrapinRetrievalToolPath = (Get-Item _trt\TerrapinRetrievalTool.*\win-x64\TerrapinRetrievalTool.exe).FullName
|
||||
Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES]x-script,${TerrapinRetrievalToolPath} -b https://vcpkg.storage.devpackages.microsoft.io/artifacts/ -a true -u None -p {url} -s {sha512} -d {dst};x-block-origin"
|
||||
displayName: Set up the Terrapin Retrieval Tool (vcpkg cache)
|
||||
@@ -63,7 +63,7 @@ When console applications are launched, the Windows Console Host determines whic
|
||||
2. Overlay settings specified by the user's configured defaults
|
||||
3. Overlay application-specific settings from either the registry or the shortcut file, depending on how the application was launched
|
||||
|
||||
Note that the registry settings are "sparse" settings repositories, meaning that if a setting isn't present, then whatever value that is already in use remains unchanged. This allows users to have some settings shared amongst all console applications and other settings be specific. Shortcut files, however, store each setting regardless of whether or not it was a default setting.
|
||||
Note that the registry settings are "sparse" settings repositories, meaning that if a setting isn't present, then whatever value that is already in use remains unchanged. This allows users to have some settings shared amongst all console applications and other settings be specific. Shortcut files, however, store each setting regardless of whether it was a default setting or not.
|
||||
|
||||
## Known Issues
|
||||
|
||||
|
||||
@@ -1765,7 +1765,7 @@
|
||||
]
|
||||
},
|
||||
"ExportBufferAction": {
|
||||
"description": "Arguments corresponding to an exportBuffer Action",
|
||||
"description": "Arguments corresponding to a exportBuffer Action",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ShortcutAction"
|
||||
@@ -2242,7 +2242,7 @@
|
||||
"$ref": "#/$defs/Icon"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name that will appear in the command palette. If one isn't provided, the terminal will attempt to automatically generate a name.\nIf name is a string, it will be the name of the command.\nIf name is an object, the key property of the object will be used to lookup a localized string resource for the command",
|
||||
"description": "The name that will appear in the command palette. If one isn't provided, the terminal will attempt to automatically generate a name.\nIf name is a string, it will be the name of the command.\nIf name is a object, the key property of the object will be used to lookup a localized string resource for the command",
|
||||
"type": [
|
||||
"string",
|
||||
"object",
|
||||
@@ -3174,11 +3174,6 @@
|
||||
"mingw"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"dragDropDelimiter": {
|
||||
"default": " ",
|
||||
"description": "The delimiter used when dropping multiple files onto the terminal.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -55,7 +55,7 @@ Edge cases:
|
||||
|
||||
1. Multiple monitors. The user should be able to set the initial position to any monitors attached. For the monitors on the left side of the major monitor, the initial position values are negative.
|
||||
2. If the initial position is larger than the screen resolution and the window top left corner is off-screen, we should let user be able to see and drag the window back on screen. One solution is to set the initial position to the top left corner of the nearest monitor if the top left is off-screen.
|
||||
3. If the user wants to launch maximized and provides an initial position, we should launch the maximized window at the top left corner of the monitor where the position is located.
|
||||
3. If the user wants to launch maximized and provides an initial position, we should launch the maximized window on the top left corner of the monitor where the position is located.
|
||||
4. Launch the Terminal on a monitor with custom dpi. Changing the dpi of the monitor will not affect the initial position of the top left corner. So we do not need to handle this case.
|
||||
5. Launch the Terminal on a monitor with custom resolution. Changing the resolution will change the available point for the initial position. (2) already covers this case.
|
||||
|
||||
@@ -73,7 +73,7 @@ The rest of the UI will be the same of the current Terminal experience, except t
|
||||
Users can only set the initial position and launch mode in the Json file with keyboard. Thus, this will not affect accessibility.
|
||||
|
||||
### Reliability
|
||||
We need to make sure that whatever the initial position is set, the user can access the Terminal window. This is guaranteed because if the top left corner position of the Terminal Window is out of screen, we put it at the top left corner of the screen.
|
||||
We need to make sure that whatever the initial position is set, the user can access the Terminal window. This is guaranteed because if the top left corner position of the Terminal Window is out of screen, we put it on the top left corner of the screen.
|
||||
|
||||
### Performance, Power, and Efficiency
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ allows the terminal to expose quick actions for:
|
||||
|
||||
### User Stories
|
||||
|
||||
This is a bit of an unusual section, as this feature was already partially
|
||||
This is a bit of a unusual section, as this feature was already partially
|
||||
implemented when this spec was written.
|
||||
|
||||
Story | Size | Description
|
||||
|
||||
@@ -189,7 +189,7 @@ However, for actions that _do_ require args, we'll set up a global function that
|
||||
can be used to parse a json blob into an `IActionArgs`.
|
||||
|
||||
Once the `IActionArgs` is built for the keybinding, we'll set it in
|
||||
`AppKeyBindings` with an updated `AppKeyBindings::SetKeyBinding` call.
|
||||
`AppKeyBindings` with a updated `AppKeyBindings::SetKeyBinding` call.
|
||||
`SetKeyBinding`'s signature will be updated to take a `ActionAndArgs` instead.
|
||||
Should an action not need arguments, the `Args` member can be left `null` in the
|
||||
`ActionAndArgs`.
|
||||
|
||||
@@ -100,7 +100,7 @@ No expected change
|
||||
<tr>
|
||||
<td><strong>Compatibility</strong></td>
|
||||
<td>
|
||||
This entire spec outlines how this feature is designed with an emphasis on future
|
||||
This entire spec outlines how this feature is designed with a emphasis on future
|
||||
compatibility. As such, there are no expected regressions in the future when we
|
||||
do add support for themes.
|
||||
</td>
|
||||
|
||||
@@ -141,7 +141,7 @@ Pressing the `openTabSwitcher` keychord again will not close the switcher, it'll
|
||||
|
||||
We'll provide a setting that will allow the list of tabs to be presented in either _in-order_ (how the tabs are ordered on the tab bar), or _Most Recently Used Order_ (MRU). MRU means that the tab that the terminal most recently visited will be on the top of the list, and the tab that the terminal has not visited for the longest time will be on the bottom.
|
||||
|
||||
There will be an argument for the `openTabSwitcher` action called `displayOrder`. This can be either `inOrder` or `mruOrder`. Using an argument passed into `openTabSwitcher` would allow the user to have one keybinding to open an MRU Tab Switcher, and different one for the In-Order Tab Switcher. For example:
|
||||
There will be an argument for the `openTabSwitcher` action called `displayOrder`. This can be either `inOrder` or `mruOrder`. Making the setting an argument passed into `openTabSwitcher` would allow the user to have one keybinding to open an MRU Tab Switcher, and different one for the In-Order Tab Switcher. For example:
|
||||
```
|
||||
{"keys": ["ctrl+tab"], "command": {"action": "openTabSwitcher", "anchor":"ctrl", "displayOrder":"mruOrder"}}
|
||||
{"keys": ["ctrl+shift+p"], "command": {"action": "openTabSwitcher", "anchor":"ctrl", "displayOrder":"inOrder"}}
|
||||
|
||||
@@ -103,7 +103,7 @@ This option was not chosen because it added too much overhead for changing a set
|
||||
|
||||
### 2: Lock Button
|
||||
|
||||
Every setting will have a lock button next to it. If the lock is locked, that means the setting is being inherited from Global, and the control is disabled. If the user wants to edit the setting, they can click the lock, which will change it to the unlocked lock icon, and the control will become enabled.
|
||||
Every setting will have a lock button next to it. If the lock is locked, that means the setting is being inherited from Global, and the control is disabled. If the user wants to edit the setting, they can click the lock, which will changed it to the unlocked lock icon, and the control will become enabled.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ issue id: #1564
|
||||
|
||||
## Abstract
|
||||
|
||||
This spec describes the basic functionality of the settings UI, including disabling it, the navigation items, launch methods, and editing of settings. The specific layout of each page will be defined in later design reviews.
|
||||
This spec describes the basic functionality of the settings UI, including disabling it, the navigation items, launch methods, and editing of settings. The specific layout of each page will defined in later design reviews.
|
||||
|
||||
## Inspiration
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ There are five `type`s of objects in this menu:
|
||||
the user to visually space out entries.
|
||||
* `"type":"folder"`: This represents a nested menu of entries.
|
||||
- The `"name"` property provides a string of text to display for the group.
|
||||
- The `"icon"` property provides a path to an image to use as the icon. This
|
||||
- The `"icon"` property provides a path to a image to use as the icon. This
|
||||
property is optional.
|
||||
- The `"entries"` property specifies a list of menu entries that will appear
|
||||
nested under this entry. This can contain other `"type":"folder"` groups as
|
||||
|
||||
@@ -377,7 +377,7 @@ spec's review.
|
||||
* [ ] Enable previewing `sendInput` actions in the Command Palette and `SuggestionsControl`
|
||||
* [ ] Enable the `SuggestionsControl` to open top-down (aligned to the bottom of the cursor row) or bottom-up (aligned to the top of the cursor row).
|
||||
* [ ] Disable sorting on the `SuggestionsControl` - elements should presumably be pre-sorted by the source.
|
||||
* [ ] Expose the recent commands as an accessor on `TermControl`
|
||||
* [ ] Expose the recent commands as a accessor on `TermControl`
|
||||
* [ ] Add a `suggestions` action which accepts a single option `recentCommands`. These should be fed in MRU order to the `SuggestionsControl`.
|
||||
* [ ] Expose the recent directories as an accessor on `TermControl`, and add a `recentDirectories` source.
|
||||
|
||||
@@ -505,7 +505,7 @@ Here's a sample json schema for the settings discussed here.
|
||||
> committing any plans here._
|
||||
|
||||
It would be beneficial for the Suggestions UI to display additional context to
|
||||
the user. Consider an extension that provides some commands for the user, like a
|
||||
the user. Consider a extension that provides some commands for the user, like a
|
||||
hypothetical "Docker" extension. The extension author might be able to give the
|
||||
commands simplified names, but also want to expose a more detailed description
|
||||
of the commands to the user.
|
||||
|
||||
@@ -36,7 +36,7 @@ We will do this by allowing users to define a dictionary in their settings.json
|
||||
|
||||
### Axes of variation
|
||||
|
||||
Specifying axes of variation is done in an extremely similar manner to the way font features are specified - a 4-character tag is used to specify which font axis is being modified and a numerical value is provided to specify the value for the axis. For example, {'slnt', 20} specifies that the 'slant' axis should be set to 20.
|
||||
Specifying axes of variation is done in an extremely similar manner to the way font features are specified - a 4-character tag is used to specify which font axis is being modified and a numerical value is provided to specify the value the axis should be set to. For example, {'slnt', 20} specifies that the 'slant' axis should be set to 20.
|
||||
|
||||
There is also a standard list of axes of variation, and each axis has its own default. We will approach this the same way we approached font features, by allowing users to specify additional features or omit features without needing to redefine the defaults.
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ with the default profile running `wsl` in it.
|
||||
|
||||
We'll add another action that can be used to toggle the visibility of the
|
||||
command palette. Pressing that keybinding will bring up the command palette. We
|
||||
should make sure to add an argument to this action that specifies whether the
|
||||
should make sure to add a argument to this action that specifies whether the
|
||||
palette should be opened directly in Action Mode or Commandline Mode.
|
||||
|
||||
When the command palette appears, we'll want it to appear as a single overlay
|
||||
@@ -525,7 +525,7 @@ default. These are largely the actions that are bound by default.
|
||||
## Addenda
|
||||
|
||||
This spec also has a follow-up spec which introduces further changes upon this
|
||||
original draft. Please refer to:
|
||||
original draft. Please also refer to:
|
||||
|
||||
* June 2020: Unified keybindings and commands, and synthesized action names.
|
||||
|
||||
@@ -578,7 +578,7 @@ original draft. Please refer to:
|
||||
in commandline mode before we try to auto-parse their commandline, to check
|
||||
for errors. Might be useful to help sanity check users. We can always parse
|
||||
their `wt` commandlines safely without having to execute them.
|
||||
* It would be cool if commands the user typed in Commandline Mode could be
|
||||
* It would be cool if the commands the user typed in Commandline Mode could be
|
||||
saved to a history of some sort, so they could easily be re-entered.
|
||||
- It would be especially cool if it could do this across launches.
|
||||
- We don't really have any way of storing transient data like that in the
|
||||
|
||||
@@ -68,7 +68,7 @@ This workflow affords us several benefits:
|
||||
- This also makes it potentially possible to backport this portion of the code change to popular in-market versions of Windows 10. For instance, WSL2 has just backported to 1903 and 1909. The less churn and risk, the easier it is to sell a backport.
|
||||
|
||||
*Potential future:*
|
||||
- ~~If no updated console exists, potentially check for registration of a terminal UX that is willing to use the inbox ConPTY bits, start it, and transition to being a PTY instead.~~
|
||||
- ~~If no updated console exists, potentially check for registration of a terminal UX that is willing to use the inbox ConPTY bits, start it, and transition to being a PTY instead.~~
|
||||
- **CUT FROM v1**: To simplify the story for end-users, we're offering this as a package deal in the first revision. Explaining the difference between consoles and terminals to end users is very difficult.
|
||||
|
||||
The registration would operate as follows:
|
||||
@@ -80,7 +80,7 @@ The registration would operate as follows:
|
||||
- **V1 NOTE:** The subkey `%%Startup` was chosen to separate these keys (this one and the `DelegationTerminal` one below) in case we needed to ACL them or protect them in some way. We want a per-user choice of which Terminal/Console are used, but we might need to take action to prevent these keys from being slammed at some point in the future. Why `%%`? The subkeys are traditionally used to resolve paths to client binaries that have their own console preferences set. The `%%` should never be resolvable as it won't lead to a valid path or expanded path variable.
|
||||
|
||||
The delegation process would operate as follows:
|
||||
- A method contract is established between the existing inbox console and any updated console (an interface).
|
||||
- A method contract is established between the existing inbox console and any updated console (an interface).
|
||||
- `HRESULT ConsoleEstablishHandoff(HANDLE server, HANDLE driverInputEvent, const PortableConnectMessage* const msg, HANDLE signalPipe, HANDLE inboxProcess, HANDLE* process)`
|
||||
- `HANDLE server`: This is the server side handle to the console driver, used with `DeviceIoControl` to receive/send messages with the client command-line application
|
||||
- `HANDLE driverInputEvent`: The input event is created and assigned to the driver immediately on first connection, before any messages are read from the driver, to ensure that it can track a blocking state should first message be an input request that we do not yet have data to fill. As such, the inbox console will have created this and assigned it to the driver before pulling off the connection packet and determining that it wants to delegate. Therefore, we will transfer ownership of this event to the updated console.
|
||||
@@ -88,7 +88,7 @@ The delegation process would operate as follows:
|
||||
- ~~The `ConsoleArguments` structure could technically change between versions, so we will make a version agnostic portable structure that just carries the communication from the old one to the new one.~~
|
||||
- **CUT FROM V1**: The only arguments coming in from a default light-up are the server handle. Pretty much all the other arguments are related to the operation of the PTY. Since this feature is about "default application" launches where no arguments are specified, this was cut from the initial revision.
|
||||
- `const PortableConnectMessage* const msg`:
|
||||
- The `CONSOLE_API_MSG` structure contains both the actual packet data from the driver as well as some overhead/administration data related to the packet state, ordering, completion, errors, and buffers. It's a broad scope structure for every type of message we process and it can change over time as we improve the way that `conserver.lib` handles packets.
|
||||
- The `CONSOLE_API_MSG` structure contains both the actual packet data from the driver as well as some overhead/administration data related to the packet state, ordering, completion, errors, and buffers. It's a broad scope structure for every type of message we process and it can change over time as we improve the way the `conserver.lib` handles packets.
|
||||
- This represents a version agnostic variant for ONLY the connect message that can pass along the initial connect information structure, the packet sequencing information, and other relevant payload only to that one message type. It will purposefully discard references to things like a specific set of API servicing routines because the point of handing off is to get updated routines, if necessary.
|
||||
- **V1 NOTE:** This was named `CONSOLE_PORTABLE_ATTACH_MSG`
|
||||
- `HANDLE signalPipe`: During authoring, it was identified that <kbd>Ctrl+C</kbd> and other similar signals need to make it back to the original `conhost.exe` application as the Operating System grants it special privilege over the originally attached client application. This privilege cannot be transferred to the delegated console. So this channel remains for the delegated one to send its signals back through the original one for commanding the underlying client. (This also implies the original `conhost.exe` inbox cannot close and must remain a part of the process tree for the life of the session to maintain this control.)
|
||||
@@ -100,7 +100,7 @@ The delegation process would operate as follows:
|
||||
1. ~~The issue of passing the server, event, and other handles into another process space. We're not entirely sure if the console driver will happily accept these things moving to a different process. It probably should, but unconfirmed.~~
|
||||
1. ~~Some command-line client applications rely on spelunking the process tree to figure out who is their servicing application. Maintaining the delegated/updated console inside the same process space maintains some level of continuity for these sorts of applications.~~
|
||||
- **Alternative:** We may make this just be a COM server/client contract. ~~An in-proc COM server should operate in much the same fashion here (loading the DLL into the process and running particular method) while being significantly more formal and customizable (version revisions, moving to out-of-proc, not really needing to know the binary path because the catalog knows).~~
|
||||
- **V1 NOTE:** We landed on an out-of-proc COM server/client here. This maintains the isolation of the newly running code from the old code. Since we're maintaining the original `conhost.exe` for signaling purposes, we're no longer worried about spelunking the process tree and not having the relationship for clients to find.
|
||||
- **V1 NOTE:** We landed on an out-of-proc COM server/client here. This maintains the isolation of the newly running code from the old code. Since we're maintaining the original `conhost.exe` for signaling purposes, we're no longer worried about the spelunking the process tree and not having the relationship for clients to find.
|
||||
- **Not considering:** ~~WinRT. `conhost.exe` has no WinRT. Adding WinRT to it would significantly increase the complexity of compilation in the inbox and out of box code base. It would also significantly increase the compilation time, binary size, library link list, etc... unless we use just the ABI to access it. But I don't see an advantage to that over just using classic COM at that point. This is only one handoff method and a rather simplistic one at that. Every benefit WinRT provides is outweighed by the extra effort that would be required over just a classic COM server in this case.~~
|
||||
- After delegation is complete, the inbox console will have to clean up any threads, handles, and state related to the session. We do a fairly good job with this normally, but some portions of the `conhost.exe` codebase are reliant on the process exiting for final cleanup. There may be a bit of extra effort to do some explicit cleanup here.
|
||||
- **V1 NOTE:** The inbox one cleans up everything it can and sits in a state waiting for the child/delegated process handle to exit. It also maintains a thread listening for the signals to come through in case it needs to send a command to the client application using the privilege granted to it by the driver.
|
||||
@@ -177,7 +177,7 @@ The settings experience includes:
|
||||
- Inside Windows Terminal
|
||||
- Inside the new Settings UI, we will likely need a page that configures the delegation keys in `HKCU\Console\%%Startup` ~~or a link out to the Windows Settings panel, should we manage to get the settings configurable there~~.
|
||||
- Inside the console property sheet
|
||||
- Same as Terminal, but with `comctl` controls over XAML +/- a link to the Windows Settings panel
|
||||
- Same as for Terminal but with `comctl` controls over XAML +/- a link to the Windows Settings panel
|
||||
- Inside the Settings panel for Windows (probably on the developer settings page)
|
||||
- The ultimate location for this is likely a panel directly inside Windows. This is the hardest one to accomplish because of the timelines of the Windows product. We may not get this in an initial revision, but it should likely be our ultimate goal. **V1 NOTE:** We did it!
|
||||
- Operation:
|
||||
@@ -185,7 +185,7 @@ The settings experience includes:
|
||||
- Offer a list of registered servers or discovered manifests from the app catalog - This is the ideal scenario where we search the installed app catalog +/- the COM catalog and offer a list of apps that conform to the contract in a drop-down.
|
||||
- The final process was to use [App Extensions](https://docs.microsoft.com/windows/uwp/launch-resume/how-to-create-an-extension) inside the Terminal APPX package to declare the COM GUIDs that were available for the `DelegationConsole` and `DelegationTerminal` fields respectively. A configuration class `DelegationConfig` was added to `propslib.lib` that enables the lookup of these from the application state catalog and presents a list of them to choose from. It also manages reading and writing the registry keys.
|
||||
- **V1 NOTE:** Our configuration options currently allow pairings of replacement consoles and terminals to be adjusted in lock-step from the UI. That's not to say further combinations are not possible or even necessarily inhibited by the code. We just went for minimal confusion in our first round.
|
||||
|
||||
|
||||
- Configuration of the legacy console state:
|
||||
- ~~Since we could end up in an experience where the default launch experience gets you directly into Windows Terminal, we believe that the Terminal will likely need an additional setting or settings in the new Settings UI that will allow the toggling of some of the `HKCU\Console` values to do things like set/remove the legacy console state.~~ **V1 NOTE:** Cut as low priority. Switch back to console and configure it that way or use the existing property sheet or tamper with registry keys.
|
||||
- We have left the per-launch debugging and advanced access hole of calling something like `conhost.exe cmd.exe` which will use the inbox conhost to launch `cmd.exe` even if there is a default specified.
|
||||
@@ -209,9 +209,9 @@ The major players here that I am considering are NVDA, JAWS, and Narrator. As fa
|
||||
|
||||
Let's hit the elephant in the room. "You plan on pulling a completely different binary inside the `conhost.exe` process and just... delegating all activity to it?" Yes.
|
||||
|
||||
(**V1 NOTE:** Well, it's out of proc now. But it is at the same privilege level as the original one thanks to the mechanics of COM.)
|
||||
(**V1 NOTE:** Well, it's out of proc now. But it is at the same privilege level as the original one thanks to the mechanics of COM.)
|
||||
|
||||
As far as I'm concerned, the `conhost.exe` that is started to host the command-line client application is running at the same integrity level as the client binary that is partially started and waiting for its server to be ready. This is the long-standing existing protection that we have from the Windows operating system. Anything running in the same integrity level is already expected to be able to tamper with anything else at the same integrity level. The delegated binary that we would be loading into our process space will also be at the same integrity level. Nothing really stops a malicious actor from launching that binary in any other way in the same integrity level as a part of the command-line client application's startup.
|
||||
As far as I'm concerned, the `conhost.exe` that is started to host the command-line client application is running at the same integrity level as the client binary that is partially started and waiting for its server to be ready. This is the long-standing existing protection that we have from the Windows operating system. Anything running in the same integrity level is already expected to be able to tamper with anything else at the same integrity level. The delegated binary that we would be loading into our process space will also be at the same integrity level. Nothing really stops a malicious actor from launching that binary in any other way in the same integrity level as a part of the command-line client application's startup.
|
||||
|
||||
The mitigation here, if necessary, would be to use `WinVerifyTrust` to validate the certification path of the `OpenConsole.exe` binary to ensure that only one that is signed by Microsoft can be the substitute server host for the application. This doesn't stop third parties from redistributing our `OpenConsole.exe` off of GitHub if necessary with their products, but it would stop someone from introducing any random binary that met the signature interface of the delegation methods into `conhost.exe`. The only value I see this providing is stopping someone from being "tricked" into delegating their `conhost.exe` to another binary through the configuration methods we provide. It doesn't really stop someone (or an attacker) from taking ownership of the `conhost.exe` in System32 and replacing it directly. So this point might be moot. (It is expected that replacement of the System32 one is already protected, to some degree, by being owned by the SYSTEM account and requiring some measure of authority to replace.)
|
||||
|
||||
@@ -242,8 +242,8 @@ I expect to take some degree of performance, power, and efficiency hit by implem
|
||||
|
||||
The mitigations to these losses are as follows:
|
||||
|
||||
1. We will delay load any of the interface load and packaging data lookup libraries to only be pulled into process space should we determine that the application is non-interactive.
|
||||
1. That should save us some of the commit and power costs for the sorts of non-interactive scripts and applications that typically run early in OS startup (and leverage `conhost.exe` as their host environment).
|
||||
1. We will delay load any of the interface load and packaging data lookup libraries to only be pulled into process space should we determine that the application is non-interactive.
|
||||
1. That should save us some of the commit and power costs for the sorts of non-interactive scripts and applications that typically run early in OS startup (and leverage `conhost.exe` as their host environment).
|
||||
1. We will still likely get hit with the on-disk commit cost for the additional export libraries linked as well as additional code. That would be a by-design change.
|
||||
|
||||
1. We plan to begin Profile Guided Optimization across our `OpenConsole.exe` and `WindowsTerminal.exe` binaries. This should allow us to optimize the startup paths for this scenario and bias the `OpenConsole.exe` binary that we redistribute to focus its efforts and efficiency on the ConPTY role specifically, ignoring all of the interactive Win32/GDI portions that aren't typically used.
|
||||
|
||||
@@ -109,7 +109,7 @@ each thing in the elevated window that they'd want to create it elevated. Or the
|
||||
Terminal would need to provide some setting like
|
||||
`"autoElevateEverythingInAnElevatedWindow"`.
|
||||
|
||||
We cannot support mixed elevation when starting in an unelevated window.
|
||||
We cannot support mixed elevation when starting in a unelevated window.
|
||||
Therefore, it doesn't make a lot of UX sense to support it in the other
|
||||
direction. It's a cleaner UX story to just have everything in a single window at
|
||||
the same elevation level.
|
||||
@@ -141,7 +141,7 @@ We could also simplify this to only allow a boolean true/false for displaying
|
||||
the shield. As we do often with other enums, we could define `true` to be the
|
||||
same as the default appearance, and `false` to be the hidden option. As always,
|
||||
the development of the Terminal is an iterative process, where we can
|
||||
incrementally improve from no setting, to a boolean setting, to an enum-backed
|
||||
incrementally improve from no setting, to a boolean setting, to a enum-backed
|
||||
one.
|
||||
|
||||
### Configuring a profile to always run elevated
|
||||
|
||||
@@ -469,7 +469,7 @@ This is a list of actionable tasks generated as described by this spec:
|
||||
commandline
|
||||
* [ ] Add a `NameWindow` action, subcommand that allows the user to set the name
|
||||
for the window.
|
||||
* [ ] Add an action that will cause all windows to briefly display an overlay
|
||||
* [ ] Add an action that will cause all windows to briefly display a overlay
|
||||
with the current window ID and name. This would be something like the
|
||||
"identify" feature of the Windows "Display" settings.
|
||||
|
||||
|
||||
@@ -886,7 +886,7 @@ Here, we've got two tabs that have been serialized.
|
||||
- The second pane is also a `TermControl`, takes up 70% of the parent, and is
|
||||
attached to the content process `{2-2-2-2}`
|
||||
* The second tab has a single pane, with a SettingsPage. The settings page has
|
||||
also specified in its `payload` that its current page is the "globals" page.
|
||||
also specified in it's `payload` that its current page is the "globals" page.
|
||||
|
||||
When we send this serialized state to another window, it can use the content
|
||||
GUIDs to initialize new `TermControl`s connected to the appropriate content
|
||||
@@ -983,7 +983,7 @@ of each other.
|
||||
all the logic concerning input. The core will expose these methods that the
|
||||
UI layer calls as projected methods
|
||||
|
||||
8. (Dependent on 7): Expose the methods that the UI layer calls on the core as
|
||||
8. (Dependent on 7): Expose the methods the UI layer calls on the core as
|
||||
projected methods. The control is still fundamentally in-proc, and the UI
|
||||
layer calls directly into the implementation of the control core, but the
|
||||
methods _could_ be used x-proc.
|
||||
@@ -1132,7 +1132,7 @@ prompt the user for permission, but that's an acceptable user experience.
|
||||
|
||||
## TODOs
|
||||
|
||||
* [x] Experimentally prove that an elevated window can host an unelevated content
|
||||
* [x] Experimentally prove that a elevated window can host an unelevated content
|
||||
- Research proved the opposite actually.
|
||||
* [ ] Experimentally prove that I can toss content process IDs from one window
|
||||
to another
|
||||
@@ -1155,7 +1155,7 @@ prompt the user for permission, but that's an acceptable user experience.
|
||||
## Addenda
|
||||
|
||||
This spec also has a follow-up spec which introduces further changes upon this
|
||||
original draft. Please refer to:
|
||||
original draft. Please also refer to:
|
||||
|
||||
* November 2020: Windows Terminal Window Management
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ then this is the pane with the currently focused terminal control. When the user
|
||||
brings the tab into focus, the last focused pane is the pane that should become
|
||||
focused again.
|
||||
|
||||
The tab's state will be updated to reflect the state of its focused pane. The
|
||||
The tab's state will be updated to reflect the state of it's focused pane. The
|
||||
title text and icon of the tab will reflect that of the focused pane. Should the
|
||||
focus switch from one pane to another, the tab's text and icon should update to
|
||||
reflect the newly focused control. Any additional state that the tab would
|
||||
@@ -172,7 +172,7 @@ match.
|
||||
A pane can either be closed by the user manually, or when the terminal it's
|
||||
attached to raises its ConnectionClosed event. When this happens, we should
|
||||
remove this pane from the tree. The parent of the closing pane will have to
|
||||
remove the pane as one of its children. If the sibling of the closing pane is a
|
||||
remove the pane as one of it's children. If the sibling of the closing pane is a
|
||||
leaf, then the parent should just take all of the state from the remaining pane.
|
||||
This will cause the remaining pane's content to expand to take the entire
|
||||
boundaries of the parent's pane. If the remaining child was a parent itself,
|
||||
@@ -182,7 +182,7 @@ replaced by the remaining child.
|
||||
|
||||
## Future considerations
|
||||
|
||||
The Pane implementation isn't complete in its current form. There are many
|
||||
The Pane implementation isn't complete in it's current form. There are many
|
||||
additional things that could be done to improve the user experience. This is by
|
||||
no means a comprehensive list.
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Conhost already has a module for search. It implements case-sensitive or insensi
|
||||
|
||||
We will create a `SearchBoxControl` Xaml `UserControl` element. When a search process begins, a `SearchBoxControl` object will be created and attached to `TermControl` root grid. In other words, one SearchBox is added for each `TermControl`. The reasons for this design is:
|
||||
|
||||
1. Each `TermControl` object is a Terminal Window and has an individual text buffer. In phase 1 we are going to search within the current terminal text buffer.
|
||||
1. Each `TermControl` object is a Terminal Window and has a individual text buffer. In phase 1 we are going to search within the current terminal text buffer.
|
||||
2. If we put the search box under TerminalApp, then the search can only happen on the current focused Terminal.
|
||||
3. If the community does not like the current design, we can lift SearchBox to a higher level.
|
||||
|
||||
@@ -55,7 +55,7 @@ Above is the `SearchBoxControl` in dark theme and light theme.
|
||||
|
||||

|
||||
|
||||
The search box defaults to the top right corner of the Terminal window. If the current tab is split into panes, each pane will have an individual searchbox.
|
||||
The search box defaults to be on the top right corner of the Terminal window. If the current tab is split into panes, each pane will have a individual searchbox.
|
||||
|
||||
#### Search process
|
||||
1. The user presses <kbd>ctrl+shift+f</kbd> (or user's custom key binding) to open the search box. Focus will move to the TextBox.
|
||||
|
||||
@@ -169,7 +169,7 @@ wt my-commandline.exe with some args
|
||||
# tab, and in another tab, run "another.exe running in a second tab"
|
||||
wt my-commandline.exe with some args and a \; literal semicolon ; new-tab another.exe running in a second tab
|
||||
|
||||
# Start cmd.exe, then split it vertically (with the first taking 70% of its
|
||||
# Start cmd.exe, then split it vertically (with the first taking 70% of it's
|
||||
# space, and the new pane taking 30%), and run wsl.exe in that pane (user story 13)
|
||||
wt cmd.exe ; split-pane --target 0 -V -% 30 wsl.exe
|
||||
wt cmd.exe ; split-pane -% 30 wsl.exe
|
||||
@@ -551,7 +551,7 @@ this works as expected.
|
||||
|
||||
Painfully, powershell uses `;` as a separator between commands as well. So, if
|
||||
someone wanted to call a `wt` commandline in powershell with multiple commands,
|
||||
the user would also need to escape those semicolons for powershell first. That
|
||||
the user would need to also escape those semicolons for powershell first. That
|
||||
means a command like ```wt new-tab ; split-pane``` would need to be ```wt new-tab
|
||||
`; split-pane``` in powershell, and ```wt new-tab ; split-pane commandline \; with
|
||||
\; semicolons``` would need to become ```wt new-tab `; split-pane commandline \`;
|
||||
|
||||
@@ -69,7 +69,7 @@ To implement this feature, we'll add the following settings:
|
||||
|
||||
### `globalSummon` Action
|
||||
|
||||
The `globalSummon` action will be a keybinding that the user can use to summon a
|
||||
The `globalSummon` action will be a keybinding the user can use to summon a
|
||||
Terminal window from anywhere in the OS. Various arguments to the action will
|
||||
specify which window is summoned, to where, and how the window should behave on
|
||||
summon.
|
||||
@@ -182,7 +182,7 @@ for pure markdown, sorry. -->
|
||||
<tr>
|
||||
<td><code>"any"</code><br> Summon the MRU window</td>
|
||||
|
||||
<td>Go to the desktop with the window (leave position alone)</td>
|
||||
<td>Go to the desktop the window is on (leave position alone)</td>
|
||||
<td>Move the window to this desktop (leave position alone)</td>
|
||||
<td>
|
||||
|
||||
@@ -196,7 +196,7 @@ Else:
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<tr>
|
||||
<td><code>"toCurrent"</code><br> Summon the MRU window TO the monitor with the foreground window</td>
|
||||
<td>Go to the desktop with the window, move to the monitor with the foreground window</td>
|
||||
<td>Go to the desktop the window is on, move to the monitor with the foreground window</td>
|
||||
<td>Move the window to this desktop, move to the monitor with the foreground window</td>
|
||||
<td>
|
||||
|
||||
@@ -213,7 +213,7 @@ Else:
|
||||
<code>"toMouse"</code>
|
||||
<sup><a href="#footnote-2">[2]</a></sup> <br>
|
||||
Summon the MRU window TO the monitor with the mouse</td>
|
||||
<td>Go to the desktop with the window, move to the monitor with the mouse</td>
|
||||
<td>Go to the desktop the window is on, move to the monitor with the mouse</td>
|
||||
<td>Move the window to this desktop, move to the monitor with the mouse</td>
|
||||
<td>
|
||||
|
||||
@@ -230,7 +230,7 @@ Else:
|
||||
<td>
|
||||
|
||||
If there is a window on this monitor on any desktop,
|
||||
* Go to the desktop with the window (leave position alone)
|
||||
* Go to the desktop the window is on (leave position alone)
|
||||
|
||||
else
|
||||
* Create a new window on this monitor & desktop
|
||||
@@ -262,7 +262,7 @@ Else (one on this desktop & monitor)
|
||||
<td>
|
||||
|
||||
If there is a window on monitor N on any desktop,
|
||||
* Go to the desktop with the window (leave position alone)
|
||||
* Go to the desktop the window is on (leave position alone)
|
||||
|
||||
else
|
||||
* Create a new window on this monitor & desktop
|
||||
|
||||
@@ -273,7 +273,7 @@ with GUIDs set.
|
||||
After a dynamic profile generator runs, we will determine what new profiles need
|
||||
to be added to the user settings, so we can append those to the list of
|
||||
profiles. The deserializer will look at the list of generated profiles and check
|
||||
if each and every one already has an entry in the user settings. The generator
|
||||
if each and every one already has a entry in the user settings. The generator
|
||||
will just blind hand back a list of profiles, and the deserializer will figure
|
||||
out if any of them need to be added to the user settings. We'll store some sort
|
||||
of result indicating that we want a save operation to occur. After the rest of
|
||||
@@ -505,8 +505,8 @@ like so:
|
||||
// To view the default settings, open the defaults.json file in this directory
|
||||
```
|
||||
|
||||
The "Settings" button would then only open the file that the user needs to edit,
|
||||
and provide them instructions on how to open the defaults file.
|
||||
The "Settings" button would then only open the file the user needs to edit, and
|
||||
provide them instructions on how to open the defaults file.
|
||||
|
||||
There could alternatively be a hidden option for the "Open Settings" button,
|
||||
where holding <kbd>Alt</kbd> while clicking on the button would open the
|
||||
|
||||
@@ -56,7 +56,7 @@ short duration after they're made.
|
||||
## UI/UX Design
|
||||
|
||||
This has no direct impact on the UI/UX; however, we may want to add a button to general settings page titled "reset all
|
||||
dialogs" or "ask me *again* about those things that, some time ago, I told you to not ask me about".
|
||||
dialogs" or "don't not ask me again about those things that, some time ago, I told you to not ask me about".
|
||||
|
||||
We do not intend this file to be edited by hand, so it does not have to be user-friendly or serialized with indentation.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ default profiles (cmd/powershell) or the dynamically generated profiles.
|
||||
|
||||
For modifications to existing profiles, the json stub would need to indicate which profile it wishes to modify. It will
|
||||
do this by providing the corresponding guid in the `"updates"` field of the json stub. The reason we use an `"updates"`
|
||||
field rather than a `"guid"` field (like the way that user settings are eventually layered onto profiles) is because we
|
||||
field rather than a `"guid"` field (like the way the user settings are eventually layered onto profiles) is because we
|
||||
do not want to mistakenly create a new profile when the stub was meant to update a profile that did not exist.
|
||||
|
||||
Note that currently, we generate a GUID for dynamic profiles using the "initial" name of the profile (i.e. before
|
||||
@@ -96,7 +96,7 @@ Here is an example of a json file that modifies an existing profile (specificall
|
||||
}
|
||||
```
|
||||
|
||||
**NOTE**: This will *not* change the way that profile looks in the user's settings file. The Azure cloud shell profile
|
||||
**NOTE**: This will *not* change the way the profile looks in the user's settings file. The Azure cloud shell profile
|
||||
in their settings file (assuming they have made no changes) will still be as below.
|
||||
|
||||
```js
|
||||
|
||||
@@ -31,7 +31,7 @@ There are several common pieces needed for both the tab tear-off scenario and th
|
||||
|
||||
We need some sort of server/manager code that sits there waiting for connections from `wt.exe` processes and potentially `conhost.exe` processes such that it can broker a connection between the processes. It either needs to run in its own process or it needs to run in one of the existing `wt.exe`s that is chosen as the primary manager at the time. It should create communication channels and a global mutex at the time of creation.
|
||||
|
||||
All other `wt.exe` processes starting after the primary should detect the existence of the server manager process and wait on the mutex handle. When the primary disappears, the OS scheduler should choose one of the others to wake up first on the mutex. It can take the lock and then set up the primary management channel.
|
||||
All other `wt.exe` processes starting after the primary should detect the existence of the server manager process and wait on the mutex handle. When the primary disappears, the OS scheduler should choose one of the others to wake up first on the mutex. It can take the lock and then set up the primary management channel.
|
||||
|
||||
Alternatively, if the manager process is completely isolated and we expect all `wt.exe`s to have to remain connected at all times, we can make it such that when the connections are broken between the individual processes and the manager that they all shut down. I would prefer that it is resilient (the previous option) over this one, but browsers must have a good reason for preferring this way.
|
||||
|
||||
@@ -85,7 +85,7 @@ If the registered handler fails to start the connection, there is no registered
|
||||
|
||||
##### Interactive vs. Not
|
||||
|
||||
We would have to be able to detect the difference between an interactive and non-interactive mode here.
|
||||
We would have to be able to detect the difference between an interactive and non-interactive mode here.
|
||||
- Interactive is defined as the end-user is attempting to launch a command-line application with a visible window to see the output and enter input.
|
||||
- Non-interactive is defined as tools, utilities, and services attempting to launch a command-line application with no visible window (and possibly some redirected handles).
|
||||
|
||||
@@ -120,7 +120,7 @@ There's a few areas to study here.
|
||||
|
||||
3. Updating conhost.exe to look up the launch preference and/or to launch another console host via a protocol handler
|
||||
- This would allow the `C:\windows\system32\conhost.exe` to effectively delegate the session to another `conhost.exe` that is hopefully newer than the inbox one. Given that the driver protocol in the box doesn't change and hasn't changed and we don't intend to change it, the forward/backward compatibility story is great here. Additionally, if for whatever reason the delegated `conhost.exe` fails to launch, we can just fall back and launch the old one like we would have prior to the change. It is significantly more likely, but still challenging, to argue for servicing `conhost.exe` back several versions in Windows to make this light up better for all folks. It might be especially more possible if it is a very targeted code snippet that can drop in to all the old versions of the `conhost.exe` code. We would still have the argument about spending resources developing for OS versions that are supposed to be dropped in favor of latest, but it's still a lesser argument than upending all of `kernelbase.dll`.
|
||||
- A protocol handler is also well understood and relatively well handled/tested in Windows. Old apps can handle protocols. New apps can handle protocols. Protocol handlers can take arguments. We don't have to lean on any other team to get them to help change the way that the rest of the OS works.
|
||||
- A protocol handler is also well understood and relatively well handled/tested in Windows. Old apps can handle protocols. New apps can handle protocols. Protocol handlers can take arguments. We don't have to lean on any other team to get them to help change the way the rest of the OS works.
|
||||
|
||||
#### Communicating the launch
|
||||
For the parameters passing, I see a few options:
|
||||
@@ -149,7 +149,7 @@ To simplify this for a first iteration, we could just make it so the transfer do
|
||||
- If released onto anything that isn't a `wt.exe` instance, we create a new `wt.exe` instance and send in the connection as the default startup parameter.
|
||||
|
||||
#### Component UI
|
||||
It is also theoretically possible that if we could find a Component UI style solution (where the tab/panes live in their own process and just remote the UI/input into the shell) that it would be easy and even trivial to change out which shell/frame host is holding that element at any given time.
|
||||
It is also theoretically possible that if we could find a Component UI style solution (where the tab/panes live in their own process and just remote the UI/input into the shell) that it would be easy and even trivial to change out which shell/frame host is holding that element at any given time.
|
||||
|
||||
### For Default Application
|
||||
The UX would make it look exactly like the user had started `wt.exe` from a shortcut or launch tile, but would launch the first tab differently than the defaults.
|
||||
@@ -173,7 +173,7 @@ I don't believe it changes anything for accessibility. The only concern I'd have
|
||||
|
||||
This particular feature will have to go through a security review/audit. It is unclear what level of control we will need over the IPC communication channels. A few things come to mind:
|
||||
1. We need to ensure that the mutexes/pipes/communications are restricted inside of one particular session to one particular user. If another user is also running WT in their session, it should involve a completely different manager process and system objects.
|
||||
1. We MAY have to enforce a scenario where we inhibit cross-integrity-level connections from being passed around. Generally speaking, processes at a higher integrity level have the authority to perform actions on those with a lower integrity level. This means that an elevated `wt.exe` could theoretically send a tab to a standard level `wt.exe`. We may be required to inhibit/prohibit this. We may also need to have one manager per integrity level.
|
||||
1. We MAY have to enforce a scenario where we inhibit cross-integrity-level connections from being passed around. Generally speaking, processes at a higher integrity level have the authority to perform actions on those with a lower integrity level. This means that an elevated `wt.exe` could theoretically send a tab to a standard level `wt.exe`. We may be required to inhibit/prohibit this. We may also need to have one manager per integrity level.
|
||||
1. I'm not sure what sorts of ACL/DACL/SACLs we would need to apply to all the kernel objects involved.
|
||||
1. My initial prototype here used message-passing type pipes with a custom rolled protocol. If I make my own protocol, it needs to be fuzzed. And I'm probably missing something. Many/most of these concerns for security are probably eliminated if we use a well-known mechanism for this sort of IPC. My thoughts go to a COM server. More complicated to implement than message pipes, but probably brings a lot of security benefits and eliminates the need to fuzz the protocol (probably).
|
||||
|
||||
@@ -184,18 +184,18 @@ In the simple implementation, it will decrease reliability. We'll be shuffling c
|
||||
We might be able to mitigate some of the reliability concerns here or even improve reliability by going a step further with the process/containerization model like browsers do and standing up each individual tab as its own process host.
|
||||
|
||||
```
|
||||
wt.exe - Manager Mode
|
||||
|- wt.exe - Frame Host Mode
|
||||
wt.exe - Manager Mode
|
||||
|- wt.exe - Frame Host Mode
|
||||
| |- wt.exe - Tab Host Mode
|
||||
| | |- conhost.exe - ConPTY mode
|
||||
| | |- pwsh.exe - Client application
|
||||
| | |- pwsh.exe - Client application
|
||||
| |- wt.exe - Tab Host Mode
|
||||
| |- conhost.exe - ConPTY mode
|
||||
| |- cmd.exe - Client application
|
||||
|- wt.exe - Frame Host Mode
|
||||
| |- cmd.exe - Client application
|
||||
|- wt.exe - Frame Host Mode
|
||||
|- wt.exe - Tab Host Mode
|
||||
|- conhost.exe - ConPTY mode
|
||||
|- pwsh.exe - Client application
|
||||
|- pwsh.exe - Client application
|
||||
```
|
||||
|
||||
The current structure of `wt.exe` has everything hosted within the one process. To improve reliability, we would likely have to make `wt.exe` run in three modes.
|
||||
@@ -219,29 +219,29 @@ It is possible (but would need to be explored) that the APIs available to us to
|
||||
In the one instance, we have this process hierarchy. Two instances of Windows Terminal exist. In Terminal A, the user has started a `cmd.exe` and a `pwsh.exe` tab. In the second instance, the user has started just one `cmd.exe` tab.
|
||||
|
||||
```
|
||||
- wt.exe (Terminal Instance A)
|
||||
- wt.exe (Terminal Instance A)
|
||||
|- conhost.exe (in PTY mode) - Hosted to A
|
||||
| |- cmd.exe
|
||||
|- conhost.exe (in PTY mode) - Hosted to A
|
||||
|- pwsh.exe <-- I will be dragged out
|
||||
|
||||
- wt.exe (Terminal Instance B)
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
```
|
||||
|
||||
When the `pwsh.exe` tab is torn off from Instance A and is dropped onto Instance B, the process hierarchy doesn't actually change. The connection details, preferences, and session metadata are passed via the IPC management channels, but to an outside observer, nothing has actually changed.
|
||||
|
||||
```
|
||||
- wt.exe (Terminal Instance A)
|
||||
- wt.exe (Terminal Instance A)
|
||||
|- conhost.exe (in PTY mode) - Hosted to A
|
||||
| |- cmd.exe
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- pwsh.exe <-- I am hosted in B but I'm parented to A
|
||||
|
||||
- wt.exe (Terminal Instance B)
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
```
|
||||
|
||||
I don't believe there are provisions in the Windows OS to reparent applications to a different process.
|
||||
@@ -253,8 +253,8 @@ Additionally, this becomes more interesting when Terminal Instance A dies and B
|
||||
|- pwsh.exe <-- I am hosted in B but I'm parented to A
|
||||
|
||||
- wt.exe (Terminal Instance B)
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
|- conhost.exe (in PTY mode) - Hosted to B
|
||||
|- cmd.exe
|
||||
```
|
||||
|
||||
When instance A dies, the `conhost.exe` that was reparented keeps running and now just appears orphaned within the process hierarchy, reporting to the top level under utilities like Process Explorer.
|
||||
@@ -280,7 +280,7 @@ The `conhost.exe` was started in response to a `pwsh.exe` being started with no
|
||||
|
||||
```
|
||||
- conhost.exe - idling
|
||||
|
||||
|
||||
- wt.exe (Terminal Instance A)
|
||||
|- conhost.exe (in PTY mode)
|
||||
|- pwsh.exe
|
||||
@@ -294,7 +294,7 @@ This is obviously less efficient than not doing it as we have to stand up server
|
||||
|
||||
But as long as we're creating threads and services that sleep most of the time and are only awakened on some kernel/system event, we shouldn't be wasting too much in terms of power and background resources.
|
||||
|
||||
Additionally, `wt.exe` is worse than `conhost.exe` alone in all efficiency categories simply because it not only requires more resources to display in a "pretty" manner, but it also requires a `conhost.exe` under it in PTY mode to adapt the API calls. This is generally acceptable for end users who care more about the experience than the total performance.
|
||||
Additionally, `wt.exe` is worse than `conhost.exe` alone in all efficiency categories simply because it not only requires more resources to display in a "pretty" manner, but it also requires a `conhost.exe` under it in PTY mode to adapt the API calls. This is generally acceptable for end users who care more about the experience than the total performance.
|
||||
|
||||
It is, however, not likely to be much if any worse than just choosing to use `wt.exe` anyway over `conhost.exe`.
|
||||
|
||||
@@ -304,7 +304,7 @@ I've listed most of the issues above in their individual sections. The primary h
|
||||
1. Process tree layout - The processes in hierarchy may not make sense to someone inspecting them either visually with a tool or programmatically
|
||||
1. Process and kernel object lifetime - Applications may be counting on a specific process or object lifetime in regards to their hosting window and we might be tampering with that in how we apply job objects or shuffle around ownership to make tabs happen
|
||||
1. Default launch expectations - It is possible that test utilities or automation are counting on `conhost.exe` being the host application or that they're not ready to tolerate the potential for other applications to start. I think the interactive/non-interactive check mitigates this, but we'd have to remain concerned here.
|
||||
1. `AttachConsole` and `DetachConsole` and `AllocConsole` - I don't have the slightest idea what happens for these APIs. We would have to explore. `AttachConsole` has restrictions based on the process hierarchy. It would likely behave in interesting ways with the strange parenting order and might be a driver to why we would have to adjust the parenting of the processes (or change the API under the hood). `DetachConsole` might create an issue where a tab disappears out of the terminal and the job object causes everything to die. `AttachConsole` wouldn't necessarily be guaranteed to go back into the same `wt.exe` or a `wt.exe` at all.
|
||||
1. `AttachConsole` and `DetachConsole` and `AllocConsole` - I don't have the slightest idea what happens for these APIs. We would have to explore. `AttachConsole` has restrictions based on the process hierarchy. It would likely behave in interesting ways with the strange parenting order and might be a driver to why we would have to adjust the parenting of the processes (or change the API under the hood). `DetachConsole` might create an issue where a tab disappears out of the terminal and the job object causes everything to die. `AttachConsole` wouldn't necessarily be guaranteed to go back into the same `wt.exe` or a `wt.exe` at all.
|
||||
|
||||
## Future considerations
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ style admin vs regular windows?
|
||||
## Addenda
|
||||
|
||||
This spec also has a follow-up spec which elaborates on the complexities of Mica
|
||||
in the Terminal. Please refer to:
|
||||
in the Terminal. Please also refer to:
|
||||
|
||||
* [Mica in the Terminal]
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ should the control provide some sort of accessibility pattern.
|
||||
if the hosted control wants to use Ctrl+T for its own shortcut? The current
|
||||
keybindings model has the `TermControl` call into the App layer to see if a
|
||||
keystroke should be handled by the app first. We may want to make sure that
|
||||
for non-terminal controls, we add an event handler to try and have the
|
||||
for non-terminal controls, we add a event handler to try and have the
|
||||
`AppKeyBindings` handle the keypress if the control doesn't. This won't solve
|
||||
the case where the control wants to use a keybinding that is mapped by the
|
||||
Terminal App. In that case, non-terminal controls will actually behave
|
||||
|
||||
@@ -350,7 +350,7 @@ void ROW::_init() noexcept
|
||||
std::iota(_charOffsets.begin(), _charOffsets.end(), uint16_t{ 0 });
|
||||
#endif
|
||||
|
||||
#pragma warning(pop)
|
||||
#pragma warning(push)
|
||||
}
|
||||
|
||||
void ROW::CopyFrom(const ROW& source)
|
||||
@@ -1143,13 +1143,6 @@ til::CoordType ROW::GetTrailingColumnAtCharOffset(const ptrdiff_t offset) const
|
||||
return _createCharToColumnMapper(offset).GetTrailingColumnAt(offset);
|
||||
}
|
||||
|
||||
uint16_t ROW::GetCharOffset(til::CoordType col) const noexcept
|
||||
{
|
||||
const auto columns = GetReadableColumnCount();
|
||||
const auto colBeg = clamp(col, 0, columns);
|
||||
return _uncheckedCharOffset(gsl::narrow_cast<size_t>(colBeg));
|
||||
}
|
||||
|
||||
DelimiterClass ROW::DelimiterClassAt(til::CoordType column, const std::wstring_view& wordDelimiters) const noexcept
|
||||
{
|
||||
const auto col = _clampedColumn(column);
|
||||
|
||||
@@ -172,7 +172,6 @@ public:
|
||||
std::wstring_view GetText(til::CoordType columnBegin, til::CoordType columnEnd) const noexcept;
|
||||
til::CoordType GetLeadingColumnAtCharOffset(ptrdiff_t offset) const noexcept;
|
||||
til::CoordType GetTrailingColumnAtCharOffset(ptrdiff_t offset) const noexcept;
|
||||
uint16_t GetCharOffset(til::CoordType col) const noexcept;
|
||||
DelimiterClass DelimiterClassAt(til::CoordType column, const std::wstring_view& wordDelimiters) const noexcept;
|
||||
|
||||
auto AttrBegin() const noexcept { return _attr.begin(); }
|
||||
|
||||
@@ -100,7 +100,7 @@ void TextBuffer::_reserve(til::size screenBufferSize, const TextAttribute& defau
|
||||
const auto rowStride = rowSize + charsBufferSize + charOffsetsBufferSize;
|
||||
assert(rowStride % alignof(ROW) == 0);
|
||||
|
||||
// 65535*65535 cells would result in an allocSize of 8GiB.
|
||||
// 65535*65535 cells would result in a allocSize of 8GiB.
|
||||
// --> Use uint64_t so that we can safely do our calculations even on x86.
|
||||
// We allocate 1 additional row, which will be used for GetScratchpadRow().
|
||||
const auto rowCount = ::base::strict_cast<uint64_t>(h) + 1;
|
||||
@@ -219,17 +219,6 @@ til::CoordType TextBuffer::_estimateOffsetOfLastCommittedRow() const noexcept
|
||||
return std::max(0, gsl::narrow_cast<til::CoordType>(lastRowOffset - 2));
|
||||
}
|
||||
|
||||
bool TextBuffer::_isRowCommitted(til::CoordType y) const noexcept
|
||||
{
|
||||
auto offset = (_firstRow + y + 1 /* account for the scratch row */) % _height;
|
||||
if (offset < 0)
|
||||
{
|
||||
offset += _height;
|
||||
}
|
||||
const auto row = _buffer.get() + _bufferRowStride * offset;
|
||||
return row < _commitWatermark;
|
||||
}
|
||||
|
||||
// Retrieves a row from the buffer by its offset from the first row of the text buffer
|
||||
// (what corresponds to the top row of the screen buffer).
|
||||
const ROW& TextBuffer::GetRowByOffset(const til::CoordType index) const
|
||||
@@ -945,10 +934,6 @@ void TextBuffer::ResetLineRenditionRange(const til::CoordType startRow, const ti
|
||||
|
||||
LineRendition TextBuffer::GetLineRendition(const til::CoordType row) const
|
||||
{
|
||||
if (!_isRowCommitted(row)) [[unlikely]]
|
||||
{
|
||||
return LineRendition::SingleWidth;
|
||||
}
|
||||
return GetRowByOffset(row).GetLineRendition();
|
||||
}
|
||||
|
||||
@@ -1156,20 +1141,7 @@ DelimiterClass TextBuffer::_GetDelimiterClassAt(const til::point pos, const std:
|
||||
return GetRowByOffset(realPos.y).DelimiterClassAt(realPos.x, wordDelimiters);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the start of the word at or before the given position
|
||||
// - When includeWhitespace is false, returns the start of the current delimiter class run
|
||||
// (selection behavior: stops at non-wrapped row boundaries)
|
||||
// - When includeWhitespace is true, also skips backward past any leading ControlChars
|
||||
// to include the preceding word (accessibility/UIA behavior: crosses all row boundaries)
|
||||
// Arguments:
|
||||
// - pos - the buffer position to start from
|
||||
// - wordDelimiters - characters considered as DelimiterClass::DelimiterChar
|
||||
// - includeWhitespace - when true, skip past leading whitespace to find the word start
|
||||
// - limitOptional - (optional) the last possible position in the buffer that can be explored
|
||||
// Return Value:
|
||||
// - The position of the first character of the word (inclusive)
|
||||
til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
|
||||
til::point TextBuffer::GetWordStart2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
|
||||
{
|
||||
const auto bufferSize{ GetSize() };
|
||||
const auto limit{ limitOptional.value_or(bufferSize.BottomInclusiveRightExclusive()) };
|
||||
@@ -1202,7 +1174,7 @@ til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view word
|
||||
// 1. move to the beginning of the delimiter class run
|
||||
// 2. (includeWhitespace) if we were on a ControlChar, go back one more delimiter class run
|
||||
const auto initialDelimiter = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
|
||||
pos = _GetDelimiterClassRunStart(pos, wordDelimiters, includeWhitespace);
|
||||
pos = _GetDelimiterClassRunStart(pos, wordDelimiters);
|
||||
if (!includeWhitespace || pos.x == bufferSize.Left())
|
||||
{
|
||||
// Special case:
|
||||
@@ -1213,26 +1185,12 @@ til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view word
|
||||
else if (initialDelimiter == DelimiterClass::ControlChar)
|
||||
{
|
||||
bufferSize.DecrementInExclusiveBounds(pos);
|
||||
pos = _GetDelimiterClassRunStart(pos, wordDelimiters, includeWhitespace);
|
||||
pos = _GetDelimiterClassRunStart(pos, wordDelimiters);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the exclusive end of the word at or after the given position
|
||||
// - When includeWhitespace is false, returns the exclusive end of the current delimiter class run
|
||||
// (selection behavior: stops at non-wrapped row boundaries)
|
||||
// - When includeWhitespace is true, also skips forward past any trailing ControlChars
|
||||
// to include trailing whitespace (accessibility/UIA behavior: crosses all row boundaries)
|
||||
// - The result is clamped to limitOptional when provided
|
||||
// Arguments:
|
||||
// - pos - the buffer position to start from
|
||||
// - wordDelimiters - characters considered as DelimiterClass::DelimiterChar
|
||||
// - includeWhitespace - when true, skip past trailing whitespace to find the next word boundary
|
||||
// - limitOptional - (optional) the last possible position in the buffer that can be explored
|
||||
// Return Value:
|
||||
// - The exclusive end position of the word
|
||||
til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
|
||||
til::point TextBuffer::GetWordEnd2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
|
||||
{
|
||||
const auto bufferSize{ GetSize() };
|
||||
const auto limit{ limitOptional.value_or(bufferSize.BottomInclusiveRightExclusive()) };
|
||||
@@ -1265,12 +1223,8 @@ til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDe
|
||||
// So the heuristic we use is:
|
||||
// 1. move to the end of the delimiter class run
|
||||
// 2. (includeWhitespace) if the next delimiter class run is a ControlChar, go forward one more delimiter class run
|
||||
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters, includeWhitespace);
|
||||
if (pos >= limit)
|
||||
{
|
||||
return limit;
|
||||
}
|
||||
else if (!includeWhitespace || pos.x == bufferSize.RightExclusive())
|
||||
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters);
|
||||
if (!includeWhitespace || pos.x == bufferSize.RightExclusive())
|
||||
{
|
||||
// Special case:
|
||||
// we're at the right boundary (and end of a delimiter class run),
|
||||
@@ -1281,8 +1235,7 @@ til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDe
|
||||
if (const auto nextDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
|
||||
nextDelimClass == DelimiterClass::ControlChar)
|
||||
{
|
||||
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters, includeWhitespace);
|
||||
return std::min(pos, limit);
|
||||
return _GetDelimiterClassRunEnd(pos, wordDelimiters);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
@@ -1335,48 +1288,29 @@ bool TextBuffer::IsWordBoundary(const til::point pos, const std::wstring_view wo
|
||||
return prevDelimiterClass != currentDelimiterClass && currentDelimiterClass != DelimiterClass::ControlChar;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the start position for the current delimiter class run, scanning backward
|
||||
// - Stops when the delimiter class changes or a row boundary is reached
|
||||
// - When accessibilityMode is true, freely crosses non-wrapped row boundaries
|
||||
// - When accessibilityMode is false, only crosses wrap-forced row boundaries
|
||||
// Arguments:
|
||||
// - pos - the buffer position to start scanning from
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - accessibilityMode - when true, cross non-wrapped row boundaries freely
|
||||
// Return Value:
|
||||
// - The position of the first character in the current delimiter class run (inclusive)
|
||||
til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode) const
|
||||
til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
const auto bufferSize = GetSize();
|
||||
const auto initialDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
|
||||
auto nextPos = pos;
|
||||
while (nextPos != bufferSize.Origin())
|
||||
for (auto nextPos = pos; nextPos != bufferSize.Origin(); pos = nextPos)
|
||||
{
|
||||
bufferSize.DecrementInExclusiveBounds(nextPos);
|
||||
|
||||
if (nextPos.x == bufferSize.RightExclusive())
|
||||
{
|
||||
// wrapped onto previous line
|
||||
// wrapped onto previous line,
|
||||
// check if it was forced to wrap
|
||||
const auto& row = GetRowByOffset(nextPos.y);
|
||||
if (!row.WasWrapForced() && !accessibilityMode)
|
||||
if (!row.WasWrapForced())
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
// In accessibility mode (or if row was wrap-forced), continue
|
||||
// across the row boundary. The actual last character of the
|
||||
// previous row will be checked on the next iteration.
|
||||
// Don't update pos to avoid storing a transient position
|
||||
}
|
||||
else if (_GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
|
||||
{
|
||||
// if we changed delim class, we're done (don't apply move)
|
||||
return pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = nextPos;
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
@@ -1386,8 +1320,7 @@ til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wst
|
||||
// Arguments:
|
||||
// - pos - the buffer position being within the current delimiter class
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - accessibilityMode - when true, cross non-wrapped row boundaries freely
|
||||
til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode) const
|
||||
til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
const auto bufferSize = GetSize();
|
||||
const auto initialDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
|
||||
@@ -1400,16 +1333,7 @@ til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstri
|
||||
// wrapped onto next line,
|
||||
// check if it was forced to wrap or switched delimiter class
|
||||
const auto& row = GetRowByOffset(pos.y);
|
||||
if (accessibilityMode)
|
||||
{
|
||||
// In accessibility mode, always cross row boundaries,
|
||||
// but still stop if the delimiter class changes
|
||||
if (_GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
|
||||
{
|
||||
return nextPos;
|
||||
}
|
||||
}
|
||||
else if (!row.WasWrapForced() || _GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
|
||||
if (!row.WasWrapForced() || _GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
@@ -1424,6 +1348,283 @@ til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstri
|
||||
return pos;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the til::point for the beginning of the word you are on
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - accessibilityMode - when enabled, we continue expanding left until we are at the beginning of a readable word.
|
||||
// Otherwise, expand left until a character of a new delimiter class is found
|
||||
// (or a row boundary is encountered)
|
||||
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
|
||||
// Return Value:
|
||||
// - The til::point for the first character on the "word" (inclusive)
|
||||
til::point TextBuffer::GetWordStart(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode, std::optional<til::point> limitOptional) const
|
||||
{
|
||||
// Consider a buffer with this text in it:
|
||||
// " word other "
|
||||
// In selection (accessibilityMode = false),
|
||||
// a "word" is defined as the range between two delimiters
|
||||
// so the words in the example include [" ", "word", " ", "other", " "]
|
||||
// In accessibility (accessibilityMode = true),
|
||||
// a "word" includes the delimiters after a range of readable characters
|
||||
// so the words in the example include ["word ", "other "]
|
||||
// NOTE: the start anchor (this one) is inclusive, whereas the end anchor (GetWordEnd) is exclusive
|
||||
|
||||
#pragma warning(suppress : 26496)
|
||||
auto copy{ target };
|
||||
const auto bufferSize{ GetSize() };
|
||||
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
|
||||
if (target == bufferSize.Origin())
|
||||
{
|
||||
// can't expand left
|
||||
return target;
|
||||
}
|
||||
else if (target == bufferSize.EndExclusive())
|
||||
{
|
||||
// GH#7664: Treat EndExclusive as EndInclusive so
|
||||
// that it actually points to a space in the buffer
|
||||
copy = bufferSize.BottomRightInclusive();
|
||||
}
|
||||
else if (bufferSize.CompareInBounds(target, limit, true) >= 0)
|
||||
{
|
||||
// if at/past the limit --> clamp to limit
|
||||
copy = limitOptional.value_or(bufferSize.BottomRightInclusive());
|
||||
}
|
||||
|
||||
if (accessibilityMode)
|
||||
{
|
||||
return _GetWordStartForAccessibility(copy, wordDelimiters);
|
||||
}
|
||||
else
|
||||
{
|
||||
return _GetWordStartForSelection(copy, wordDelimiters);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method for GetWordStart(). Get the til::point for the beginning of the word (accessibility definition) you are on
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// Return Value:
|
||||
// - The til::point for the first character on the current/previous READABLE "word" (inclusive)
|
||||
til::point TextBuffer::_GetWordStartForAccessibility(const til::point target, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
auto result = target;
|
||||
const auto bufferSize = GetSize();
|
||||
|
||||
// ignore left boundary. Continue until readable text found
|
||||
while (_GetDelimiterClassAt(result, wordDelimiters) != DelimiterClass::RegularChar)
|
||||
{
|
||||
if (result == bufferSize.Origin())
|
||||
{
|
||||
//looped around and hit origin (no word between origin and target)
|
||||
return result;
|
||||
}
|
||||
bufferSize.DecrementInBounds(result);
|
||||
}
|
||||
|
||||
// make sure we expand to the left boundary or the beginning of the word
|
||||
while (_GetDelimiterClassAt(result, wordDelimiters) == DelimiterClass::RegularChar)
|
||||
{
|
||||
if (result == bufferSize.Origin())
|
||||
{
|
||||
// first char in buffer is a RegularChar
|
||||
// we can't move any further back
|
||||
return result;
|
||||
}
|
||||
bufferSize.DecrementInBounds(result);
|
||||
}
|
||||
|
||||
// move off of delimiter
|
||||
bufferSize.IncrementInBounds(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method for GetWordStart(). Get the til::point for the beginning of the word (selection definition) you are on
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// Return Value:
|
||||
// - The til::point for the first character on the current word or delimiter run (stopped by the left margin)
|
||||
til::point TextBuffer::_GetWordStartForSelection(const til::point target, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
auto result = target;
|
||||
const auto bufferSize = GetSize();
|
||||
|
||||
const auto initialDelimiter = _GetDelimiterClassAt(result, wordDelimiters);
|
||||
const bool isControlChar = initialDelimiter == DelimiterClass::ControlChar;
|
||||
|
||||
// expand left until we hit the left boundary or a different delimiter class
|
||||
while (result != bufferSize.Origin() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
|
||||
{
|
||||
if (result.x == bufferSize.Left())
|
||||
{
|
||||
// Prevent 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);
|
||||
}
|
||||
|
||||
if (_GetDelimiterClassAt(result, wordDelimiters) != initialDelimiter)
|
||||
{
|
||||
// move off of delimiter
|
||||
bufferSize.IncrementInBounds(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the til::point for the beginning of the NEXT word
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - accessibilityMode - when enabled, we continue expanding right until we are at the beginning of the next READABLE word
|
||||
// Otherwise, expand right until a character of a new delimiter class is found
|
||||
// (or a row boundary is encountered)
|
||||
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
|
||||
// Return Value:
|
||||
// - The til::point for the last character on the "word" (inclusive)
|
||||
til::point TextBuffer::GetWordEnd(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode, std::optional<til::point> limitOptional) const
|
||||
{
|
||||
// Consider a buffer with this text in it:
|
||||
// " word other "
|
||||
// In selection (accessibilityMode = false),
|
||||
// a "word" is defined as the range between two delimiters
|
||||
// so the words in the example include [" ", "word", " ", "other", " "]
|
||||
// In accessibility (accessibilityMode = true),
|
||||
// a "word" includes the delimiters after a range of readable characters
|
||||
// so the words in the example include ["word ", "other "]
|
||||
// NOTE: the end anchor (this one) is exclusive, whereas the start anchor (GetWordStart) is inclusive
|
||||
|
||||
// Already at/past the limit. Can't move forward.
|
||||
const auto bufferSize{ GetSize() };
|
||||
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
|
||||
if (bufferSize.CompareInBounds(target, limit, true) >= 0)
|
||||
{
|
||||
return target;
|
||||
}
|
||||
|
||||
if (accessibilityMode)
|
||||
{
|
||||
return _GetWordEndForAccessibility(target, wordDelimiters, limit);
|
||||
}
|
||||
else
|
||||
{
|
||||
return _GetWordEndForSelection(target, wordDelimiters);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method for GetWordEnd(). Get the til::point for the beginning of the next READABLE word
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - limit - the last "valid" position in the text buffer (to improve performance)
|
||||
// Return Value:
|
||||
// - The til::point for the first character of the next readable "word". If no next word, return one past the end of the buffer
|
||||
til::point TextBuffer::_GetWordEndForAccessibility(const til::point target, const std::wstring_view wordDelimiters, const til::point limit) const
|
||||
{
|
||||
const auto bufferSize{ GetSize() };
|
||||
auto result{ target };
|
||||
|
||||
if (bufferSize.CompareInBounds(target, limit, true) >= 0)
|
||||
{
|
||||
// if we're already on/past the last RegularChar,
|
||||
// clamp result to that position
|
||||
result = limit;
|
||||
|
||||
// make the result exclusive
|
||||
bufferSize.IncrementInBounds(result, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (result != limit && result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == DelimiterClass::RegularChar)
|
||||
{
|
||||
// Iterate through readable text
|
||||
bufferSize.IncrementInBounds(result);
|
||||
}
|
||||
|
||||
while (result != limit && result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) != DelimiterClass::RegularChar)
|
||||
{
|
||||
// expand to the beginning of the NEXT word
|
||||
bufferSize.IncrementInBounds(result);
|
||||
}
|
||||
|
||||
// Special case: we tried to move one past the end of the buffer
|
||||
// Manually increment onto the EndExclusive point.
|
||||
if (result == bufferSize.BottomRightInclusive())
|
||||
{
|
||||
bufferSize.IncrementInBounds(result, true);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method for GetWordEnd(). Get the til::point for the beginning of the NEXT word
|
||||
// Arguments:
|
||||
// - target - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// Return Value:
|
||||
// - The til::point for the last character of the current word or delimiter run (stopped by right margin)
|
||||
til::point TextBuffer::_GetWordEndForSelection(const til::point target, const std::wstring_view wordDelimiters) const
|
||||
{
|
||||
const auto bufferSize = GetSize();
|
||||
|
||||
auto result = target;
|
||||
const auto initialDelimiter = _GetDelimiterClassAt(result, wordDelimiters);
|
||||
const bool isControlChar = initialDelimiter == DelimiterClass::ControlChar;
|
||||
|
||||
// expand right until we hit the right boundary as a ControlChar or a different delimiter class
|
||||
while (result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
|
||||
{
|
||||
if (result.x == bufferSize.RightInclusive())
|
||||
{
|
||||
// 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.IncrementInBounds(result);
|
||||
}
|
||||
|
||||
if (_GetDelimiterClassAt(result, wordDelimiters) != initialDelimiter)
|
||||
{
|
||||
// move off of delimiter
|
||||
bufferSize.DecrementInBounds(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void TextBuffer::_PruneHyperlinks()
|
||||
{
|
||||
// Check the old first row for hyperlink references
|
||||
@@ -1470,6 +1671,57 @@ void TextBuffer::_PruneHyperlinks()
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Update pos to be the position of the first character of the next word. This is used for accessibility
|
||||
// Arguments:
|
||||
// - pos - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
|
||||
// Return Value:
|
||||
// - true, if successfully updated pos. False, if we are unable to move (usually due to a buffer boundary)
|
||||
// - pos - The til::point for the first character on the "word" (inclusive)
|
||||
bool TextBuffer::MoveToNextWord(til::point& pos, const std::wstring_view wordDelimiters, std::optional<til::point> limitOptional) const
|
||||
{
|
||||
// move to the beginning of the next word
|
||||
// NOTE: _GetWordEnd...() returns the exclusive position of the "end of the word"
|
||||
// This is also the inclusive start of the next word.
|
||||
const auto bufferSize{ GetSize() };
|
||||
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
|
||||
const auto copy{ _GetWordEndForAccessibility(pos, wordDelimiters, limit) };
|
||||
|
||||
if (bufferSize.CompareInBounds(copy, limit, true) >= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
pos = copy;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Update pos to be the position of the first character of the previous word. This is used for accessibility
|
||||
// Arguments:
|
||||
// - pos - a til::point on the word you are currently on
|
||||
// - wordDelimiters - what characters are we considering for the separation of words
|
||||
// Return Value:
|
||||
// - true, if successfully updated pos. False, if we are unable to move (usually due to a buffer boundary)
|
||||
// - pos - The til::point for the first character on the "word" (inclusive)
|
||||
bool TextBuffer::MoveToPreviousWord(til::point& pos, std::wstring_view wordDelimiters) const
|
||||
{
|
||||
// move to the beginning of the current word
|
||||
auto copy{ GetWordStart(pos, wordDelimiters, true) };
|
||||
|
||||
if (!GetSize().DecrementInBounds(copy, true))
|
||||
{
|
||||
// can't move behind current word
|
||||
return false;
|
||||
}
|
||||
|
||||
// move to the beginning of the previous word
|
||||
pos = GetWordStart(copy, wordDelimiters, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Update pos to be the beginning of the current glyph/character. This is used for accessibility
|
||||
// Arguments:
|
||||
@@ -2724,7 +2976,7 @@ void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const View
|
||||
til::point newCursorPos;
|
||||
|
||||
// BODGY: We use oldCursorPos in two critical places below:
|
||||
// * To compute an oldHeight that includes, at a minimum, the cursor row
|
||||
// * To compute an oldHeight that includes at a minimum the cursor row
|
||||
// * For REFLOW_JANK_CURSOR_WRAP (see comment below)
|
||||
// Both of these would break the reflow algorithm, but the latter of the two in particular
|
||||
// would cause the main copy loop below to deadlock. In other words, these two lines
|
||||
@@ -2844,7 +3096,7 @@ void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const View
|
||||
// We don't need to be smart about this. Reset() is fast and shrinking doesn't occur often.
|
||||
if (newY >= newHeight && newX == 0)
|
||||
{
|
||||
// We need to ensure not to overwrite the row containing the cursor.
|
||||
// We need to ensure not to overwrite the row the cursor is on.
|
||||
if (newY >= newYLimit)
|
||||
{
|
||||
break;
|
||||
@@ -3527,34 +3779,3 @@ void TextBuffer::ManuallyMarkRowAsPrompt(til::CoordType y)
|
||||
attr.SetMarkAttributes(MarkKind::Prompt);
|
||||
}
|
||||
}
|
||||
|
||||
// This is an optimization used by the renderer to avoid scheduling a timer if not necessary;
|
||||
// unlike the renderer, we know the committed range of our own buffer.
|
||||
bool TextBuffer::ContainsBlinkAttributeInRegion(const Microsoft::Console::Types::Viewport& region) const
|
||||
{
|
||||
const auto top = region.Top();
|
||||
auto bottom = std::min(region.BottomInclusive(), _estimateOffsetOfLastCommittedRow());
|
||||
|
||||
for (auto row = top; row < bottom; ++row)
|
||||
{
|
||||
const auto& r = GetRowByOffset(row);
|
||||
for (const auto& attr : r.Attributes())
|
||||
{
|
||||
if (attr.IsBlinking())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TextBuffer::IsGlyphDoubleWidthAt(const til::point at) const
|
||||
{
|
||||
if (!_isRowCommitted(at.y)) [[unlikely]]
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return _getRow(at.y).DbcsAttrAt(at.x) != DbcsAttribute::Single;
|
||||
}
|
||||
|
||||
@@ -172,10 +172,15 @@ public:
|
||||
void TriggerNewTextNotification(const std::wstring_view newText);
|
||||
void TriggerSelection();
|
||||
|
||||
til::point GetWordStart(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
til::point GetWordEnd(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
til::point GetWordStart(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
til::point GetWordEnd(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
|
||||
til::point GetWordStart2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
til::point GetWordEnd2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
|
||||
bool IsWordBoundary(const til::point pos, const std::wstring_view wordDelimiters) const;
|
||||
bool MoveToNextWord(til::point& pos, const std::wstring_view wordDelimiters, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
bool MoveToPreviousWord(til::point& pos, const std::wstring_view wordDelimiters) const;
|
||||
|
||||
til::point GetGlyphStart(const til::point pos, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
til::point GetGlyphEnd(const til::point pos, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
|
||||
@@ -310,9 +315,6 @@ public:
|
||||
void SetScrollbarData(ScrollbarData mark, til::CoordType y);
|
||||
void ManuallyMarkRowAsPrompt(til::CoordType y);
|
||||
|
||||
bool ContainsBlinkAttributeInRegion(const Microsoft::Console::Types::Viewport& region) const;
|
||||
bool IsGlyphDoubleWidthAt(const til::point at) const;
|
||||
|
||||
private:
|
||||
void _reserve(til::size screenBufferSize, const TextAttribute& defaultAttributes);
|
||||
void _commit(const std::byte* row);
|
||||
@@ -322,13 +324,16 @@ private:
|
||||
ROW& _getRowByOffsetDirect(size_t offset);
|
||||
ROW& _getRow(til::CoordType y) const;
|
||||
til::CoordType _estimateOffsetOfLastCommittedRow() const noexcept;
|
||||
bool _isRowCommitted(til::CoordType y) const noexcept;
|
||||
|
||||
void _SetFirstRowIndex(const til::CoordType FirstRowIndex) noexcept;
|
||||
void _ExpandTextRow(til::inclusive_rect& selectionRow) const;
|
||||
DelimiterClass _GetDelimiterClassAt(const til::point pos, const std::wstring_view wordDelimiters) const;
|
||||
til::point _GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode = false) const;
|
||||
til::point _GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode = false) const;
|
||||
til::point _GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters) const;
|
||||
til::point _GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters) const;
|
||||
til::point _GetWordStartForAccessibility(const til::point target, const std::wstring_view wordDelimiters) const;
|
||||
til::point _GetWordStartForSelection(const til::point target, const std::wstring_view wordDelimiters) const;
|
||||
til::point _GetWordEndForAccessibility(const til::point target, const std::wstring_view wordDelimiters, const til::point limit) const;
|
||||
til::point _GetWordEndForSelection(const til::point target, const std::wstring_view wordDelimiters) const;
|
||||
void _PruneHyperlinks();
|
||||
|
||||
std::wstring _commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive, const bool clipAtCursor = false) const;
|
||||
|
||||
@@ -34,16 +34,6 @@ class UTextAdapterTests
|
||||
{
|
||||
TEST_CLASS(UTextAdapterTests);
|
||||
|
||||
TEST_CLASS_SETUP(ClassSetup)
|
||||
{
|
||||
wil::unique_hmodule icu{ LoadLibraryExW(L"icu.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32) };
|
||||
if (!icu)
|
||||
{
|
||||
WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"ICU is not present");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TEST_METHOD(Unicode)
|
||||
{
|
||||
DummyRenderer renderer;
|
||||
|
||||
@@ -26,9 +26,6 @@ TARGETLIBS = \
|
||||
$(CONSOLE_OBJ_PATH)\types\lib\$(O)\ConTypes.lib \
|
||||
$(TARGETLIBS) \
|
||||
|
||||
DELAYLOAD = \
|
||||
icu.dll \
|
||||
|
||||
# -------------------------------------
|
||||
# Localization
|
||||
# -------------------------------------
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<!-- Blank the SourceProject here to vend all files into the root of the package. -->
|
||||
<SourceProject>
|
||||
</SourceProject>
|
||||
<!-- Replace the filename for wt/wtd.exe with the one that the manifest wants. -->
|
||||
<!-- Replace the filename for wt/wtd.exe with the one the manifest wants. -->
|
||||
<TargetPath Condition="'%(Filename)' == 'wt' and '%(Extension)' == '.exe'">$(OCExecutionAliasName).exe</TargetPath>
|
||||
</_FilteredNonWapProjProjectOutput>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -741,7 +741,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void SettingsTests::TestNestedInIterableCommand()
|
||||
{
|
||||
// This test checks an iterable command that includes a nested command.
|
||||
// This test checks a iterable command that includes a nested command.
|
||||
// The commands should look like:
|
||||
//
|
||||
// <Command Palette>
|
||||
|
||||
@@ -308,11 +308,6 @@ namespace TerminalAppLocalTests
|
||||
// TerminalPage and not only create them successfully, but also create a
|
||||
// tab using those settings successfully.
|
||||
|
||||
// - - - IMPORTANT - - -
|
||||
// GH#14623: "closeOnExit": "never" is important for all test profiles. Without
|
||||
// it, the spawned process exits immediately in the UAP test environment,
|
||||
// and the default "automatic" close-on-exit behavior removes the
|
||||
// tab/pane asynchronously, racing against test assertions.
|
||||
static constexpr std::wstring_view settingsJson0{ LR"(
|
||||
{
|
||||
"defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
@@ -320,14 +315,12 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
"name" : "profile0",
|
||||
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 1,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 1
|
||||
},
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -354,6 +347,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TryDuplicateBadTab()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
// * Create a tab with a profile with GUID 1
|
||||
// * Reload the settings so that GUID 1 is no longer in the list of profiles
|
||||
// * Try calling _DuplicateFocusedTab on tab 1
|
||||
@@ -368,14 +365,12 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
"name" : "profile0",
|
||||
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 1,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 1
|
||||
},
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -387,8 +382,7 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -444,6 +438,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TryDuplicateBadPane()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
// * Create a tab with a profile with GUID 1
|
||||
// * Reload the settings so that GUID 1 is no longer in the list of profiles
|
||||
// * Try calling _SplitPane(Duplicate) on tab 1
|
||||
@@ -458,14 +456,12 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
"name" : "profile0",
|
||||
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 1,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 1
|
||||
},
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -477,8 +473,7 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -577,29 +572,25 @@ namespace TerminalAppLocalTests
|
||||
"name" : "profile0",
|
||||
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 0",
|
||||
"historySize": 1,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 1
|
||||
},
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 1",
|
||||
"historySize": 2,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 2
|
||||
},
|
||||
{
|
||||
"name" : "profile2",
|
||||
"guid": "{6239a42c-3333-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 2",
|
||||
"historySize": 3,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 3
|
||||
},
|
||||
{
|
||||
"name" : "profile3",
|
||||
"guid": "{6239a42c-4444-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 3",
|
||||
"historySize": 4,
|
||||
"closeOnExit": "never"
|
||||
"historySize": 4
|
||||
}
|
||||
],
|
||||
"schemes":
|
||||
@@ -702,6 +693,7 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
@@ -741,6 +733,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::MoveFocusFromZoomedPane()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
Log::Comment(L"Create a second pane");
|
||||
@@ -786,6 +782,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::CloseZoomedPane()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
Log::Comment(L"Create a second pane");
|
||||
@@ -841,6 +841,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::SwapPanes()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
Log::Comment(L"Setup 4 panes.");
|
||||
@@ -1047,31 +1051,31 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::NextMRUTab()
|
||||
{
|
||||
// This is a test for GH#8025 - we want to make sure that MRU tab
|
||||
// ordering works correctly and that in-order/disabled switching works.
|
||||
//
|
||||
// Note: We test MRU ordering directly rather than going through the
|
||||
// command palette tab switcher, because the palette's anchor key
|
||||
// handling auto-dismisses when no modifier keys are held (which we
|
||||
// can't simulate in the test environment).
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
// This is a test for GH#8025 - we want to make sure that we can do both
|
||||
// in-order and MRU tab traversal, using the tab switcher and with the
|
||||
// tab switcher disabled.
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
Log::Comment(L"Create Tab[1]");
|
||||
Log::Comment(L"Create a second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 1 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
});
|
||||
VERIFY_ARE_EQUAL(2u, page->_tabs.Size());
|
||||
|
||||
Log::Comment(L"Create Tab[2]");
|
||||
Log::Comment(L"Create a third tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 2 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
});
|
||||
VERIFY_ARE_EQUAL(3u, page->_tabs.Size());
|
||||
|
||||
Log::Comment(L"Create Tab[3]");
|
||||
Log::Comment(L"Create a fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 3 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
@@ -1080,89 +1084,99 @@ namespace TerminalAppLocalTests
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify Tab[3] is focused");
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Select Tab[1]");
|
||||
Log::Comment(L"Select the second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectTab(1);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify Tab[1] is focused");
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify the second tab is the focused one");
|
||||
});
|
||||
|
||||
// MRU order should now be: Tab[1], Tab[3], Tab[2], Tab[0]
|
||||
// Verify the MRU list directly.
|
||||
Log::Comment(L"Verify MRU order: MRU[0]=Tab[1], MRU[1]=Tab[3]");
|
||||
Log::Comment(L"Change the tab switch order to MRU switching");
|
||||
TestOnUIThread([&page]() {
|
||||
VERIFY_ARE_EQUAL(4u, page->_mruTabs.Size());
|
||||
uint32_t mruIdx;
|
||||
page->_tabs.IndexOf(page->_mruTabs.GetAt(0), mruIdx);
|
||||
VERIFY_ARE_EQUAL(1u, mruIdx, L"MRU[0] should be Tab[1] (most recent)");
|
||||
page->_tabs.IndexOf(page->_mruTabs.GetAt(1), mruIdx);
|
||||
VERIFY_ARE_EQUAL(3u, mruIdx, L"MRU[1] should be Tab[3] (last tab added)");
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::MostRecentlyUsed);
|
||||
});
|
||||
|
||||
Log::Comment(L"Select MRU[1]=Tab[3] directly");
|
||||
Log::Comment(L"Switch to the next MRU tab, which is the fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
// The next MRU tab after Tab[1] is Tab[3]
|
||||
uint32_t nextMruIdx;
|
||||
page->_tabs.IndexOf(page->_mruTabs.GetAt(1), nextMruIdx);
|
||||
page->_SelectTab(nextMruIdx);
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
});
|
||||
|
||||
Log::Comment(L"Sleep to let events propagate");
|
||||
Sleep(250);
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
Log::Comment(L"Hide the command palette, to confirm the selection");
|
||||
// If you don't do this, the palette will just stay open, and the
|
||||
// next time we call _HandleNextTab, we'll continue traversing the
|
||||
// MRU list, instead of just hoping one entry.
|
||||
page->LoadCommandPalette().Visibility(Visibility::Collapsed);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify Tab[3] is focused");
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Select MRU[1]=Tab[1] directly");
|
||||
Log::Comment(L"Switch to the next MRU tab, which is the second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t nextMruIdx;
|
||||
page->_tabs.IndexOf(page->_mruTabs.GetAt(1), nextMruIdx);
|
||||
page->_SelectTab(nextMruIdx);
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
});
|
||||
|
||||
Log::Comment(L"Sleep to let events propagate");
|
||||
Sleep(250);
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
Log::Comment(L"Hide the command palette, to confirm the selection");
|
||||
// If you don't do this, the palette will just stay open, and the
|
||||
// next time we call _HandleNextTab, we'll continue traversing the
|
||||
// MRU list, instead of just hoping one entry.
|
||||
page->LoadCommandPalette().Visibility(Visibility::Collapsed);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify Tab[1] is focused");
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify the second tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Change the tab switch order to in-order switching");
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::InOrder);
|
||||
|
||||
Log::Comment(L"Switch to the next in-order tab, which is the third tab");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
});
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(2u, focusedIndex, L"Verify the third tab is the focused one");
|
||||
});
|
||||
|
||||
// The Disabled tab switcher mode uses direct index-based switching
|
||||
// without the command palette, so it works in the test environment.
|
||||
Log::Comment(L"Change the tab switch order to not use the tab switcher (which is in-order always)");
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::Disabled);
|
||||
|
||||
Log::Comment(L"Switch to the next in-order tab: Tab[2]");
|
||||
Log::Comment(L"Switch to the next in-order tab, which is the fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
});
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(2u, focusedIndex, L"Verify Tab[2] is focused");
|
||||
});
|
||||
|
||||
Log::Comment(L"Switch to the next in-order tab: Tab[3]");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
});
|
||||
TestOnUIThread([&page]() {
|
||||
auto focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify Tab[3] is focused");
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
}
|
||||
|
||||
void TabTests::VerifyCommandPaletteTabSwitcherOrder()
|
||||
{
|
||||
// This is a test for GH#8188 - we want to make sure that the MRU
|
||||
// ordering is correctly maintained as tabs are selected.
|
||||
//
|
||||
// Note: We verify MRU ordering directly rather than going through
|
||||
// the command palette tab switcher, because the palette's anchor key
|
||||
// handling auto-dismisses when no modifier keys are held (which we
|
||||
// can't simulate in the test environment).
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
// This is a test for GH#8188 - we want to make sure that the order of tabs
|
||||
// is preserved in the CommandPalette's TabSwitcher
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
@@ -1175,7 +1189,7 @@ namespace TerminalAppLocalTests
|
||||
});
|
||||
VERIFY_ARE_EQUAL(4u, page->_mruTabs.Size());
|
||||
|
||||
Log::Comment(L"give alphabetical names to all tabs");
|
||||
Log::Comment(L"give alphabetical names to all switch tab actions");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_GetTabImpl(page->_tabs.GetAt(0))->Title(L"a");
|
||||
});
|
||||
@@ -1197,14 +1211,18 @@ namespace TerminalAppLocalTests
|
||||
VERIFY_ARE_EQUAL(L"c", page->_tabs.GetAt(2).Title());
|
||||
VERIFY_ARE_EQUAL(L"d", page->_tabs.GetAt(3).Title());
|
||||
|
||||
// MRU order after creating Tab[0]-Tab[3]: MRU[0]=Tab[3], MRU[3]=Tab[0]
|
||||
VERIFY_ARE_EQUAL(L"d", page->_mruTabs.GetAt(0).Title());
|
||||
VERIFY_ARE_EQUAL(L"c", page->_mruTabs.GetAt(1).Title());
|
||||
VERIFY_ARE_EQUAL(L"b", page->_mruTabs.GetAt(2).Title());
|
||||
VERIFY_ARE_EQUAL(L"a", page->_mruTabs.GetAt(3).Title());
|
||||
});
|
||||
|
||||
Log::Comment(L"Select Tab[0] through Tab[3] to establish MRU order");
|
||||
Log::Comment(L"Change the tab switch order to MRU switching");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::MostRecentlyUsed);
|
||||
});
|
||||
|
||||
Log::Comment(L"Select the tabs from 0 to 3");
|
||||
RunOnUIThread([&page]() {
|
||||
page->_UpdatedSelectedTab(page->_tabs.GetAt(0));
|
||||
page->_UpdatedSelectedTab(page->_tabs.GetAt(1));
|
||||
@@ -1212,31 +1230,47 @@ namespace TerminalAppLocalTests
|
||||
page->_UpdatedSelectedTab(page->_tabs.GetAt(3));
|
||||
});
|
||||
|
||||
Log::Comment(L"Verify MRU order: MRU[0]='d', MRU[1]='c', MRU[2]='b', MRU[3]='a'");
|
||||
VERIFY_ARE_EQUAL(4u, page->_mruTabs.Size());
|
||||
VERIFY_ARE_EQUAL(L"d", page->_mruTabs.GetAt(0).Title());
|
||||
VERIFY_ARE_EQUAL(L"c", page->_mruTabs.GetAt(1).Title());
|
||||
VERIFY_ARE_EQUAL(L"b", page->_mruTabs.GetAt(2).Title());
|
||||
VERIFY_ARE_EQUAL(L"a", page->_mruTabs.GetAt(3).Title());
|
||||
|
||||
Log::Comment(L"Select Tab[2]='c' (MRU[1] after 'd')");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectTab(2);
|
||||
Log::Comment(L"Switch to the next MRU tab, which is the third tab");
|
||||
RunOnUIThread([&page]() {
|
||||
page->_SelectNextTab(true, nullptr);
|
||||
// In the course of a single tick, the Command Palette will:
|
||||
// * open
|
||||
// * select the proper tab from the mru's list
|
||||
// * raise an event for _filteredActionsView().SelectionChanged to
|
||||
// immediately preview the new tab
|
||||
// * raise a _SwitchToTabRequestedHandlers event
|
||||
// * then dismiss itself, because we can't fake holing down an
|
||||
// anchor key in the tests
|
||||
});
|
||||
|
||||
Log::Comment(L"Verify MRU order updated: MRU[0]='c', MRU[1]='d', MRU[2]='b', MRU[3]='a'");
|
||||
TestOnUIThread([&page]() {
|
||||
VERIFY_ARE_EQUAL(L"c", page->_mruTabs.GetAt(0).Title());
|
||||
VERIFY_ARE_EQUAL(L"d", page->_mruTabs.GetAt(1).Title());
|
||||
VERIFY_ARE_EQUAL(L"b", page->_mruTabs.GetAt(2).Title());
|
||||
VERIFY_ARE_EQUAL(L"a", page->_mruTabs.GetAt(3).Title());
|
||||
});
|
||||
|
||||
const auto palette = winrt::get_self<winrt::TerminalApp::implementation::CommandPalette>(page->LoadCommandPalette());
|
||||
|
||||
VERIFY_ARE_EQUAL(winrt::TerminalApp::implementation::CommandPaletteMode::TabSwitchMode, palette->_currentMode, L"Verify we are in the tab switcher mode");
|
||||
// At this point, the contents of the command palette's _mruTabs list is
|
||||
// still the _old_ ordering (d, c, b, a). The ordering is only updated
|
||||
// in TerminalPage::_SelectNextTab, but as we saw before, the palette
|
||||
// will also dismiss itself immediately when that's called. So we can't
|
||||
// really inspect the contents of the list in this test, unfortunately.
|
||||
}
|
||||
|
||||
void TabTests::TestWindowRenameSuccessful()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
@@ -1269,6 +1303,7 @@ namespace TerminalAppLocalTests
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
auto page = _commonSetup();
|
||||
@@ -1301,6 +1336,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TestPreviewCommitScheme()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
Log::Comment(L"Preview a color scheme. Make sure it's applied, then committed accordingly");
|
||||
|
||||
auto page = _commonSetup();
|
||||
@@ -1363,6 +1402,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TestPreviewDismissScheme()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
Log::Comment(L"Preview a color scheme. Make sure it's applied, then dismissed accordingly");
|
||||
|
||||
auto page = _commonSetup();
|
||||
@@ -1411,6 +1454,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TestPreviewSchemeWhilePreviewing()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
Log::Comment(L"Preview a color scheme, then preview another scheme. ");
|
||||
|
||||
Log::Comment(L"Preview a color scheme. Make sure it's applied, then committed accordingly");
|
||||
@@ -1478,6 +1525,10 @@ namespace TerminalAppLocalTests
|
||||
|
||||
void TabTests::TestClampSwitchToTab()
|
||||
{
|
||||
BEGIN_TEST_METHOD_PROPERTIES()
|
||||
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
|
||||
END_TEST_METHOD_PROPERTIES()
|
||||
|
||||
Log::Comment(L"Test that switching to a tab index higher than the number of tabs just clamps to the last tab.");
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
ResourceKey="TabViewBackground" />
|
||||
|
||||
<SolidColorBrush x:Key="SettingsUiTabBrush"
|
||||
Color="#282828" />
|
||||
Color="#0c0c0c" />
|
||||
|
||||
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
|
||||
Color="{StaticResource SystemAccentColorDark2}" />
|
||||
@@ -211,7 +211,7 @@
|
||||
ResourceKey="TabViewBackground" />
|
||||
|
||||
<SolidColorBrush x:Key="SettingsUiTabBrush"
|
||||
Color="#F9F9F9" />
|
||||
Color="#ffffff" />
|
||||
|
||||
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
|
||||
Color="{StaticResource SystemAccentColorLight2}" />
|
||||
@@ -234,7 +234,7 @@
|
||||
ResourceKey="SystemColorButtonFaceColorBrush" />
|
||||
|
||||
<StaticResource x:Key="SettingsUiTabBrush"
|
||||
ResourceKey="SystemColorWindowBrush" />
|
||||
ResourceKey="SystemControlBackgroundBaseLowBrush" />
|
||||
|
||||
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
|
||||
Color="{StaticResource SystemColorHighlightColor}" />
|
||||
|
||||
@@ -185,8 +185,7 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (const auto termControl{ _senderOrActiveControl(sender) })
|
||||
{
|
||||
const auto broadcastGroup{ _getBroadcastGroupFromControl(termControl) };
|
||||
_writeInputStringToBroadcastGroup(broadcastGroup, realArgs.Input(), WriteInputStringType::Raw);
|
||||
termControl.SendInput(realArgs.Input());
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
@@ -453,11 +452,8 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandlePasteText(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
if (const auto& control{ _GetActiveControl() })
|
||||
{
|
||||
_PasteFromClipboardHandler(control, nullptr);
|
||||
args.Handled(true);
|
||||
}
|
||||
_PasteText();
|
||||
args.Handled(true);
|
||||
}
|
||||
|
||||
void TerminalPage::_HandleNewTab(const IInspectable& /*sender*/,
|
||||
@@ -1479,7 +1475,7 @@ namespace winrt::TerminalApp::implementation
|
||||
WI_IsAnyFlagSet(source, SuggestionsSource::CommandHistory | SuggestionsSource::QuickFixes);
|
||||
if (const auto& control{ _GetActiveControl() })
|
||||
{
|
||||
currentWorkingDirectory = control.WorkingDirectory();
|
||||
currentWorkingDirectory = control.CurrentWorkingDirectory();
|
||||
|
||||
if (shouldGetContext)
|
||||
{
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Registers for changes to the settings folder and upon an updated settings
|
||||
// - Registers for changes to the settings folder and upon a updated settings
|
||||
// profile calls ReloadSettings().
|
||||
// Arguments:
|
||||
// - <none>
|
||||
@@ -307,7 +307,7 @@ namespace winrt::TerminalApp::implementation
|
||||
settingsPath.parent_path().c_str(),
|
||||
false,
|
||||
// We want file modifications, AND when files are renamed to be
|
||||
// settings.json. This second case will often happen with text
|
||||
// settings.json. This second case will oftentimes happen with text
|
||||
// editors, who will write a temp file, then rename it to be the
|
||||
// actual file you wrote. So listen for that too.
|
||||
wil::FolderChangeEvents::FileName | wil::FolderChangeEvents::LastWriteTime,
|
||||
|
||||
@@ -741,10 +741,10 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method to run a command, switch to a tab, or retrieve the
|
||||
// action from a user selected command and dispatch that command.
|
||||
// Also fires a tracelogging event indicating that the user successfully
|
||||
// found the action they were looking for.
|
||||
// - Helper method for retrieving the action from a command the user
|
||||
// selected, and dispatching that command. Also fires a tracelogging event
|
||||
// indicating that the user successfully found the action they were
|
||||
// looking for.
|
||||
// Arguments:
|
||||
// - command: the Command to dispatch. This might be null.
|
||||
// Return Value:
|
||||
@@ -791,7 +791,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_close();
|
||||
|
||||
// But make an exception for the Toggle Command Palette action: we don't want the dispatch
|
||||
// to make the command palette - that was just closed - visible again.
|
||||
// make the command palette - that was just closed - visible again.
|
||||
// All other actions can just be dispatched.
|
||||
if (command.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette)
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ Pane::BuildStartupState Pane::BuildStartupActions(uint32_t currentId, uint32_t n
|
||||
ActionAndArgs actionAndArgs;
|
||||
actionAndArgs.Action(ShortcutAction::SplitPane);
|
||||
const auto terminalArgs{ newPane->GetTerminalArgsForPane(kind) };
|
||||
// When creating a pane, the split size is the size of the new pane
|
||||
// When creating a pane the split size is the size of the new pane
|
||||
// and not position.
|
||||
const auto splitDirection = _splitState == SplitState::Horizontal ? SplitDirection::Down : SplitDirection::Right;
|
||||
const auto splitSize = (kind != BuildStartupKind::None && _IsLeaf() ? 0.5f : 1.0f - _desiredSplitPosition);
|
||||
@@ -2264,7 +2264,7 @@ SplitState Pane::_convertAutomaticOrDirectionalSplitState(const SplitDirection&
|
||||
// creates a new Pane to host the control, registers event handlers.
|
||||
// Arguments:
|
||||
// - splitType: what type of split we should create.
|
||||
// - splitSize: the fraction of the pane that the new pane should get
|
||||
// - splitSize: what fraction of the pane the new pane should get
|
||||
// - newPane: the pane to add as a child
|
||||
// Return Value:
|
||||
// - The two newly created Panes, with the original pane as the first pane.
|
||||
@@ -3044,15 +3044,14 @@ void Pane::BroadcastChar(const winrt::Microsoft::Terminal::Control::TermControl&
|
||||
}
|
||||
|
||||
void Pane::BroadcastString(const winrt::Microsoft::Terminal::Control::TermControl& sourceControl,
|
||||
const winrt::hstring& text,
|
||||
const winrt::Microsoft::Terminal::Control::WriteInputStringType type)
|
||||
const winrt::hstring& text)
|
||||
{
|
||||
WalkTree([&](const auto& pane) {
|
||||
if (const auto& termControl{ pane->GetTerminalControl() })
|
||||
{
|
||||
if (termControl != sourceControl && !termControl.ReadOnly())
|
||||
{
|
||||
termControl.WriteInputString(text, type);
|
||||
termControl.RawWriteString(text);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
void EnableBroadcast(bool enabled);
|
||||
void BroadcastKey(const winrt::Microsoft::Terminal::Control::TermControl& sourceControl, const WORD vkey, const WORD scanCode, const winrt::Microsoft::Terminal::Core::ControlKeyStates modifiers, const bool keyDown);
|
||||
void BroadcastChar(const winrt::Microsoft::Terminal::Control::TermControl& sourceControl, const wchar_t vkey, const WORD scanCode, const winrt::Microsoft::Terminal::Core::ControlKeyStates modifiers);
|
||||
void BroadcastString(const winrt::Microsoft::Terminal::Control::TermControl& sourceControl, const winrt::hstring& text, const winrt::Microsoft::Terminal::Control::WriteInputStringType type);
|
||||
void BroadcastString(const winrt::Microsoft::Terminal::Control::TermControl& sourceControl, const winrt::hstring& text);
|
||||
|
||||
void UpdateResources(const PaneResources& resources);
|
||||
|
||||
|
||||
@@ -672,15 +672,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Dieser Linktyp wird derzeit nicht unterstützt:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Dieser Link kann zu einem unsicheren Speicherort führen. Links können ihren Computer und Ihre Daten beschädigen. Klicken Sie zum Schutz Des Computers nur auf Links aus vertrauenswürdigen Quellen.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Trotzdem öffnen</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Einstellungen</value>
|
||||
</data>
|
||||
@@ -854,11 +848,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Der aktive Bereich wurde auf die Registerkarte „{0}“ verschoben</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Registerkarte „{0}“ wurde in das Fenster „{1}“ verschoben</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Registerkarte „{0}“ in neues Fenster verschoben</value>
|
||||
@@ -870,7 +864,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Der aktive Bereich wurde in das Fenster "{0}" verschoben</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Aktiver Bereich in neues Fenster verschoben</value>
|
||||
|
||||
@@ -514,6 +514,27 @@
|
||||
<data name="CloseAllDialog.Title" xml:space="preserve">
|
||||
<value>Do you want to close all tabs?</value>
|
||||
</data>
|
||||
<data name="CloseTabDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="CloseTabDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Close tab</value>
|
||||
</data>
|
||||
<data name="CloseTabDialog.Title" xml:space="preserve">
|
||||
<value>Do you want to close this tab?</value>
|
||||
</data>
|
||||
<data name="ClosePaneDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="ClosePaneDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Close pane</value>
|
||||
</data>
|
||||
<data name="ClosePaneDialog.Title" xml:space="preserve">
|
||||
<value>Do you want to close this pane?</value>
|
||||
</data>
|
||||
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
|
||||
<value>Don't ask me again</value>
|
||||
</data>
|
||||
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
@@ -669,15 +690,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>This link type is currently not supported:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>This link may lead to an unsafe location. Hyperlinks can be harmful to your computer and data. To protect your computer, only click links from trusted sources.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Open anyway</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
@@ -851,11 +866,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Active pane moved to "{0}" tab</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" tab moved to "{1}" window</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" tab moved to new window</value>
|
||||
@@ -867,7 +882,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Active pane moved to "{0}" window</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Active pane moved to new window</value>
|
||||
@@ -929,12 +944,4 @@
|
||||
<data name="InvalidRegex" xml:space="preserve">
|
||||
<value>An invalid regular expression was found.</value>
|
||||
</data>
|
||||
<data name="DragFileCaption" xml:space="preserve">
|
||||
<value>Paste path to file</value>
|
||||
<comment>The displayed caption for dragging a file onto a terminal.</comment>
|
||||
</data>
|
||||
<data name="DragTextCaption" xml:space="preserve">
|
||||
<value>Paste text</value>
|
||||
<comment>The displayed caption for dragging text onto a terminal.</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Este tipo de vínculo no se admite actualmente:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Cancelar</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Este vínculo puede dar lugar a una ubicación no segura. Los hipervínculos pueden ser perjudiciales para el equipo y los datos. Para proteger el equipo, haga clic solo en vínculos de orígenes de confianza.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Abrir de todas formas</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Configuración</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Panel activo movido a la pestaña "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>La pestaña "{0}" se ha movido a la ventana "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>La pestaña "{0}" se ha movido a la nueva ventana</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Panel activo movido a la ventana "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Panel activo movido a nueva ventana</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ce type de lien n’est actuellement pas pris en charge :</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Annuler</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ce lien peut entraîner un emplacement non sécurisé. Les liens hypertexte peuvent endommager votre ordinateur et vos données. Pour protéger votre ordinateur, cliquez uniquement sur des liens provenant de sources fiables.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Ouvrir quand même</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Paramètres</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers l’onglet « {0} »</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Onglet « {0} » déplacé vers la fenêtre « {1} »</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Onglet « {0} » déplacé vers une nouvelle fenêtre</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers l’onglet « {0} »</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers une nouvelle fenêtre</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Questo tipo di collegamento non è al momento supportato:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Annulla</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Questo collegamento potrebbe causare un percorso non sicuro. I collegamenti ipertestuali possono essere dannosi per il computer e i dati. Per proteggere il computer, fare clic solo su collegamenti da origini attendibili.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Apri comunque</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Impostazioni</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato nella scheda "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Scheda "{0}" spostata nella finestra "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Scheda "{0}" spostata in una nuova finestra</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato nella finestra "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato in una nuova finestra</value>
|
||||
|
||||
@@ -670,15 +670,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>このリンクの種類は現在サポートされていません:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>キャンセル</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>このリンクは安全でない可能性があります。ハイパーリンクは、コンピューターやデータに問題を起こす可能性があります。コンピューターを保護するには、信頼できるソースからのリンクのみをクリックしてください。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>開く</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>設定</value>
|
||||
</data>
|
||||
@@ -852,11 +846,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>アクティブなペインを [{0}] タブに移動しました</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>[{0}] タブを "{1}" ウィンドウに移動しました</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>[{0}] タブを新しいウィンドウに移動しました</value>
|
||||
@@ -868,7 +862,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>アクティブなペインを "{0}" ウィンドウに移動しました</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>アクティブなペインを新しいウィンドウに移動しました</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>이 링크 형식은 현재 지원되지 않습니다.</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>취소</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>이 링크로 인해 안전하지 않은 위치가 발생할 수 있습니다. 하이퍼링크는 컴퓨터와 데이터를 손상시킬 수 있습니다. 컴퓨터를 보호하려면 신뢰할 수 있는 원본의 링크만 클릭하세요.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>열기</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>설정</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>활성 창이 "{0}" 탭으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" 탭이 "{1}" 창으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" 탭이 새 창으로 이동됨</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>활성 창이 "{0}" 창으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>활성 창이 새 창으로 이동됨</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Não há suporte para este tipo de link no momento:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Cancelar</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Este link pode levar a um local não seguro. Hiperlinks podem ser prejudiciais ao computador e aos dados. Para proteger o computador, clique somente em links de fontes confiáveis.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Abrir mesmo assim</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Configurações</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Painel ativo movido para a guia "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Guia "{0}" movida para janela "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Guia "{0}" movida para nova janela</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Painel ativo movido para a janela "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Painel ativo movido para nova janela</value>
|
||||
|
||||
@@ -669,14 +669,8 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,14 +669,8 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,14 +669,8 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Этот тип связи в настоящее время не поддерживается:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Отмена</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Эта ссылка может привести к небезопасному расположению. Гиперссылки могут нанести вред компьютеру и данным. Чтобы защитить компьютер, щелкните ссылки только из надежных источников.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Все равно открыть</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Параметры</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Активная область перемещена на вкладку "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Вкладка "{0}" перемещена в окно "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Вкладка "{0}" перемещена в новое окно</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Активная область перемещена в окно "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Активная область перемещена в новое окно</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>当前不支持此链接类型:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>取消</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>此链接可能会导致不安全的位置。超链接可能对你的计算机和数据有害。若要保护你的计算机,请仅单击来自受信任源的链接。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>仍然打开</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>设置</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>活动窗格已移动到“{0}”选项卡</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>“{0}”选项卡已移动到“{1}”窗口</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>“{0}”选项卡已移动到新窗口</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>活动窗格已移动到“{0}”选项卡</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>活动窗格已移动到新窗口</value>
|
||||
|
||||
@@ -669,15 +669,9 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>目前不支援此連結類型:</value>
|
||||
</data>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>取消</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>此連結可能通往不安全地點。超連結可能對你的電腦和資料造成傷害。為了保護你的電腦,只點擊來自可信來源的連結。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>一律開啟</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>設定</value>
|
||||
</data>
|
||||
@@ -851,11 +845,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>活動窗格已移動至「{0}」索引標籤</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>「{0}」索引標籤已移至「{1}」視窗</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>「{0}」索引標籤已移至新視窗</value>
|
||||
@@ -867,7 +861,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>活動窗格已移動至「{0}」視窗</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>活動窗格已移至新視窗</value>
|
||||
|
||||
@@ -686,8 +686,8 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper method to retrieve the action from the user selected command,
|
||||
// and dispatch that command. Also fires a tracelogging event
|
||||
// - Helper method for retrieving the action from a command the user
|
||||
// selected, and dispatching that command. Also fires a tracelogging event
|
||||
// indicating that the user successfully found the action they were
|
||||
// looking for.
|
||||
// Arguments:
|
||||
|
||||
@@ -654,7 +654,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
_activePane = original;
|
||||
|
||||
// Add event handlers to the new panes' GotFocus event. When the pane
|
||||
// Add a event handlers to the new panes' GotFocus event. When the pane
|
||||
// gains focus, we'll mark it as the new active pane.
|
||||
_AttachEventHandlersToPane(original);
|
||||
|
||||
@@ -2098,7 +2098,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Method Description:
|
||||
// - Calculates if the tab is read-only.
|
||||
// The tab is considered read-only if one of the panes is read-only.
|
||||
// If, after the calculation, the tab is read-only we hide the close button on the tab view item
|
||||
// If after the calculation the tab is read-only we hide the close button on the tab view item
|
||||
void Tab::_RecalculateAndApplyReadOnly()
|
||||
{
|
||||
const auto control = GetActiveTerminalControl();
|
||||
@@ -2125,7 +2125,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Method Description:
|
||||
// - Creates a text for the title run in the tool tip by returning tab title
|
||||
// or <profile name>: <tab title> if the profile name differs from the title
|
||||
// or <profile name>: <tab title> in the case the profile name differs from the title
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
@@ -2174,6 +2174,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Always clear out old ones, just in case.
|
||||
events.KeySent.revoke();
|
||||
events.CharSent.revoke();
|
||||
events.StringSent.revoke();
|
||||
|
||||
if (newIsBroadcasting)
|
||||
{
|
||||
@@ -2214,6 +2215,17 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
events.StringSent = termControl.StringSent(winrt::auto_revoke, [weakThis](auto&& sender, auto&& e) {
|
||||
if (const auto tab{ weakThis.get() })
|
||||
{
|
||||
if (tab->_tabStatus.IsInputBroadcastActive())
|
||||
{
|
||||
tab->_rootPane->BroadcastString(sender.try_as<TermControl>(),
|
||||
e.Text());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Tab::ThemeColor(const winrt::Microsoft::Terminal::Settings::Model::ThemeColor& focused,
|
||||
@@ -2341,7 +2353,7 @@ namespace winrt::TerminalApp::implementation
|
||||
auto deselectedTabColor = color.with_alpha(77); // 255 * .3 = 77
|
||||
|
||||
// If we DON'T have a color set from the color picker, or the profile's
|
||||
// tabColor, but if we have an unfocused color in the theme, use the
|
||||
// tabColor, but we do have a unfocused color in the theme, use the
|
||||
// unfocused theme color here instead.
|
||||
if (!GetTabColor().has_value() &&
|
||||
_unfocusedThemeColor != nullptr)
|
||||
|
||||
@@ -186,6 +186,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// These events literally only apply if the content is a TermControl.
|
||||
winrt::Microsoft::Terminal::Control::TermControl::KeySent_revoker KeySent;
|
||||
winrt::Microsoft::Terminal::Control::TermControl::CharSent_revoker CharSent;
|
||||
winrt::Microsoft::Terminal::Control::TermControl::StringSent_revoker StringSent;
|
||||
|
||||
winrt::TerminalApp::TerminalPaneContent::RestartTerminalRequested_revoker RestartTerminalRequested;
|
||||
};
|
||||
|
||||
@@ -413,6 +413,51 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we should warn before closing this tab based on the
|
||||
// confirmCloseOn flags (e.g. multiple panes, always, etc.)
|
||||
{
|
||||
const auto tabImpl = _GetTabImpl(tab);
|
||||
const auto reason = tabImpl ? _ShouldWarnOnCloseTab(tabImpl) : ConfirmCloseOn::Never;
|
||||
if (reason != ConfirmCloseOn::Never)
|
||||
{
|
||||
const auto weak = get_weak();
|
||||
|
||||
// Show the "don't ask me again" checkbox only when the dialog
|
||||
// is triggered by conditional flags (not just Always).
|
||||
const auto conditionalFlags = reason & ~ConfirmCloseOn::Always;
|
||||
const auto showCheckbox = conditionalFlags != ConfirmCloseOn::Never;
|
||||
|
||||
// Load the dialog (triggers x:Load) so we can configure the
|
||||
// checkbox before showing it.
|
||||
const auto dialog = FindName(L"CloseTabDialog").try_as<ContentDialog>();
|
||||
const auto checkbox = dialog ? dialog.Content().try_as<CheckBox>() : nullptr;
|
||||
if (checkbox)
|
||||
{
|
||||
checkbox.IsChecked(false);
|
||||
checkbox.Visibility(showCheckbox ? Visibility::Visible : Visibility::Collapsed);
|
||||
}
|
||||
|
||||
auto warningResult = co_await _ShowCloseTabWarningDialog();
|
||||
|
||||
strong = weak.get();
|
||||
|
||||
if (!strong || warningResult != ContentDialogResult::Primary)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
|
||||
// Persist dismissal if the user checked "don't ask me again"
|
||||
if (showCheckbox && checkbox && checkbox.IsChecked().Value())
|
||||
{
|
||||
const auto state = ApplicationState::SharedInstance();
|
||||
if (WI_IsFlagSet(reason, ConfirmCloseOn::MultiplePanes))
|
||||
{
|
||||
state.DismissedConfirmCloseMultiplePanes(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto t = winrt::get_self<implementation::Tab>(tab);
|
||||
auto actions = t->BuildStartupActions(BuildStartupKind::None);
|
||||
_AddPreviouslyClosedPaneOrTab(std::move(actions));
|
||||
@@ -782,6 +827,32 @@ namespace winrt::TerminalApp::implementation
|
||||
if (const auto pane{ activeTab->GetActivePane() })
|
||||
{
|
||||
const auto weak = get_weak();
|
||||
|
||||
// Check if we should warn before closing a single pane
|
||||
// (only triggers on Always — or MultipleProcesses in the future)
|
||||
const auto flags = _settings.GlobalSettings().ConfirmCloseOn();
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::Always))
|
||||
{
|
||||
// The "don't ask me again" checkbox stays collapsed for
|
||||
// Always-only triggers. It will become relevant when
|
||||
// MultipleProcesses is implemented.
|
||||
// Load the dialog (triggers x:Load) to configure the checkbox.
|
||||
const auto dialog = FindName(L"ClosePaneDialog").try_as<ContentDialog>();
|
||||
if (const auto checkbox = dialog ? dialog.Content().try_as<CheckBox>() : nullptr)
|
||||
{
|
||||
checkbox.IsChecked(false);
|
||||
checkbox.Visibility(Visibility::Collapsed);
|
||||
}
|
||||
|
||||
auto warningResult = co_await _ShowClosePaneWarningDialog();
|
||||
if (warningResult != ContentDialogResult::Primary)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
}
|
||||
// TODO GH#6549: ConfirmCloseOn::MultipleProcesses check here
|
||||
// When implemented, show the checkbox and persist dismissal state.
|
||||
|
||||
if (co_await _PaneConfirmCloseReadOnly(pane))
|
||||
{
|
||||
if (const auto strong = weak.get())
|
||||
|
||||
@@ -37,7 +37,6 @@ using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
||||
using namespace winrt::Microsoft::Terminal;
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
using namespace winrt::Windows::Foundation::Collections;
|
||||
using namespace winrt::Windows::Storage::Streams;
|
||||
using namespace winrt::Windows::System;
|
||||
using namespace winrt::Windows::UI;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
@@ -907,6 +906,22 @@ namespace winrt::TerminalApp::implementation
|
||||
return _ShowDialogHelper(L"CloseAllDialog");
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Displays a dialog for warnings found while closing a tab that has
|
||||
// multiple panes or other conditions that warrant a warning.
|
||||
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowCloseTabWarningDialog()
|
||||
{
|
||||
return _ShowDialogHelper(L"CloseTabDialog");
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Displays a dialog for warnings found while closing a single pane
|
||||
// (e.g. when confirmCloseOn includes "always").
|
||||
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowClosePaneWarningDialog()
|
||||
{
|
||||
return _ShowDialogHelper(L"ClosePaneDialog");
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Displays a dialog for warnings found while closing the terminal tab marked as read-only
|
||||
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowCloseReadOnlyDialog()
|
||||
@@ -1601,7 +1616,8 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Replace the Starting directory with the CWD, if given
|
||||
const auto workingDirectory = control.WorkingDirectory();
|
||||
if (Utils::IsValidDirectory(workingDirectory.c_str()))
|
||||
const auto validWorkingDirectory = !workingDirectory.empty();
|
||||
if (validWorkingDirectory)
|
||||
{
|
||||
controlSettings.DefaultSettings()->StartingDirectory(workingDirectory);
|
||||
}
|
||||
@@ -1965,9 +1981,6 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
term.OpenHyperlink({ this, &TerminalPage::_OpenHyperlinkHandler });
|
||||
|
||||
term.DragOver({ this, &TerminalPage::_ControlDragOverHandler });
|
||||
term.Drop({ this, &TerminalPage::_ControlDragDropHandler });
|
||||
|
||||
// Add an event handler for when the terminal or tab wants to set a
|
||||
// progress indicator on the taskbar
|
||||
term.SetTaskbarProgress({ get_weak(), &TerminalPage::_SetTaskbarProgressHandler });
|
||||
@@ -2311,12 +2324,99 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Close the terminal app. If there is more
|
||||
// than one tab opened, show a warning dialog.
|
||||
// - Determines whether a close-window action should show a confirmation
|
||||
// dialog, based on the confirmCloseOn flags and the current window state.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - The ConfirmCloseOn flags that triggered the warning, or Never if no
|
||||
// warning is needed. Callers use this to determine checkbox visibility
|
||||
// and which dismissal state to persist.
|
||||
ConfirmCloseOn TerminalPage::_ShouldWarnOnClose() const
|
||||
{
|
||||
auto result = ConfirmCloseOn::Never;
|
||||
const auto flags = _settings.GlobalSettings().ConfirmCloseOn();
|
||||
|
||||
// Always flag means warn unconditionally.
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::Always))
|
||||
{
|
||||
WI_SetFlag(result, ConfirmCloseOn::Always);
|
||||
}
|
||||
|
||||
// MultipleTabs: warn if there's more than one tab and the user hasn't
|
||||
// dismissed this warning via "don't ask me again".
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::MultipleTabs) &&
|
||||
_HasMultipleTabs() &&
|
||||
!ApplicationState::SharedInstance().DismissedConfirmCloseMultipleTabs())
|
||||
{
|
||||
WI_SetFlag(result, ConfirmCloseOn::MultipleTabs);
|
||||
}
|
||||
|
||||
// MultiplePanes: warn if any tab has more than one pane and the user
|
||||
// hasn't dismissed this warning via "don't ask me again".
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::MultiplePanes) &&
|
||||
!ApplicationState::SharedInstance().DismissedConfirmCloseMultiplePanes())
|
||||
{
|
||||
for (const auto tab : _tabs)
|
||||
{
|
||||
if (const auto impl = _GetTabImpl(tab))
|
||||
{
|
||||
if (impl->GetLeafPaneCount() > 1)
|
||||
{
|
||||
WI_SetFlag(result, ConfirmCloseOn::MultiplePanes);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO GH#6549: ConfirmCloseOn::MultipleProcesses
|
||||
// Needs TermControl to expose whether >1 client process is connected.
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Determines whether closing a specific tab should show a confirmation
|
||||
// dialog, based on the confirmCloseOn flags and the tab's state.
|
||||
// Arguments:
|
||||
// - tab: The tab being closed.
|
||||
// Return Value:
|
||||
// - The ConfirmCloseOn flags that triggered the warning, or Never if no
|
||||
// warning is needed.
|
||||
ConfirmCloseOn TerminalPage::_ShouldWarnOnCloseTab(const winrt::com_ptr<Tab>& tab) const
|
||||
{
|
||||
auto result = ConfirmCloseOn::Never;
|
||||
const auto flags = _settings.GlobalSettings().ConfirmCloseOn();
|
||||
|
||||
// Always flag means warn unconditionally.
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::Always))
|
||||
{
|
||||
WI_SetFlag(result, ConfirmCloseOn::Always);
|
||||
}
|
||||
|
||||
// MultiplePanes: warn if this tab has more than one pane and the user
|
||||
// hasn't dismissed this warning via "don't ask me again".
|
||||
if (WI_IsFlagSet(flags, ConfirmCloseOn::MultiplePanes) &&
|
||||
tab->GetLeafPaneCount() > 1 &&
|
||||
!ApplicationState::SharedInstance().DismissedConfirmCloseMultiplePanes())
|
||||
{
|
||||
WI_SetFlag(result, ConfirmCloseOn::MultiplePanes);
|
||||
}
|
||||
|
||||
// TODO GH#6549: ConfirmCloseOn::MultipleProcesses
|
||||
// Needs TermControl to expose whether >1 client process is connected.
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Close the terminal app. If the confirmCloseOn flags indicate we should
|
||||
// warn for the current window state, show a warning dialog.
|
||||
safe_void_coroutine TerminalPage::CloseWindow()
|
||||
{
|
||||
if (_HasMultipleTabs() &&
|
||||
_settings.GlobalSettings().ConfirmCloseAllTabs() &&
|
||||
const auto reason = _ShouldWarnOnClose();
|
||||
if (reason != ConfirmCloseOn::Never &&
|
||||
!_displayingCloseDialog)
|
||||
{
|
||||
if (_newTabButton && _newTabButton.Flyout())
|
||||
@@ -2325,6 +2425,22 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
_DismissTabContextMenus();
|
||||
_displayingCloseDialog = true;
|
||||
|
||||
// Show the "don't ask me again" checkbox only when the dialog is
|
||||
// triggered by conditional flags (not just Always).
|
||||
const auto conditionalFlags = reason & ~ConfirmCloseOn::Always;
|
||||
const auto showCheckbox = conditionalFlags != ConfirmCloseOn::Never;
|
||||
|
||||
// Load the dialog (triggers x:Load) so we can configure the checkbox
|
||||
// before showing it.
|
||||
const auto dialog = FindName(L"CloseAllDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
const auto checkbox = dialog ? dialog.Content().try_as<WUX::Controls::CheckBox>() : nullptr;
|
||||
if (checkbox)
|
||||
{
|
||||
checkbox.IsChecked(false);
|
||||
checkbox.Visibility(showCheckbox ? WUX::Visibility::Visible : WUX::Visibility::Collapsed);
|
||||
}
|
||||
|
||||
auto warningResult = co_await _ShowCloseWarningDialog();
|
||||
_displayingCloseDialog = false;
|
||||
|
||||
@@ -2332,6 +2448,20 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
|
||||
// Persist dismissal if the user checked "don't ask me again"
|
||||
if (showCheckbox && checkbox && checkbox.IsChecked().Value())
|
||||
{
|
||||
const auto state = ApplicationState::SharedInstance();
|
||||
if (WI_IsFlagSet(reason, ConfirmCloseOn::MultipleTabs))
|
||||
{
|
||||
state.DismissedConfirmCloseMultipleTabs(true);
|
||||
}
|
||||
if (WI_IsFlagSet(reason, ConfirmCloseOn::MultiplePanes))
|
||||
{
|
||||
state.DismissedConfirmCloseMultiplePanes(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CloseWindowRequested.raise(*this, nullptr);
|
||||
@@ -2949,7 +3079,9 @@ namespace winrt::TerminalApp::implementation
|
||||
// - Sends the text back to the TermControl through the event's
|
||||
// `HandleClipboardData` member function.
|
||||
// - Does some of this in a background thread, as to not hang/crash the UI thread.
|
||||
safe_void_coroutine TerminalPage::_PasteFromClipboardHandler(const IInspectable sender, const IInspectable /* args */)
|
||||
// Arguments:
|
||||
// - eventArgs: the PasteFromClipboard event sent from the TermControl
|
||||
safe_void_coroutine TerminalPage::_PasteFromClipboardHandler(const IInspectable sender, const PasteFromClipboardEventArgs eventArgs)
|
||||
try
|
||||
{
|
||||
// The old Win32 clipboard API as used below is somewhere in the order of 300-1000x faster than
|
||||
@@ -2957,19 +3089,8 @@ namespace winrt::TerminalApp::implementation
|
||||
const auto weakThis = get_weak();
|
||||
const auto dispatcher = Dispatcher();
|
||||
const auto globalSettings = _settings.GlobalSettings();
|
||||
const auto control = sender.as<TermControl>();
|
||||
const auto broadcastGroup = _getBroadcastGroupFromControl(control);
|
||||
// Used to determine whether to emit empty pastes and strip extra whitespace
|
||||
const auto anyHasBracketedPaste = std::any_of(std::begin(broadcastGroup), std::end(broadcastGroup), [](auto&& content) {
|
||||
const auto control{ content.GetTermControl() };
|
||||
return control && !control.ReadOnly() && control.BracketedPasteEnabled();
|
||||
});
|
||||
// Used to determine whether to warn on multi-line paste
|
||||
// If none lack bracketed paste, we can skip the warning.
|
||||
const auto anyHasUnbracketedPaste = !anyHasBracketedPaste || std::any_of(std::begin(broadcastGroup), std::end(broadcastGroup), [](auto&& content) {
|
||||
const auto control{ content.GetTermControl() };
|
||||
return control && !control.ReadOnly() && !control.BracketedPasteEnabled();
|
||||
});
|
||||
const auto bracketedPaste = eventArgs.BracketedPasteEnabled();
|
||||
const auto sourceId = sender.try_as<ControlInteractivity>().Id();
|
||||
|
||||
// GetClipboardData might block for up to 30s for delay-rendered contents.
|
||||
co_await winrt::resume_background();
|
||||
@@ -2980,19 +3101,12 @@ namespace winrt::TerminalApp::implementation
|
||||
text = clipboard::read();
|
||||
}
|
||||
|
||||
if (!anyHasBracketedPaste && globalSettings.TrimPaste())
|
||||
if (!bracketedPaste && globalSettings.TrimPaste())
|
||||
{
|
||||
// Warning - when broadcast is enabled, this will trim the paste for all receivers.
|
||||
// Until we propagate this decision-making elsewhere, this is safer; broadcast will not auto-submit commands in other panes.
|
||||
// Tracked in GH#20164
|
||||
text = winrt::hstring{ Utils::TrimPaste(text) };
|
||||
}
|
||||
|
||||
// LOAD BEARING: Send an empty bracketed paste even if the clipboard was empty.
|
||||
// Bracketed Paste provides an application a way to know whether the
|
||||
// user pasted, even if there was no applicable content on it. This
|
||||
// behavior is observed in GNOME Terminal, among others.
|
||||
if (!anyHasBracketedPaste && text.empty())
|
||||
if (text.empty())
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
@@ -3004,7 +3118,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// NOTE that this is unsafe, because a shell that doesn't support bracketed paste
|
||||
// will allow an attacker to enable the mode, not realize that, and then accept
|
||||
// the paste as if it was a series of legitimate commands. See GH#13014.
|
||||
warnMultiLine = anyHasUnbracketedPaste;
|
||||
warnMultiLine = !bracketedPaste;
|
||||
break;
|
||||
case WarnAboutMultiLinePaste::Always:
|
||||
warnMultiLine = true;
|
||||
@@ -3074,46 +3188,45 @@ namespace winrt::TerminalApp::implementation
|
||||
// This will end up calling ConptyConnection::WriteInput which calls WriteFile which may block for
|
||||
// an indefinite amount of time. Avoid freezes and deadlocks by running this on a background thread.
|
||||
assert(!dispatcher.HasThreadAccess());
|
||||
_writeInputStringToBroadcastGroup(broadcastGroup, text, WriteInputStringType::Clipboard);
|
||||
eventArgs.HandleClipboardData(text);
|
||||
|
||||
// GH#18821: If broadcast input is active, paste the same text into all other
|
||||
// panes on the tab. We do this here (rather than re-reading the
|
||||
// clipboard per-pane) so that only one paste warning is shown.
|
||||
co_await wil::resume_foreground(dispatcher);
|
||||
if (const auto strongThis = weakThis.get())
|
||||
{
|
||||
if (const auto& tab{ strongThis->_GetFocusedTabImpl() })
|
||||
{
|
||||
if (tab->TabStatus().IsInputBroadcastActive())
|
||||
{
|
||||
tab->GetRootPane()->WalkTree([&](auto&& pane) {
|
||||
if (const auto control = pane->GetTerminalControl())
|
||||
{
|
||||
if (control.ContentId() != sourceId && !control.ReadOnly())
|
||||
{
|
||||
control.RawWriteString(text);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
|
||||
safe_void_coroutine TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
|
||||
void TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
auto uriString{ eventArgs.Uri() };
|
||||
auto parsed = winrt::Windows::Foundation::Uri(uriString);
|
||||
auto parsed = winrt::Windows::Foundation::Uri(eventArgs.Uri());
|
||||
if (_IsUriSupported(parsed))
|
||||
{
|
||||
bool shouldLaunch{ _IsUriConsideredSomewhatSafe(parsed) };
|
||||
|
||||
if (!shouldLaunch)
|
||||
{
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
{
|
||||
// FindName needs to be called first to actually load the xaml object
|
||||
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
|
||||
// Insert the reason and the URI
|
||||
unopenedUriDialog.SecondaryButtonText(RS_(L"UnsafeUrlConfirmAllowAction"));
|
||||
CouldNotOpenUriReason().Text(RS_(L"UnsafeUrlConfirmText"));
|
||||
UnopenedUri().Text(uriString);
|
||||
|
||||
// Show the dialog
|
||||
auto result = co_await presenter.ShowDialog(unopenedUriDialog);
|
||||
shouldLaunch = result == ContentDialogResult::Secondary;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldLaunch)
|
||||
{
|
||||
ShellExecuteW(nullptr, L"open", uriString.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
ShellExecute(nullptr, L"open", eventArgs.Uri().c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), uriString);
|
||||
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), eventArgs.Uri());
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
@@ -3133,10 +3246,9 @@ namespace winrt::TerminalApp::implementation
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
{
|
||||
// FindName needs to be called first to actually load the xaml object
|
||||
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
auto unopenedUriDialog = FindName(L"CouldNotOpenUriDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
|
||||
// Insert the reason and the URI
|
||||
unopenedUriDialog.SecondaryButtonText({});
|
||||
CouldNotOpenUriReason().Text(reason);
|
||||
UnopenedUri().Text(uri);
|
||||
|
||||
@@ -3189,30 +3301,6 @@ namespace winrt::TerminalApp::implementation
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TerminalPage::_IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri)
|
||||
{
|
||||
if (parsedUri.SchemeName() == L"http" || parsedUri.SchemeName() == L"https")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (parsedUri.SchemeName() == L"file")
|
||||
{
|
||||
static const auto pathext{ wil::TryGetEnvironmentVariableW<std::wstring>(L"PATHEXT") };
|
||||
const auto filename = parsedUri.Path();
|
||||
for (const auto& e : til::split_iterator{ std::wstring_view{ pathext }, L';' })
|
||||
{
|
||||
if (til::ends_with_insensitive_ascii(filename, e))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Important! Don't take this eventArgs by reference, we need to extend the
|
||||
// lifetime of it to the other side of the co_await!
|
||||
safe_void_coroutine TerminalPage::_ControlNoticeRaisedHandler(const IInspectable /*sender*/,
|
||||
@@ -3429,6 +3517,16 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Paste text from the Windows Clipboard to the focused terminal
|
||||
void TerminalPage::_PasteText()
|
||||
{
|
||||
if (const auto& control{ _GetActiveControl() })
|
||||
{
|
||||
control.PasteTextFromClipboard();
|
||||
}
|
||||
}
|
||||
|
||||
// Function Description:
|
||||
// - Called when the settings button is clicked. ShellExecutes the settings
|
||||
// file, as to open it in the default editor for .json files. Does this in
|
||||
@@ -3590,7 +3688,8 @@ namespace winrt::TerminalApp::implementation
|
||||
profile = GetClosestProfileForDuplicationOfProfile(profile);
|
||||
controlSettings = Settings::TerminalSettings::CreateWithProfile(_settings, profile);
|
||||
const auto workingDirectory = tabImpl->GetActiveTerminalControl().WorkingDirectory();
|
||||
if (Utils::IsValidDirectory(workingDirectory.c_str()))
|
||||
const auto validWorkingDirectory = !workingDirectory.empty();
|
||||
if (validWorkingDirectory)
|
||||
{
|
||||
controlSettings.DefaultSettings()->StartingDirectory(workingDirectory);
|
||||
}
|
||||
@@ -3776,13 +3875,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// for nulls
|
||||
if (const auto& connection{ _duplicateConnectionForRestart(paneContent) })
|
||||
{
|
||||
// Reset the terminal's VT state before attaching the new connection.
|
||||
// The previous client may have left dirty modes (e.g., bracketed
|
||||
// paste, mouse tracking, alternate buffer, kitty keyboard) that
|
||||
// would corrupt input/output for the new shell process.
|
||||
const auto& termControl = paneContent.GetTermControl();
|
||||
termControl.HardResetWithoutErase();
|
||||
termControl.Connection(connection);
|
||||
paneContent.GetTermControl().Connection(connection);
|
||||
connection.Start();
|
||||
}
|
||||
}
|
||||
@@ -4710,7 +4803,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Function Description:
|
||||
// - Helper to launch a new WT instance elevated. It'll do this by spawning
|
||||
// a helper process, that will ask the shell to elevate the process for
|
||||
// a helper process, who will asking the shell to elevate the process for
|
||||
// us. This might cause a UAC prompt. The elevation is performed on a
|
||||
// background thread, as to not block the UI thread.
|
||||
// Arguments:
|
||||
@@ -5810,326 +5903,4 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
return profileMenuItemFlyout;
|
||||
}
|
||||
|
||||
static void _translatePathInPlace(std::wstring& fullPath, PathTranslationStyle translationStyle)
|
||||
{
|
||||
static constexpr wil::zwstring_view s_pathPrefixes[] = {
|
||||
{},
|
||||
/* WSL */ L"/mnt/",
|
||||
/* Cygwin */ L"/cygdrive/",
|
||||
/* MSYS2 */ L"/",
|
||||
/* MinGW */ {},
|
||||
};
|
||||
static constexpr wil::zwstring_view sSingleQuoteEscape = L"'\\''";
|
||||
static constexpr auto cchSingleQuoteEscape = sSingleQuoteEscape.size();
|
||||
|
||||
if (translationStyle == PathTranslationStyle::None)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// All of the other path translation modes current result in /-delimited paths
|
||||
std::replace(fullPath.begin(), fullPath.end(), L'\\', L'/');
|
||||
|
||||
// Escape single quotes, assuming translated paths are always quoted by a pair of single quotes.
|
||||
size_t pos = 0;
|
||||
while ((pos = fullPath.find(L'\'', pos)) != std::wstring::npos)
|
||||
{
|
||||
// ' -> '\'' (for POSIX shell)
|
||||
fullPath.replace(pos, 1, sSingleQuoteEscape);
|
||||
// Arithmetic overflow cannot occur here.
|
||||
pos += cchSingleQuoteEscape;
|
||||
}
|
||||
|
||||
if (translationStyle == PathTranslationStyle::MinGW)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (fullPath.size() >= 2 && fullPath.at(1) == L':')
|
||||
{
|
||||
// C:/foo/bar -> Cc/foo/bar
|
||||
fullPath.at(1) = til::tolower_ascii(fullPath.at(0));
|
||||
// Cc/foo/bar -> [PREFIX]c/foo/bar
|
||||
fullPath.replace(0, 1, s_pathPrefixes[static_cast<int>(translationStyle)]);
|
||||
}
|
||||
else if (translationStyle == PathTranslationStyle::WSL)
|
||||
{
|
||||
// Stripping the UNC name and distribution prefix only applies to WSL.
|
||||
static constexpr std::wstring_view wslPathPrefixes[] = { L"//wsl.localhost/", L"//wsl$/" };
|
||||
for (auto prefix : wslPathPrefixes)
|
||||
{
|
||||
if (til::starts_with(fullPath, prefix))
|
||||
{
|
||||
if (const auto idx = fullPath.find(L'/', prefix.size()); idx != std::wstring::npos)
|
||||
{
|
||||
// //wsl.localhost/Ubuntu-18.04/foo/bar -> /foo/bar
|
||||
fullPath.erase(0, idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
// //wsl.localhost/Ubuntu-18.04 -> /
|
||||
fullPath = L"/";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Handle the DragOver event. We'll signal that the drag operation we
|
||||
// support is the "copy" operation, and we'll also customize the
|
||||
// appearance of the drag-drop UI, by removing the preview and setting a
|
||||
// custom caption. For more information, see
|
||||
// https://docs.microsoft.com/en-us/windows/uwp/design/input/drag-and-drop#customize-the-ui
|
||||
// Arguments:
|
||||
// - e: The DragEventArgs from the DragOver event
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalPage::_ControlDragOverHandler(const Windows::Foundation::IInspectable& /*sender*/,
|
||||
const DragEventArgs& e)
|
||||
{
|
||||
// We can only handle drag/dropping StorageItems (files) and plain Text
|
||||
// currently. If the format on the clipboard is anything else, returning
|
||||
// early here will prevent the drag/drop from doing anything.
|
||||
if (!(e.DataView().Contains(StandardDataFormats::StorageItems()) ||
|
||||
e.DataView().Contains(StandardDataFormats::Text())))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure to set the AcceptedOperation, so that we can later receive the path in the Drop event
|
||||
e.AcceptedOperation(DataPackageOperation::Copy);
|
||||
|
||||
// Sets custom UI text
|
||||
if (e.DataView().Contains(StandardDataFormats::StorageItems()))
|
||||
{
|
||||
e.DragUIOverride().Caption(RS_(L"DragFileCaption"));
|
||||
}
|
||||
else if (e.DataView().Contains(StandardDataFormats::Text()))
|
||||
{
|
||||
e.DragUIOverride().Caption(RS_(L"DragTextCaption"));
|
||||
}
|
||||
|
||||
// Sets if the caption is visible
|
||||
e.DragUIOverride().IsCaptionVisible(true);
|
||||
// Sets if the dragged content is visible
|
||||
e.DragUIOverride().IsContentVisible(false);
|
||||
// Sets if the glyph is visible
|
||||
e.DragUIOverride().IsGlyphVisible(false);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Async handler for the "Drop" event. If a file was dropped onto our
|
||||
// root, we'll try to get the path of the file dropped onto us, and write
|
||||
// the full path of the file to our terminal connection. Like conhost, if
|
||||
// the path contains a space, we'll wrap the path in quotes.
|
||||
// - Unlike conhost, if multiple files are dropped onto the terminal, we'll
|
||||
// write all the paths to the terminal, separated by spaces.
|
||||
// Arguments:
|
||||
// - e: The DragEventArgs from the Drop event
|
||||
// Return Value:
|
||||
// - <none>
|
||||
safe_void_coroutine TerminalPage::_ControlDragDropHandler(Windows::Foundation::IInspectable sender,
|
||||
DragEventArgs e)
|
||||
{
|
||||
auto dispatcher = Dispatcher();
|
||||
auto weak = get_weak();
|
||||
const auto control = sender.as<TermControl>();
|
||||
const auto broadcastGroup = _getBroadcastGroupFromControl(control);
|
||||
|
||||
if (_hostingHwnd)
|
||||
{
|
||||
SetForegroundWindow(*_hostingHwnd);
|
||||
}
|
||||
|
||||
if (e.DataView().Contains(StandardDataFormats::ApplicationLink()))
|
||||
{
|
||||
try
|
||||
{
|
||||
auto link{ co_await e.DataView().GetApplicationLinkAsync() };
|
||||
if (const auto strong = weak.get())
|
||||
{
|
||||
_writeInputStringToBroadcastGroup(broadcastGroup, link.AbsoluteUri(), WriteInputStringType::Clipboard);
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
else if (e.DataView().Contains(StandardDataFormats::WebLink()))
|
||||
{
|
||||
try
|
||||
{
|
||||
auto link{ co_await e.DataView().GetWebLinkAsync() };
|
||||
if (const auto strong = weak.get())
|
||||
{
|
||||
_writeInputStringToBroadcastGroup(broadcastGroup, link.AbsoluteUri(), WriteInputStringType::Clipboard);
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
else if (e.DataView().Contains(StandardDataFormats::Text()))
|
||||
{
|
||||
try
|
||||
{
|
||||
auto text{ co_await e.DataView().GetTextAsync() };
|
||||
if (const auto strong = weak.get())
|
||||
{
|
||||
_writeInputStringToBroadcastGroup(broadcastGroup, text, WriteInputStringType::Clipboard);
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
// StorageItem must be last. Some applications put hybrid data format items
|
||||
// in a drop message and we'll eat a crash when we request them.
|
||||
// Those applications usually include Text as well, so having storage items
|
||||
// last makes sure we'll hit text before getting to them.
|
||||
else if (e.DataView().Contains(StandardDataFormats::StorageItems()))
|
||||
{
|
||||
Windows::Foundation::Collections::IVectorView<Windows::Storage::IStorageItem> items;
|
||||
try
|
||||
{
|
||||
items = co_await e.DataView().GetStorageItemsAsync();
|
||||
}
|
||||
CATCH_LOG();
|
||||
|
||||
if (items && items.Size() > 0)
|
||||
{
|
||||
std::vector<std::wstring> fullPaths;
|
||||
|
||||
// GH#14628: Workaround for GetStorageItemsAsync() only returning 16 items
|
||||
// at most when dragging and dropping from archives (zip, 7z, rar, etc.)
|
||||
if (items.Size() == 16 && e.DataView().Contains(winrt::hstring{ L"FileDrop" }))
|
||||
{
|
||||
auto fileDropData = co_await e.DataView().GetDataAsync(winrt::hstring{ L"FileDrop" });
|
||||
if (fileDropData != nullptr)
|
||||
{
|
||||
auto stream = fileDropData.as<IRandomAccessStream>();
|
||||
stream.Seek(0);
|
||||
|
||||
const uint32_t streamSize = gsl::narrow_cast<uint32_t>(stream.Size());
|
||||
const Buffer buf(streamSize);
|
||||
const auto buffer = co_await stream.ReadAsync(buf, streamSize, InputStreamOptions::None);
|
||||
|
||||
const HGLOBAL hGlobal = buffer.data();
|
||||
const auto count = DragQueryFileW(static_cast<HDROP>(hGlobal), 0xFFFFFFFF, nullptr, 0);
|
||||
fullPaths.reserve(count);
|
||||
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
std::wstring path;
|
||||
path.resize(wil::max_path_length);
|
||||
const auto charsCopied = DragQueryFileW(static_cast<HDROP>(hGlobal), i, path.data(), wil::max_path_length);
|
||||
|
||||
if (charsCopied > 0)
|
||||
{
|
||||
path.resize(charsCopied);
|
||||
fullPaths.emplace_back(std::move(path));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fullPaths.reserve(items.Size());
|
||||
for (const auto& item : items)
|
||||
{
|
||||
fullPaths.emplace_back(item.Path());
|
||||
}
|
||||
}
|
||||
|
||||
const auto strong = weak.get();
|
||||
if (!strong)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
|
||||
// TODO(DH) the fuckin' delimiter from DragDropDelimiter
|
||||
std::unordered_map<PathTranslationStyle, winrt::hstring> translatedPaths;
|
||||
for (auto&& target : broadcastGroup)
|
||||
{
|
||||
const auto profile{ target.GetProfile() };
|
||||
auto translationStyle{ profile.PathTranslationStyle() };
|
||||
const auto broadcastTargetControl{ target.GetTermControl() };
|
||||
if (broadcastTargetControl.ReadOnly())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
auto [it, isNew] = translatedPaths.try_emplace(translationStyle, winrt::hstring{});
|
||||
if (isNew)
|
||||
{
|
||||
std::wstring allPathsString;
|
||||
for (auto fullPath : fullPaths)
|
||||
{
|
||||
// Join the paths with spaces
|
||||
if (!allPathsString.empty())
|
||||
{
|
||||
allPathsString += L" ";
|
||||
}
|
||||
|
||||
_translatePathInPlace(fullPath, translationStyle);
|
||||
|
||||
// All translated paths get quotes, and all strings spaces get quotes; all translated paths get single quotes
|
||||
const auto quotesNeeded = translationStyle != PathTranslationStyle::None || fullPath.find(L' ') != std::wstring::npos;
|
||||
const auto quotesChar = translationStyle != PathTranslationStyle::None ? L'\'' : L'"';
|
||||
|
||||
// Append fullPath and also wrap it in quotes if needed
|
||||
if (quotesNeeded)
|
||||
{
|
||||
allPathsString.push_back(quotesChar);
|
||||
}
|
||||
allPathsString.append(fullPath);
|
||||
if (quotesNeeded)
|
||||
{
|
||||
allPathsString.push_back(quotesChar);
|
||||
}
|
||||
}
|
||||
it->second = winrt::hstring{ allPathsString };
|
||||
}
|
||||
|
||||
broadcastTargetControl.WriteInputString(it->second, WriteInputStringType::Clipboard);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TerminalPage::broadcast_group TerminalPage::_getBroadcastGroupFromControl(const TermControl& control)
|
||||
{
|
||||
TerminalPage::broadcast_group contents;
|
||||
auto controlContent{ TerminalPaneContent::ContentFromControl(control) };
|
||||
if (controlContent)
|
||||
{
|
||||
contents.emplace_back(controlContent);
|
||||
}
|
||||
|
||||
if (const auto& tab{ _GetFocusedTabImpl() })
|
||||
{
|
||||
if (tab->TabStatus().IsInputBroadcastActive())
|
||||
{
|
||||
tab->GetRootPane()->WalkTree([&](auto&& pane) {
|
||||
if (auto content = pane->GetContent(); content && content != controlContent)
|
||||
{
|
||||
if (const auto termContent{ content.try_as<TerminalPaneContent>() })
|
||||
{
|
||||
contents.emplace_back(*termContent);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return contents;
|
||||
}
|
||||
|
||||
void TerminalPage::_writeInputStringToBroadcastGroup(const TerminalPage::broadcast_group& broadcastGroup, const winrt::hstring text, WriteInputStringType type)
|
||||
{
|
||||
for (auto&& content : broadcastGroup)
|
||||
{
|
||||
auto nextControl{ content.GetTermControl() };
|
||||
if (!nextControl.ReadOnly())
|
||||
{
|
||||
nextControl.WriteInputString(text, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,6 +303,8 @@ namespace winrt::TerminalApp::implementation
|
||||
void _ShowAboutDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowQuitDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowCloseWarningDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowCloseTabWarningDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowClosePaneWarningDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowCloseReadOnlyDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowMultiLinePasteWarningDialog();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowLargePasteWarningDialog();
|
||||
@@ -400,6 +402,8 @@ namespace winrt::TerminalApp::implementation
|
||||
TerminalApp::Tab _GetTabByTabViewItem(const IInspectable& tabViewItem) const noexcept;
|
||||
|
||||
void _HandleClosePaneRequested(std::shared_ptr<Pane> pane);
|
||||
Microsoft::Terminal::Settings::Model::ConfirmCloseOn _ShouldWarnOnClose() const;
|
||||
Microsoft::Terminal::Settings::Model::ConfirmCloseOn _ShouldWarnOnCloseTab(const winrt::com_ptr<Tab>& tab) const;
|
||||
safe_void_coroutine _SetFocusedTab(const winrt::TerminalApp::Tab tab);
|
||||
safe_void_coroutine _CloseFocusedPane();
|
||||
void _ClosePanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds);
|
||||
@@ -420,11 +424,10 @@ namespace winrt::TerminalApp::implementation
|
||||
void _SetAcceleratorForMenuItem(Windows::UI::Xaml::Controls::MenuFlyoutItem& menuItem, const winrt::Microsoft::Terminal::Control::KeyChord& keyChord);
|
||||
|
||||
safe_void_coroutine _PasteFromClipboardHandler(const IInspectable sender,
|
||||
const IInspectable eventArgs);
|
||||
const Microsoft::Terminal::Control::PasteFromClipboardEventArgs eventArgs);
|
||||
|
||||
safe_void_coroutine _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
|
||||
static bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
static bool _IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
void _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
|
||||
bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
|
||||
void _ShowCouldNotOpenDialog(winrt::hstring reason, winrt::hstring uri);
|
||||
bool _CopyText(bool dismissSelection, bool singleLine, bool withControlSequences, Microsoft::Terminal::Control::CopyFormat formats);
|
||||
@@ -437,9 +440,6 @@ namespace winrt::TerminalApp::implementation
|
||||
safe_void_coroutine _ControlNoticeRaisedHandler(const IInspectable sender, const Microsoft::Terminal::Control::NoticeEventArgs eventArgs);
|
||||
void _ShowControlNoticeDialog(const winrt::hstring& title, const winrt::hstring& message);
|
||||
|
||||
safe_void_coroutine _ControlDragDropHandler(Windows::Foundation::IInspectable sender, Windows::UI::Xaml::DragEventArgs e);
|
||||
void _ControlDragOverHandler(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::DragEventArgs& e);
|
||||
|
||||
safe_void_coroutine _LaunchSettings(const Microsoft::Terminal::Settings::Model::SettingsTarget target);
|
||||
|
||||
void _TabDragStarted(const IInspectable& sender, const IInspectable& eventArgs);
|
||||
@@ -574,10 +574,6 @@ namespace winrt::TerminalApp::implementation
|
||||
void _activePaneChanged(winrt::TerminalApp::Tab tab, Windows::Foundation::IInspectable args);
|
||||
safe_void_coroutine _doHandleSuggestions(Microsoft::Terminal::Settings::Model::SuggestionsArgs realArgs);
|
||||
|
||||
using broadcast_group = til::small_vector<TerminalApp::TerminalPaneContent, 1>;
|
||||
broadcast_group _getBroadcastGroupFromControl(const Microsoft::Terminal::Control::TermControl& control);
|
||||
void _writeInputStringToBroadcastGroup(const broadcast_group& broadcastGroup, const winrt::hstring text, Microsoft::Terminal::Control::WriteInputStringType type);
|
||||
|
||||
#pragma region ActionHandlers
|
||||
// These are all defined in AppActionHandlers.cpp
|
||||
#define ON_ALL_ACTIONS(action) DECLARE_ACTION_HANDLER(action);
|
||||
|
||||
@@ -96,7 +96,31 @@
|
||||
x:Uid="CloseAllDialog"
|
||||
Grid.Row="2"
|
||||
x:Load="False"
|
||||
DefaultButton="Primary" />
|
||||
DefaultButton="Primary">
|
||||
<CheckBox x:Name="CloseAllDontAskAgain"
|
||||
x:Uid="DontAskAgainCheckBox"
|
||||
Visibility="Collapsed" />
|
||||
</ContentDialog>
|
||||
|
||||
<ContentDialog x:Name="CloseTabDialog"
|
||||
x:Uid="CloseTabDialog"
|
||||
Grid.Row="2"
|
||||
x:Load="False"
|
||||
DefaultButton="Primary">
|
||||
<CheckBox x:Name="CloseTabDontAskAgain"
|
||||
x:Uid="DontAskAgainCheckBox"
|
||||
Visibility="Collapsed" />
|
||||
</ContentDialog>
|
||||
|
||||
<ContentDialog x:Name="ClosePaneDialog"
|
||||
x:Uid="ClosePaneDialog"
|
||||
Grid.Row="2"
|
||||
x:Load="False"
|
||||
DefaultButton="Primary">
|
||||
<CheckBox x:Name="ClosePaneDontAskAgain"
|
||||
x:Uid="DontAskAgainCheckBox"
|
||||
Visibility="Collapsed" />
|
||||
</ContentDialog>
|
||||
|
||||
<ContentDialog x:Name="CloseReadOnlyDialog"
|
||||
x:Uid="CloseReadOnlyDialog"
|
||||
@@ -144,17 +168,17 @@
|
||||
</TextBlock>
|
||||
</ContentDialog>
|
||||
|
||||
<ContentDialog x:Name="UriErrorDialog"
|
||||
x:Uid="UriErrorDialog"
|
||||
<ContentDialog x:Name="CouldNotOpenUriDialog"
|
||||
x:Uid="CouldNotOpenUriDialog"
|
||||
Grid.Row="2"
|
||||
x:Load="False"
|
||||
DefaultButton="Close">
|
||||
DefaultButton="Primary">
|
||||
<TextBlock IsTextSelectionEnabled="True"
|
||||
TextWrapping="WrapWholeWords">
|
||||
<TextBlock.ContextFlyout>
|
||||
<mtu:TextMenuFlyout />
|
||||
</TextBlock.ContextFlyout>
|
||||
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak /> <LineBreak />
|
||||
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak />
|
||||
<Run x:Name="UnopenedUri"
|
||||
FontFamily="Cascadia Mono" />
|
||||
</TextBlock>
|
||||
|
||||
@@ -20,8 +20,6 @@ using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
til::shared_mutex<std::unordered_map<void*, winrt::weak_ref<TerminalApp::implementation::TerminalPaneContent>>> TerminalPaneContent::_controlToContentMap{};
|
||||
|
||||
TerminalPaneContent::TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
|
||||
const std::shared_ptr<TerminalSettingsCache>& cache,
|
||||
const winrt::Microsoft::Terminal::Control::TermControl& control) :
|
||||
@@ -30,9 +28,6 @@ namespace winrt::TerminalApp::implementation
|
||||
_profile{ profile }
|
||||
{
|
||||
_setupControlEvents();
|
||||
|
||||
auto map{ _controlToContentMap.lock() };
|
||||
map->insert_or_assign(winrt::get_abi(control), get_weak());
|
||||
}
|
||||
|
||||
void TerminalPaneContent::_setupControlEvents()
|
||||
@@ -77,11 +72,6 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
_control.Close();
|
||||
|
||||
{
|
||||
auto map{ _controlToContentMap.lock() };
|
||||
map->erase(winrt::get_abi(_control));
|
||||
}
|
||||
|
||||
// Clear out our media player callbacks, and stop any playing media. This
|
||||
// will prevent the callback from being triggered after we've closed, and
|
||||
// also make sure that our sound stops when we're closed.
|
||||
@@ -112,7 +102,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
args.Profile(::Microsoft::Console::Utils::GuidToString(_profile.Guid()));
|
||||
// If we know the user's working directory use it instead of the profile.
|
||||
if (const auto dir = _control.WorkingDirectory(); ::Microsoft::Console::Utils::IsValidDirectory(dir.c_str()))
|
||||
if (const auto dir = _control.WorkingDirectory(); !dir.empty())
|
||||
{
|
||||
args.StartingDirectory(dir);
|
||||
}
|
||||
@@ -381,14 +371,4 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
return _control.CharacterDimensions();
|
||||
}
|
||||
|
||||
TerminalApp::TerminalPaneContent TerminalPaneContent::ContentFromControl(const winrt::Microsoft::Terminal::Control::TermControl& control)
|
||||
{
|
||||
const auto map{ _controlToContentMap.lock_shared() };
|
||||
if (auto found{ map->find(winrt::get_abi(control)) }; found != map->end())
|
||||
{
|
||||
return *found->second.get();
|
||||
}
|
||||
return { nullptr };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,13 +55,9 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
til::typed_event<TerminalApp::TerminalPaneContent, winrt::Windows::Foundation::IInspectable> RestartTerminalRequested;
|
||||
|
||||
static TerminalApp::TerminalPaneContent ContentFromControl(const winrt::Microsoft::Terminal::Control::TermControl& control);
|
||||
|
||||
// See BasicPaneEvents for most generic event definitions
|
||||
|
||||
private:
|
||||
static til::shared_mutex<std::unordered_map<void*, winrt::weak_ref<TerminalApp::implementation::TerminalPaneContent>>> _controlToContentMap;
|
||||
|
||||
winrt::Microsoft::Terminal::Control::TermControl _control{ nullptr };
|
||||
winrt::Microsoft::Terminal::TerminalConnection::ConnectionState _connectionState{ winrt::Microsoft::Terminal::TerminalConnection::ConnectionState::NotConnected };
|
||||
winrt::Microsoft::Terminal::Settings::Model::Profile _profile{ nullptr };
|
||||
|
||||
@@ -861,7 +861,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - Used to tell the app that the titlebar has been clicked. The App won't
|
||||
// actually receive any clicks in the titlebar area, so this is a helper
|
||||
// to clue the app in that a click has happened. The App will use this as
|
||||
// an indicator that it needs to dismiss any open flyouts.
|
||||
// a indicator that it needs to dismiss any open flyouts.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <winrt/Windows.Globalization.h>
|
||||
#include <winrt/Windows.Graphics.Display.h>
|
||||
#include <winrt/Windows.System.h>
|
||||
#include <winrt/Windows.Storage.Streams.h>
|
||||
#include <winrt/Windows.UI.Core.h>
|
||||
#include <winrt/Windows.UI.Input.h>
|
||||
#include <winrt/Windows.UI.Text.h>
|
||||
@@ -89,7 +88,6 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalAppProvider);
|
||||
|
||||
// Manually include til after we include Windows.Foundation to give it winrt superpowers
|
||||
#include "til.h"
|
||||
#include <til/mutex.h>
|
||||
#include <til/winrt.h>
|
||||
|
||||
#include <SafeDispatcherTimer.h>
|
||||
|
||||
@@ -879,7 +879,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
||||
// Arguments:
|
||||
// - the device code that would have been received when authentication was initiated
|
||||
// - the polling interval duration
|
||||
// - the duration for which the code is still valid
|
||||
// - the duration the code is still valid for
|
||||
// Return value:
|
||||
// - if authentication is done successfully, then return the response from the server
|
||||
// - else, throw an exception
|
||||
@@ -1018,7 +1018,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
||||
_terminalID = terminalResponse.GetNamedString(L"id");
|
||||
|
||||
// we have to do some post-handling to get the proper socket endpoint
|
||||
// the logic here is based on the way that the cloud shell team itself does it
|
||||
// the logic here is based on the way the cloud shell team itself does it
|
||||
winrt::hstring finalSocketUri;
|
||||
const std::wstring_view wCloudShellUri{ _cloudShellUri };
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ HRESULT CTerminalHandoff::s_StopListening()
|
||||
// - server - PTY process handle to track for lifetime/cleanup
|
||||
// - client - Process handle to client so we can track its lifetime and exit appropriately
|
||||
// Return Value:
|
||||
// - E_NOT_VALID_STATE if an event handler is not registered before calling. `::DuplicateHandle`
|
||||
// - E_NOT_VALID_STATE if a event handler is not registered before calling. `::DuplicateHandle`
|
||||
// error codes if we cannot manage to make our own copy of handles to retain. Or S_OK/error
|
||||
// from the registered handler event function.
|
||||
HRESULT CTerminalHandoff::EstablishPtyHandoff(HANDLE* in, HANDLE* out, HANDLE signal, HANDLE reference, HANDLE server, HANDLE client, const TERMINAL_STARTUP_INFO* startupInfo)
|
||||
|
||||
@@ -355,12 +355,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void ControlCore::HardResetWithoutErase()
|
||||
{
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->HardResetWithoutErase();
|
||||
}
|
||||
|
||||
bool ControlCore::Initialize(const float actualWidth,
|
||||
const float actualHeight,
|
||||
const float compositionScale)
|
||||
@@ -498,7 +492,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - wstr: the string of characters to write to the terminal connection.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void ControlCore::_sendInput(const std::wstring_view wstr)
|
||||
void ControlCore::SendInput(const std::wstring_view wstr)
|
||||
{
|
||||
if (wstr.empty())
|
||||
{
|
||||
@@ -554,7 +548,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
if (out)
|
||||
{
|
||||
_sendInput(*out);
|
||||
SendInput(*out);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -712,7 +706,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
if (out)
|
||||
{
|
||||
_sendInput(*out);
|
||||
SendInput(*out);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -731,7 +725,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
if (out)
|
||||
{
|
||||
_sendInput(*out);
|
||||
SendInput(*out);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1451,34 +1445,24 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// Method Description:
|
||||
// - Pre-process text pasted (presumably from the clipboard)
|
||||
// before sending it over the terminal's connection.
|
||||
void ControlCore::WriteInputString(const std::wstring_view& str, WriteInputStringType type)
|
||||
void ControlCore::PasteText(const winrt::hstring& hstr)
|
||||
{
|
||||
switch (type)
|
||||
using namespace ::Microsoft::Console::Utils;
|
||||
|
||||
auto filtered = FilterStringForPaste(hstr, CarriageReturnNewline | ControlCodes);
|
||||
if (BracketedPasteEnabled())
|
||||
{
|
||||
case WriteInputStringType::Clipboard:
|
||||
{
|
||||
using namespace ::Microsoft::Console::Utils;
|
||||
|
||||
auto filtered = FilterStringForPaste(str, CarriageReturnNewline | ControlCodes);
|
||||
if (BracketedPasteEnabled())
|
||||
{
|
||||
filtered.insert(0, L"\x1b[200~");
|
||||
filtered.append(L"\x1b[201~");
|
||||
}
|
||||
|
||||
// It's important to not hold the terminal lock while calling this function as sending the data may take a long time.
|
||||
_sendInput(filtered);
|
||||
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->ClearSelection();
|
||||
_updateSelectionUI();
|
||||
_terminal->TrySnapOnInput();
|
||||
return;
|
||||
}
|
||||
case WriteInputStringType::Raw:
|
||||
_sendInput(str);
|
||||
return;
|
||||
filtered.insert(0, L"\x1b[200~");
|
||||
filtered.append(L"\x1b[201~");
|
||||
}
|
||||
|
||||
// It's important to not hold the terminal lock while calling this function as sending the data may take a long time.
|
||||
SendInput(filtered);
|
||||
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->ClearSelection();
|
||||
_updateSelectionUI();
|
||||
_terminal->TrySnapOnInput();
|
||||
}
|
||||
|
||||
FontInfo ControlCore::GetFont() const
|
||||
@@ -2091,10 +2075,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// the selection (we need to reset selection on double-click or
|
||||
// triple-click, so it captures the word or the line, rather than
|
||||
// extending the selection)
|
||||
// - GH#9608: VT mouse mode is enabled. In this mode, Shift is used
|
||||
// to override mouse input, so Shift+Click should start a fresh
|
||||
// selection rather than extending the previous one.
|
||||
if (_terminal->IsSelectionActive() && (!shiftEnabled || isOnOriginalPosition || _terminal->IsTrackingMouseInput()))
|
||||
if (_terminal->IsSelectionActive() && (!shiftEnabled || isOnOriginalPosition))
|
||||
{
|
||||
// Reset the selection
|
||||
_terminal->ClearSelection();
|
||||
@@ -2207,7 +2188,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// Sending input requires that we're unlocked, because
|
||||
// writing the input pipe may block indefinitely.
|
||||
const auto suspension = _terminal->SuspendLock();
|
||||
_sendInput(buffer);
|
||||
SendInput(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2319,7 +2300,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// The absolute cursor coordinate.
|
||||
const auto cursor = _terminal->GetViewportRelativeCursorPosition();
|
||||
|
||||
// GH#18732: Users want the row that the cursor is on to be preserved across clears.
|
||||
// GH#18732: Users want the row the cursor is on to be preserved across clears.
|
||||
std::wstring sequence;
|
||||
|
||||
if (clearType == ClearBufferType::Scrollback || clearType == ClearBufferType::All)
|
||||
@@ -2436,6 +2417,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
return *context;
|
||||
}
|
||||
|
||||
winrt::hstring ControlCore::CurrentWorkingDirectory() const
|
||||
{
|
||||
return winrt::hstring{ _terminal->GetWorkingDirectory() };
|
||||
}
|
||||
|
||||
bool ControlCore::QuickFixesAvailable() const noexcept
|
||||
{
|
||||
return _cachedQuickFixes && _cachedQuickFixes.Size() > 0;
|
||||
@@ -2869,7 +2855,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
if (markStart <= pos &&
|
||||
markEnd >= pos)
|
||||
{
|
||||
// ... select the part of the mark that the caller told us about.
|
||||
// ... select the part of the mark the caller told us about.
|
||||
_selectSpan(getSpan(m));
|
||||
// And quick bail
|
||||
return;
|
||||
|
||||
@@ -122,7 +122,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
til::color ForegroundColor() const;
|
||||
til::color BackgroundColor() const;
|
||||
|
||||
void WriteInputString(const std::wstring_view& str, WriteInputStringType type);
|
||||
void SendInput(std::wstring_view wstr);
|
||||
void PasteText(const winrt::hstring& hstr);
|
||||
bool CopySelectionToClipboard(bool singleLine, bool withControlSequences, const CopyFormat formats);
|
||||
void SelectAll();
|
||||
void ClearSelection();
|
||||
@@ -190,6 +191,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
void ContextMenuSelectCommand();
|
||||
void ContextMenuSelectOutput();
|
||||
|
||||
winrt::hstring CurrentWorkingDirectory() const;
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ITerminalInput
|
||||
@@ -254,7 +257,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
TerminalConnection::ITerminalConnection Connection();
|
||||
void Connection(const TerminalConnection::ITerminalConnection& connection);
|
||||
void HardResetWithoutErase();
|
||||
|
||||
void AnchorContextMenu(til::point viewportRelativeCharacterPosition);
|
||||
|
||||
@@ -319,7 +321,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
void _handleControlC();
|
||||
void _sendInputToConnection(std::wstring_view wstr);
|
||||
void _sendInput(std::wstring_view wstr);
|
||||
|
||||
#pragma region TerminalCoreCallbacks
|
||||
void _terminalWarningBell();
|
||||
|
||||
@@ -68,14 +68,6 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean SearchRegexInvalid;
|
||||
};
|
||||
|
||||
enum WriteInputStringType
|
||||
{
|
||||
// Text which is to be passed through unmodified.
|
||||
Raw,
|
||||
// Text which is to be treated as clipboard input, stripped and formatted according to the application's wishes.
|
||||
Clipboard,
|
||||
};
|
||||
|
||||
[default_interface] runtimeclass SelectionColor
|
||||
{
|
||||
SelectionColor();
|
||||
@@ -106,7 +98,6 @@ namespace Microsoft.Terminal.Control
|
||||
void ApplyAppearance(Boolean focused);
|
||||
|
||||
Microsoft.Terminal.TerminalConnection.ITerminalConnection Connection;
|
||||
void HardResetWithoutErase();
|
||||
|
||||
IControlSettings Settings { get; };
|
||||
IControlAppearance FocusedAppearance { get; };
|
||||
@@ -136,7 +127,8 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean SendCharEvent(Char ch,
|
||||
Int16 scanCode,
|
||||
Microsoft.Terminal.Core.ControlKeyStates modifiers);
|
||||
void WriteInputString(String text, WriteInputStringType type);
|
||||
void SendInput(String text);
|
||||
void PasteText(String text);
|
||||
void SelectAll();
|
||||
void ClearSelection();
|
||||
Boolean ToggleBlockSelection();
|
||||
|
||||
@@ -54,20 +54,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
self->Attached.raise(*self, nullptr);
|
||||
}
|
||||
});
|
||||
|
||||
// GH#14464: Mark mode and quick-edit (shift+arrow) selections update
|
||||
// the selection through ControlCore, bypassing SetEndSelectionPoint.
|
||||
// Listen for selection changes so _selectionNeedsToBeCopied is set
|
||||
// for ALL selection types, not just mouse drag.
|
||||
_core->UpdateSelectionMarkers([weakThis = get_weak()](auto&&, auto&&) {
|
||||
if (auto self{ weakThis.get() })
|
||||
{
|
||||
if (self->_core->HasSelection())
|
||||
{
|
||||
self->_selectionNeedsToBeCopied = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
uint64_t ControlInteractivity::Id()
|
||||
@@ -169,8 +155,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
void ControlInteractivity::GotFocus()
|
||||
{
|
||||
_focused = true;
|
||||
|
||||
if (_uiaEngine.get())
|
||||
{
|
||||
THROW_IF_FAILED(_uiaEngine->Enable());
|
||||
@@ -183,8 +167,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
void ControlInteractivity::LostFocus()
|
||||
{
|
||||
_focused = false;
|
||||
|
||||
if (_uiaEngine.get())
|
||||
{
|
||||
THROW_IF_FAILED(_uiaEngine->Disable());
|
||||
@@ -242,12 +224,17 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - Initiate a paste operation.
|
||||
void ControlInteractivity::RequestPasteTextFromClipboard()
|
||||
{
|
||||
auto args = winrt::make<PasteFromClipboardEventArgs>(
|
||||
[core = _core](const winrt::hstring& wstr) {
|
||||
core->PasteText(wstr);
|
||||
},
|
||||
_core->BracketedPasteEnabled());
|
||||
|
||||
// send paste event up to TermApp
|
||||
PasteFromClipboard.raise(*this, nullptr);
|
||||
PasteFromClipboard.raise(*this, std::move(args));
|
||||
}
|
||||
|
||||
void ControlInteractivity::PointerPressed(const uint32_t /*pointerId*/,
|
||||
Control::MouseButtonState buttonState,
|
||||
void ControlInteractivity::PointerPressed(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
@@ -260,10 +247,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
const auto shiftEnabled = modifiers.IsShiftPressed();
|
||||
const auto ctrlEnabled = modifiers.IsCtrlPressed();
|
||||
|
||||
// Mark that this pointer event actually started within our bounds.
|
||||
// We'll need this later, for PointerMoved events.
|
||||
_pointerPressedInBounds = true;
|
||||
|
||||
// GH#9396: we prioritize hyper-link over VT mouse events
|
||||
auto hyperlink = _core->GetHyperlink(terminalPosition.to_core_point());
|
||||
if (WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown) &&
|
||||
@@ -302,10 +285,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
const auto isOnOriginalPosition = _lastMouseClickPosNoSelection == pixelPosition;
|
||||
|
||||
// Rounded coordinates for text selection.
|
||||
// Don't round in VT mouse mode; cell-level precision matters more
|
||||
const auto round = !_core->IsVtMouseModeEnabled();
|
||||
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, round),
|
||||
// Rounded coordinates for text selection
|
||||
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, true),
|
||||
multiClickMapper,
|
||||
altEnabled,
|
||||
shiftEnabled,
|
||||
@@ -315,15 +296,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
if (_core->HasSelection())
|
||||
{
|
||||
// GH#9787: if selection is active we don't want to track the touchdown position
|
||||
// so that dragging the mouse will extend the selection rather than starting the new one.
|
||||
// In VT mouse mode, keep tracking the touchdown point so that PointerMoved
|
||||
// can re-anchor the selection based on drag direction (the dx < 0 adjustment).
|
||||
// Without this, dragging left wouldn't include the initially clicked cell
|
||||
// because floored coordinates place the anchor on the cell's left edge.
|
||||
if (!_core->IsVtMouseModeEnabled())
|
||||
{
|
||||
_singleClickTouchdownPos = std::nullopt;
|
||||
}
|
||||
// so that dragging the mouse will extend the selection rather than starting the new one
|
||||
_singleClickTouchdownPos = std::nullopt;
|
||||
}
|
||||
}
|
||||
else if (WI_IsFlagSet(buttonState, MouseButtonState::IsRightButtonDown))
|
||||
@@ -340,41 +314,37 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
else
|
||||
{
|
||||
// GH#19942, GH#14464: Don't re-copy a selection that was
|
||||
// already copied via copyOnSelect on mouse-up. But DO copy
|
||||
// if the selection was made via mark mode or modified with
|
||||
// quick-edit keys (shift+arrow), since those paths never
|
||||
// triggered an automatic copy.
|
||||
const auto copied = (_selectionNeedsToBeCopied || !_core->CopyOnSelect()) &&
|
||||
CopySelectionToClipboard(shiftEnabled, false, _core->Settings().CopyFormatting());
|
||||
// Try to copy the text and clear the selection
|
||||
const auto successfulCopy = CopySelectionToClipboard(shiftEnabled, false, _core->Settings().CopyFormatting());
|
||||
_core->ClearSelection();
|
||||
if (_core->CopyOnSelect() || !copied)
|
||||
if (_core->CopyOnSelect() || !successfulCopy)
|
||||
{
|
||||
// CopyOnSelect: right-click always pastes.
|
||||
// Otherwise: no selection → paste.
|
||||
// CopyOnSelect: right click always pastes!
|
||||
// Otherwise: no selection --> paste
|
||||
RequestPasteTextFromClipboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ControlInteractivity::TouchPressed(const Core::Point contactPoint)
|
||||
void ControlInteractivity::TouchPressed(const winrt::Windows::Foundation::Point contactPoint)
|
||||
{
|
||||
_touchAnchor = contactPoint;
|
||||
}
|
||||
|
||||
bool ControlInteractivity::PointerMoved(const uint32_t /*pointerId*/,
|
||||
Control::MouseButtonState buttonState,
|
||||
bool ControlInteractivity::PointerMoved(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const Core::Point pixelPosition)
|
||||
const bool focused,
|
||||
const Core::Point pixelPosition,
|
||||
const bool pointerPressedInBounds)
|
||||
{
|
||||
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
|
||||
// Returning true from this function indicates that the caller should do no further processing of this movement.
|
||||
bool handledCompletely = false;
|
||||
|
||||
// Short-circuit isReadOnly check to avoid warning dialog
|
||||
if (_focused && !_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))
|
||||
if (focused && !_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))
|
||||
{
|
||||
_sendMouseEventHelper(terminalPosition, pointerUpdateKind, modifiers, 0, buttonState);
|
||||
handledCompletely = true;
|
||||
@@ -383,7 +353,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// actually start _in_ the control bounds. Case in point - someone drags
|
||||
// a file into the bounds of the control. That shouldn't send the
|
||||
// selection into space.
|
||||
else if (_focused && _pointerPressedInBounds && WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown))
|
||||
else if (focused && pointerPressedInBounds && WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown))
|
||||
{
|
||||
if (_singleClickTouchdownPos)
|
||||
{
|
||||
@@ -429,9 +399,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
return handledCompletely;
|
||||
}
|
||||
|
||||
void ControlInteractivity::TouchMoved(const Core::Point newTouchPoint)
|
||||
void ControlInteractivity::TouchMoved(const winrt::Windows::Foundation::Point newTouchPoint,
|
||||
const bool focused)
|
||||
{
|
||||
if (_focused &&
|
||||
if (focused &&
|
||||
_touchAnchor)
|
||||
{
|
||||
const auto anchor = _touchAnchor.value();
|
||||
@@ -465,14 +436,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void ControlInteractivity::PointerReleased(const uint32_t /*pointerId*/,
|
||||
Control::MouseButtonState buttonState,
|
||||
void ControlInteractivity::PointerReleased(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const Core::Point pixelPosition)
|
||||
{
|
||||
_pointerPressedInBounds = false;
|
||||
|
||||
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
|
||||
// Short-circuit isReadOnly check to avoid warning dialog
|
||||
if (!_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))
|
||||
@@ -714,9 +682,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - cursorPosition: in pixels, relative to the origin of the control
|
||||
void ControlInteractivity::SetEndSelectionPoint(const Core::Point pixelPosition)
|
||||
{
|
||||
// Don't round in VT mouse mode; cell-level precision matters more
|
||||
const auto round = !_core->IsVtMouseModeEnabled();
|
||||
_core->SetEndSelectionPoint(_getTerminalPosition(til::point{ pixelPosition }, round));
|
||||
_core->SetEndSelectionPoint(_getTerminalPosition(til::point{ pixelPosition }, true));
|
||||
_selectionNeedsToBeCopied = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,23 +51,23 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
::Microsoft::Console::Render::IRenderData* GetRenderData() const;
|
||||
|
||||
#pragma region Input Methods
|
||||
void PointerPressed(const uint32_t pointerId,
|
||||
Control::MouseButtonState buttonState,
|
||||
void PointerPressed(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const Core::Point pixelPosition);
|
||||
void TouchPressed(const Core::Point contactPoint);
|
||||
void TouchPressed(const winrt::Windows::Foundation::Point contactPoint);
|
||||
|
||||
bool PointerMoved(const uint32_t pointerId,
|
||||
Control::MouseButtonState buttonState,
|
||||
bool PointerMoved(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const Core::Point pixelPosition);
|
||||
void TouchMoved(const Core::Point newTouchPoint);
|
||||
const bool focused,
|
||||
const Core::Point pixelPosition,
|
||||
const bool pointerPressedInBounds);
|
||||
void TouchMoved(const winrt::Windows::Foundation::Point newTouchPoint,
|
||||
const bool focused);
|
||||
|
||||
void PointerReleased(const uint32_t pointerId,
|
||||
Control::MouseButtonState buttonState,
|
||||
void PointerReleased(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const Core::Point pixelPosition);
|
||||
@@ -92,7 +92,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
void AttachToNewControl();
|
||||
|
||||
til::typed_event<IInspectable, Control::OpenHyperlinkEventArgs> OpenHyperlink;
|
||||
til::typed_event<IInspectable, IInspectable> PasteFromClipboard;
|
||||
til::typed_event<IInspectable, Control::PasteFromClipboardEventArgs> PasteFromClipboard;
|
||||
til::typed_event<IInspectable, Control::ScrollPositionChangedArgs> ScrollPositionChanged;
|
||||
til::typed_event<IInspectable, Control::ContextMenuRequestedEventArgs> ContextMenuRequested;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
// If this is set, then we assume we are in the middle of panning the
|
||||
// viewport via touch input.
|
||||
std::optional<Core::Point> _touchAnchor;
|
||||
std::optional<winrt::Windows::Foundation::Point> _touchAnchor;
|
||||
|
||||
using Timestamp = uint64_t;
|
||||
|
||||
@@ -142,9 +142,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
uint64_t _id;
|
||||
static std::atomic<uint64_t> _nextId;
|
||||
|
||||
bool _focused{ false };
|
||||
bool _pointerPressedInBounds{ false };
|
||||
|
||||
unsigned int _numberOfClicks(Core::Point clickPos, Timestamp clickTime);
|
||||
void _updateSystemParameterSettings() noexcept;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user