diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.yml b/.github/ISSUE_TEMPLATE/Bug_Report.yml index 2a647a35d51..c8fe7cb5709 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug_Report.yml @@ -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 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. + 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. - type: input attributes: diff --git a/.github/actions/spelling/README.md b/.github/actions/spelling/README.md index 4c40f7f02ac..820182ba555 100644 --- a/.github/actions/spelling/README.md +++ b/.github/actions/spelling/README.md @@ -10,6 +10,7 @@ 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. diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md index 536c601aec2..48c4345fc54 100644 --- a/.github/actions/spelling/advice.md +++ b/.github/actions/spelling/advice.md @@ -22,6 +22,7 @@ See the `README.md` in each directory for more information.
If the flagged items are :exploding_head: false positives 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. diff --git a/.github/actions/spelling/allow/allow.txt b/.github/actions/spelling/allow/allow.txt index 68c5a275e8c..0e9ddc717e5 100644 --- a/.github/actions/spelling/allow/allow.txt +++ b/.github/actions/spelling/allow/allow.txt @@ -23,8 +23,10 @@ FTCS gantt gfm ghe +github godbolt hstrings +https hyperlinking hyperlinks Kbds @@ -44,6 +46,7 @@ mru notwrapped NTMTo overlined +passthrough perlw postmodern Powerline @@ -65,6 +68,7 @@ rubyw runtimes servicebus slnt +ssh stakeholders subpage subpages @@ -72,10 +76,11 @@ sustainability sxn Tencent toolset -Uids +ubuntu UEFI -UIDs uiatextrange +Uids +UIDs und vsdevcmd westus diff --git a/.github/actions/spelling/allow/remove-after-merging.txt b/.github/actions/spelling/allow/remove-after-merging.txt new file mode 100644 index 00000000000..ba4657da134 --- /dev/null +++ b/.github/actions/spelling/allow/remove-after-merging.txt @@ -0,0 +1,2 @@ +changelists +screenshots diff --git a/.github/actions/spelling/candidate.patterns b/.github/actions/spelling/candidate.patterns index d4053835145..033119874d7 100644 --- a/.github/actions/spelling/candidate.patterns +++ b/.github/actions/spelling/candidate.patterns @@ -1,5 +1,5 @@ # Repeated letters -\b([a-z])\g{-1}{2,}\b +\b([A-Za-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][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] +(?:^|['"`\s])(?!-+\s)[-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] # css fonts -\bfont(?:-family|):[^;}]+ +\bfont(?:-family(?:[-\w+]*)|):[^;}]+ # 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,6 +88,9 @@ 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?&=_%]* @@ -169,7 +172,7 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. GHSA(?:-[0-9a-z]{4}){3} # GitHub actions -\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+ +\buses:\s+(['"]?)[-\w.]+/[-\w./]+@[-\w.]+\g{-1} # GitLab commit \bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b @@ -238,7 +241,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 @@ -412,7 +415,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]) @@ -430,7 +433,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[0-9a-fA-F]{16,}\b +\b(?=(?:[a-fA-F]{0,2}\d)*[a-fA-F]{3})[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 @@ -454,8 +457,12 @@ LS0tLS1CRUdJT.* # uuid: \b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\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 + +# 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 # integrity integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1} @@ -477,7 +484,7 @@ Name\[[^\]]+\]=.* (?:(?:\b|_|(?<=[a-z]))I|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b)) # python -\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,}) +\b(?i)py(?!gment|gmy|lon|ramid|ro|th)(?=[a-z]{2,}) # crypt (['"])\$2[ayb]\$.{56}\g{-1} @@ -497,12 +504,21 @@ 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 +#(?[-a-zA-Z=;:/0-9+]{3,}== 0.0.22) +# LaTeX \\\w{2,}\{ # American Mathematical Society (AMS) / Doxygen @@ -719,7 +746,6 @@ 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 #(?"'`=(#])-(?:(?: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 -# libraries -#(?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z]) +# 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]) # iSCSI iqn (approximate regex) \biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b @@ -772,9 +800,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|(?]|depth|frame|page|project|select)\s[1-9] (?!byte|day|hour|meaning|minute|month|(?:new |)page|people|(?:more |)space|year)[a-z]+ [a-z]+\s + +# Write out numbers at the start of a sentence +# https://www.scribendi.com/academy/articles/when_to_spell_out_numbers_in_writing.en.html#:~:text=Beginning%20a%20Sentence%20with%20a%20Number,may%20be%2e +(?:\b[a-z]{4,}|\s(?:[a-eg-z][a-z]{2}|f[a-hj-z][a-z]|fi[a-fh][a-z]))[:.?!] [1-9] [a-z]{3,} [a-z]+\s\w+ + +# Don't write two numbers in a row +# https://www.scribendi.com/academy/articles/when_to_spell_out_numbers_in_writing.en.html#:~:text=Paired%20Numbers%20%28Two%20Numbers%20in,librarian%20to%20begin%20story%20time%2e +(?:[a-z]{4,}|\s(?!apr|aug|dec|feb|fri|jan|mar|mon|nov|oct|sat|sep|sun|thu|tue|wed)[a-z]{3})\s\d+\s\d+(?!--)[-\s](?:(?!--)[-A-Za-z]){2,}\s + +# This probably indicates Mojibake https://en.wikipedia.org/wiki/Mojibake +# You probably should try to unbake this content +Ã(?:Â[¤¶¥]|[£¢])|à + # Should be `HH:MM:SS` \bHH:SS:MM\b @@ -36,30 +85,103 @@ # Assuming that the time is being passed to https://go.dev/src/time/format.go \b2006-02-01\b +# Should probably have a trailing `.` +\s([a-z]\.){2,}[a-z]\s(?=\w) + +# Should probably end with `”` +# Likely bad OCR +“.+[^'‘\\\[]+’'(?!['"]) + +# Should probably end with `”` or with only one of `’`/`'` +\s\w+[^'‘\\\[]+’'(?!['"]) + +# Should probably be matching (smart)quotes or backticks (if Markdown) +# Unless the file format is TeX +^[^`]+(? + allow-hunspell: false + load-config-from: | { - "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/" + "pr-base-keys": [ + "" + ], + "pr-trusted-keys": [ + "check_extra_dictionaries", + "dictionary_source_prefixes", + "extra_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-latest + runs-on: ubuntu-slim needs: spelling permissions: actions: read @@ -161,11 +141,10 @@ jobs: comment-pr: name: Report (PR) # If you workflow isn't running on pull_request*, you can remove this job - runs-on: ubuntu-latest + runs-on: ubuntu-slim needs: spelling permissions: actions: read - contents: read pull-requests: write if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') steps: @@ -182,12 +161,13 @@ jobs: contents: write pull-requests: write actions: read - runs-on: ubuntu-latest + runs-on: ubuntu-slim if: ${{ github.repository_owner != 'microsoft' && github.event_name == 'issue_comment' && github.event.issue.pull_request && - contains(github.event.comment.body, '@check-spelling-bot apply') && + contains(github.event.comment.body, '@check-spelling-bot') && + contains(github.event.comment.body, 'apply') && contains(github.event.comment.body, 'https://') }} concurrency: diff --git a/.vscode/settings.json b/.vscode/settings.json index 0dd3cf37945..4fbffe8663c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -127,4 +127,5 @@ "**/obj/**": true, "**/packages/**": true, }, -} \ No newline at end of file + "sarif-viewer.connectToGithubCodeScanning": "on", +} diff --git a/doc/ConsoleHostSettings.md b/doc/ConsoleHostSettings.md index 7eef405c2da..1b9864038bb 100644 --- a/doc/ConsoleHostSettings.md +++ b/doc/ConsoleHostSettings.md @@ -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 it was a default setting or not. +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. ## Known Issues diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index 1756b7cc9df..11eb6989658 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -1765,7 +1765,7 @@ ] }, "ExportBufferAction": { - "description": "Arguments corresponding to a exportBuffer Action", + "description": "Arguments corresponding to an 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 a 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 an object, the key property of the object will be used to lookup a localized string resource for the command", "type": [ "string", "object", diff --git a/doc/specs/#1043 - Set the initial position of the Terminal/spec.md b/doc/specs/#1043 - Set the initial position of the Terminal/spec.md index 9d7966a491d..10b7b8dbc11 100644 --- a/doc/specs/#1043 - Set the initial position of the Terminal/spec.md +++ b/doc/specs/#1043 - Set the initial position of the Terminal/spec.md @@ -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 on 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 at 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 on 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 at the top left corner of the screen. ### Performance, Power, and Efficiency diff --git a/doc/specs/#11000 - Marks/Shell-Integration-Marks.md b/doc/specs/#11000 - Marks/Shell-Integration-Marks.md index 48e4112d930..e253614adee 100644 --- a/doc/specs/#11000 - Marks/Shell-Integration-Marks.md +++ b/doc/specs/#11000 - Marks/Shell-Integration-Marks.md @@ -68,7 +68,7 @@ allows the terminal to expose quick actions for: ### User Stories -This is a bit of a unusual section, as this feature was already partially +This is a bit of an unusual section, as this feature was already partially implemented when this spec was written. Story | Size | Description diff --git a/doc/specs/#1142 - Keybinding Arguments.md b/doc/specs/#1142 - Keybinding Arguments.md index 8073b9fa782..02ca2a6ddbd 100644 --- a/doc/specs/#1142 - Keybinding Arguments.md +++ b/doc/specs/#1142 - Keybinding Arguments.md @@ -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 a updated `AppKeyBindings::SetKeyBinding` call. +`AppKeyBindings` with an 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`. diff --git a/doc/specs/#1337 - Per-Profile Tab Colors/#1337 - Per-Profile Tab Colors.md b/doc/specs/#1337 - Per-Profile Tab Colors/#1337 - Per-Profile Tab Colors.md index e2830babbe7..099ed0d9f6f 100644 --- a/doc/specs/#1337 - Per-Profile Tab Colors/#1337 - Per-Profile Tab Colors.md +++ b/doc/specs/#1337 - Per-Profile Tab Colors/#1337 - Per-Profile Tab Colors.md @@ -100,7 +100,7 @@ No expected change Compatibility -This entire spec outlines how this feature is designed with a emphasis on future +This entire spec outlines how this feature is designed with an emphasis on future compatibility. As such, there are no expected regressions in the future when we do add support for themes. diff --git a/doc/specs/#1502 - Advanced Tab Switcher/spec.md b/doc/specs/#1502 - Advanced Tab Switcher/spec.md index c348ad5f524..39188b93e72 100644 --- a/doc/specs/#1502 - Advanced Tab Switcher/spec.md +++ b/doc/specs/#1502 - Advanced Tab Switcher/spec.md @@ -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`. 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: +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: ``` {"keys": ["ctrl+tab"], "command": {"action": "openTabSwitcher", "anchor":"ctrl", "displayOrder":"mruOrder"}} {"keys": ["ctrl+shift+p"], "command": {"action": "openTabSwitcher", "anchor":"ctrl", "displayOrder":"inOrder"}} diff --git a/doc/specs/#1564 - Settings UI/cascading-settings.md b/doc/specs/#1564 - Settings UI/cascading-settings.md index 0c358f945e2..f2a96b8c90a 100644 --- a/doc/specs/#1564 - Settings UI/cascading-settings.md +++ b/doc/specs/#1564 - Settings UI/cascading-settings.md @@ -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 changed 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 change it to the unlocked lock icon, and the control will become enabled. ![Locks inheritance](./inheritance-locks.png) diff --git a/doc/specs/#1564 - Settings UI/spec.md b/doc/specs/#1564 - Settings UI/spec.md index 77fe70d7dfa..50ccad6fd24 100644 --- a/doc/specs/#1564 - Settings UI/spec.md +++ b/doc/specs/#1564 - Settings UI/spec.md @@ -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 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 be defined in later design reviews. ## Inspiration diff --git a/doc/specs/#1571 - New Tab Menu Customization/#1571 - New Tab Menu Customization.md b/doc/specs/#1571 - New Tab Menu Customization/#1571 - New Tab Menu Customization.md index 45bd669f848..98149ea106d 100644 --- a/doc/specs/#1571 - New Tab Menu Customization/#1571 - New Tab Menu Customization.md +++ b/doc/specs/#1571 - New Tab Menu Customization/#1571 - New Tab Menu Customization.md @@ -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 a image to use as the icon. This + - The `"icon"` property provides a path to an 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 diff --git a/doc/specs/#1595 - Suggestions UI/Suggestions-UI.md b/doc/specs/#1595 - Suggestions UI/Suggestions-UI.md index b4bf0409adb..f38cd766e68 100644 --- a/doc/specs/#1595 - Suggestions UI/Suggestions-UI.md +++ b/doc/specs/#1595 - Suggestions UI/Suggestions-UI.md @@ -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 a accessor on `TermControl` +* [ ] Expose the recent commands as an 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 a extension that provides some commands for the user, like a +the user. Consider an 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. diff --git a/doc/specs/#1790 - Font features and axes-spec.md b/doc/specs/#1790 - Font features and axes-spec.md index bc524a40991..d3736ea83f0 100644 --- a/doc/specs/#1790 - Font features and axes-spec.md +++ b/doc/specs/#1790 - Font features and axes-spec.md @@ -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 the axis should be set to. 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 for the axis. 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. diff --git a/doc/specs/#2046 - Command Palette.md b/doc/specs/#2046 - Command Palette.md index 200b84a03ec..91e46d01dc5 100644 --- a/doc/specs/#2046 - Command Palette.md +++ b/doc/specs/#2046 - Command Palette.md @@ -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 a argument to this action that specifies whether the +should make sure to add an 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 also refer to: +original draft. Please refer to: * June 2020: Unified keybindings and commands, and synthesized action names. @@ -578,7 +578,7 @@ original draft. Please also 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 the commands the user typed in Commandline Mode could be +* It would be cool if 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 diff --git a/doc/specs/#492 - Default Terminal/spec.md b/doc/specs/#492 - Default Terminal/spec.md index c85982c64f9..31a232bc35b 100644 --- a/doc/specs/#492 - Default Terminal/spec.md +++ b/doc/specs/#492 - Default Terminal/spec.md @@ -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 the `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 that `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 Ctrl+C 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 the 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 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 for Terminal but with `comctl` controls over XAML +/- a link to the Windows Settings panel + - Same as 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. diff --git a/doc/specs/#5000 - Process Model 2.0/#1032 - Elevation Quality of Life Improvements.md b/doc/specs/#5000 - Process Model 2.0/#1032 - Elevation Quality of Life Improvements.md index 4535ff304a2..a239c4979ed 100644 --- a/doc/specs/#5000 - Process Model 2.0/#1032 - Elevation Quality of Life Improvements.md +++ b/doc/specs/#5000 - Process Model 2.0/#1032 - Elevation Quality of Life Improvements.md @@ -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 a unelevated window. +We cannot support mixed elevation when starting in an 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 a enum-backed +incrementally improve from no setting, to a boolean setting, to an enum-backed one. ### Configuring a profile to always run elevated diff --git a/doc/specs/#5000 - Process Model 2.0/#4472 - Windows Terminal Session Management.md b/doc/specs/#5000 - Process Model 2.0/#4472 - Windows Terminal Session Management.md index 625ef51e927..05ec6f39930 100644 --- a/doc/specs/#5000 - Process Model 2.0/#4472 - Windows Terminal Session Management.md +++ b/doc/specs/#5000 - Process Model 2.0/#4472 - Windows Terminal Session Management.md @@ -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 a overlay +* [ ] Add an action that will cause all windows to briefly display an overlay with the current window ID and name. This would be something like the "identify" feature of the Windows "Display" settings. diff --git a/doc/specs/#5000 - Process Model 2.0/#5000 - Process Model 2.0.md b/doc/specs/#5000 - Process Model 2.0/#5000 - Process Model 2.0.md index 620e5c30a60..71e46339df5 100644 --- a/doc/specs/#5000 - Process Model 2.0/#5000 - Process Model 2.0.md +++ b/doc/specs/#5000 - Process Model 2.0/#5000 - Process Model 2.0.md @@ -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 it's `payload` that its current page is the "globals" page. + also specified in its `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 the UI layer calls on the core as +8. (Dependent on 7): Expose the methods that 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 a elevated window can host an unelevated content +* [x] Experimentally prove that an 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 also refer to: +original draft. Please refer to: * November 2020: Windows Terminal Window Management diff --git a/doc/specs/#532 - Panes and Split Windows.md b/doc/specs/#532 - Panes and Split Windows.md index d6563c0a89e..dacf00b5272 100644 --- a/doc/specs/#532 - Panes and Split Windows.md +++ b/doc/specs/#532 - Panes and Split Windows.md @@ -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 it's focused pane. The +The tab's state will be updated to reflect the state of its 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 it's children. If the sibling of the closing pane is a +remove the pane as one of its 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 it's current form. There are many +The Pane implementation isn't complete in its current form. There are many additional things that could be done to improve the user experience. This is by no means a comprehensive list. diff --git a/doc/specs/#605 - Search/spec.md b/doc/specs/#605 - Search/spec.md index e828cec0f8e..eb42ed6145c 100644 --- a/doc/specs/#605 - Search/spec.md +++ b/doc/specs/#605 - Search/spec.md @@ -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 a 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 an 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. ![SearchBox mockup, arrow button clicked](images/SearchBoxUpSelected.png) -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. +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. #### Search process 1. The user presses ctrl+shift+f (or user's custom key binding) to open the search box. Focus will move to the TextBox. diff --git a/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md b/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md index b2937011bfc..b5e7f8f337b 100644 --- a/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md +++ b/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md @@ -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 it's +# Start cmd.exe, then split it vertically (with the first taking 70% of its # 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 need to also escape those semicolons for powershell first. That +the user would also need to 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 \`; diff --git a/doc/specs/#653 - Quake Mode/#653 - Quake Mode.md b/doc/specs/#653 - Quake Mode/#653 - Quake Mode.md index 9bf32e33d06..ebc117031c6 100644 --- a/doc/specs/#653 - Quake Mode/#653 - Quake Mode.md +++ b/doc/specs/#653 - Quake Mode/#653 - Quake Mode.md @@ -69,7 +69,7 @@ To implement this feature, we'll add the following settings: ### `globalSummon` Action -The `globalSummon` action will be a keybinding the user can use to summon a +The `globalSummon` action will be a keybinding that 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. --> "any"
Summon the MRU window -Go to the desktop the window is on (leave position alone) +Go to the desktop with the window (leave position alone) Move the window to this desktop (leave position alone) @@ -196,7 +196,7 @@ Else: "toCurrent"
Summon the MRU window TO the monitor with the foreground window -Go to the desktop the window is on, move to the monitor with the foreground window +Go to the desktop with the window, move to the monitor with the foreground window Move the window to this desktop, move to the monitor with the foreground window @@ -213,7 +213,7 @@ Else: "toMouse" [2]
Summon the MRU window TO the monitor with the mouse -Go to the desktop the window is on, move to the monitor with the mouse +Go to the desktop with the window, move to the monitor with the mouse Move the window to this desktop, move to the monitor with the mouse @@ -230,7 +230,7 @@ Else: If there is a window on this monitor on any desktop, -* Go to the desktop the window is on (leave position alone) +* Go to the desktop with the window (leave position alone) else * Create a new window on this monitor & desktop @@ -262,7 +262,7 @@ Else (one on this desktop & monitor) If there is a window on monitor N on any desktop, -* Go to the desktop the window is on (leave position alone) +* Go to the desktop with the window (leave position alone) else * Create a new window on this monitor & desktop diff --git a/doc/specs/#754 - Cascading Default Settings.md b/doc/specs/#754 - Cascading Default Settings.md index 5d43c2d0c06..158bfb77ee1 100644 --- a/doc/specs/#754 - Cascading Default Settings.md +++ b/doc/specs/#754 - Cascading Default Settings.md @@ -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 a entry in the user settings. The generator +if each and every one already has an 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 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 that 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 Alt while clicking on the button would open the diff --git a/doc/specs/#8324 - Application State (TSM).md b/doc/specs/#8324 - Application State (TSM).md index 70582d3a21f..a44a20564cc 100644 --- a/doc/specs/#8324 - Application State (TSM).md +++ b/doc/specs/#8324 - Application State (TSM).md @@ -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 "don't not ask me again about those things that, some time ago, I told you to not ask me about". +dialogs" or "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. diff --git a/doc/specs/Proto extensions-spec.md b/doc/specs/Proto extensions-spec.md index 039da21d532..473da1eb268 100644 --- a/doc/specs/Proto extensions-spec.md +++ b/doc/specs/Proto extensions-spec.md @@ -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 the user settings are eventually layered onto profiles) is because we +field rather than a `"guid"` field (like the way that 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 the profile looks in the user's settings file. The Azure cloud shell profile +**NOTE**: This will *not* change the way that 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 diff --git a/doc/specs/drafts/#1256 - Tab tearoff.md b/doc/specs/drafts/#1256 - Tab tearoff.md index fa1b2e9a0d5..fdf13bdf8d4 100644 --- a/doc/specs/drafts/#1256 - Tab tearoff.md +++ b/doc/specs/drafts/#1256 - Tab tearoff.md @@ -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 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 that 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 diff --git a/doc/specs/drafts/#3327 - Application Theming/#3327 - Application Theming.md b/doc/specs/drafts/#3327 - Application Theming/#3327 - Application Theming.md index e956b334913..14df79f488c 100644 --- a/doc/specs/drafts/#3327 - Application Theming/#3327 - Application Theming.md +++ b/doc/specs/drafts/#3327 - Application Theming/#3327 - Application Theming.md @@ -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 also refer to: +in the Terminal. Please refer to: * [Mica in the Terminal] diff --git a/doc/specs/drafts/#997 Non-Terminal-Panes.md b/doc/specs/drafts/#997 Non-Terminal-Panes.md index 7dc2060d289..f34b1dd86d4 100644 --- a/doc/specs/drafts/#997 Non-Terminal-Panes.md +++ b/doc/specs/drafts/#997 Non-Terminal-Panes.md @@ -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 a event handler to try and have the + for non-terminal controls, we add an 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 diff --git a/src/buffer/out/textBuffer.cpp b/src/buffer/out/textBuffer.cpp index 3a29409a827..482892e419d 100644 --- a/src/buffer/out/textBuffer.cpp +++ b/src/buffer/out/textBuffer.cpp @@ -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 a allocSize of 8GiB. + // 65535*65535 cells would result in an 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(h) + 1; @@ -2724,7 +2724,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 +2844,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 the cursor is on. + // We need to ensure not to overwrite the row containing the cursor. if (newY >= newYLimit) { break; diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj index 465f41ca943..317109ed354 100644 --- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj +++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj @@ -103,7 +103,7 @@ - + $(OCExecutionAliasName).exe diff --git a/src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp b/src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp index df5032ffdf1..d3f2647bc8c 100644 --- a/src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp +++ b/src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp @@ -741,7 +741,7 @@ namespace TerminalAppLocalTests void SettingsTests::TestNestedInIterableCommand() { - // This test checks a iterable command that includes a nested command. + // This test checks an iterable command that includes a nested command. // The commands should look like: // // diff --git a/src/cascadia/TerminalApp/AppLogic.cpp b/src/cascadia/TerminalApp/AppLogic.cpp index f601ec8cf17..1fc52d26328 100644 --- a/src/cascadia/TerminalApp/AppLogic.cpp +++ b/src/cascadia/TerminalApp/AppLogic.cpp @@ -294,7 +294,7 @@ namespace winrt::TerminalApp::implementation } // Method Description: - // - Registers for changes to the settings folder and upon a updated settings + // - Registers for changes to the settings folder and upon an updated settings // profile calls ReloadSettings(). // Arguments: // - @@ -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 oftentimes happen with text + // settings.json. This second case will often 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, diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp index acf888fa263..61607319f16 100644 --- a/src/cascadia/TerminalApp/CommandPalette.cpp +++ b/src/cascadia/TerminalApp/CommandPalette.cpp @@ -741,10 +741,10 @@ namespace winrt::TerminalApp::implementation } // Method Description: - // - 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. + // - 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. // 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 - // make the command palette - that was just closed - visible again. + // to make the command palette - that was just closed - visible again. // All other actions can just be dispatched. if (command.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette) { diff --git a/src/cascadia/TerminalApp/Pane.cpp b/src/cascadia/TerminalApp/Pane.cpp index ed02e5250e1..85354101b68 100644 --- a/src/cascadia/TerminalApp/Pane.cpp +++ b/src/cascadia/TerminalApp/Pane.cpp @@ -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: what fraction of the pane the new pane should get +// - splitSize: the fraction of the pane that 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. diff --git a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw index d27ae8e6aba..eb1c317e18d 100644 --- a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw @@ -851,11 +851,11 @@ Active pane moved to "{0}" tab - {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. + {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. "{0}" tab moved to "{1}" window - {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. + {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. "{0}" tab moved to new window @@ -867,7 +867,7 @@ Active pane moved to "{0}" window - {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. + {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. Active pane moved to new window diff --git a/src/cascadia/TerminalApp/SuggestionsControl.cpp b/src/cascadia/TerminalApp/SuggestionsControl.cpp index 048fb1968e6..29f3215df63 100644 --- a/src/cascadia/TerminalApp/SuggestionsControl.cpp +++ b/src/cascadia/TerminalApp/SuggestionsControl.cpp @@ -686,8 +686,8 @@ namespace winrt::TerminalApp::implementation } // Method Description: - // - Helper method for retrieving the action from a command the user - // selected, and dispatching that command. Also fires a tracelogging event + // - Helper method to retrieve the action from the user selected command, + // and dispatch that command. Also fires a tracelogging event // indicating that the user successfully found the action they were // looking for. // Arguments: diff --git a/src/cascadia/TerminalApp/Tab.cpp b/src/cascadia/TerminalApp/Tab.cpp index 4bbf58e50ad..42fb9ab6248 100644 --- a/src/cascadia/TerminalApp/Tab.cpp +++ b/src/cascadia/TerminalApp/Tab.cpp @@ -654,7 +654,7 @@ namespace winrt::TerminalApp::implementation _activePane = original; - // Add a event handlers to the new panes' GotFocus event. When the pane + // Add 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 : in the case the profile name differs from the title + // or : if the profile name differs from the title // Arguments: // - // Return Value: @@ -2353,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 we do have a unfocused color in the theme, use the + // tabColor, but if we have an unfocused color in the theme, use the // unfocused theme color here instead. if (!GetTabColor().has_value() && _unfocusedThemeColor != nullptr) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 2e752bc7756..c715b0e2a11 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -4727,7 +4727,7 @@ namespace winrt::TerminalApp::implementation // Function Description: // - Helper to launch a new WT instance elevated. It'll do this by spawning - // a helper process, who will asking the shell to elevate the process for + // a helper process, that will ask 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: diff --git a/src/cascadia/TerminalApp/TerminalWindow.cpp b/src/cascadia/TerminalApp/TerminalWindow.cpp index 266ece81db7..b2fa349e40c 100644 --- a/src/cascadia/TerminalApp/TerminalWindow.cpp +++ b/src/cascadia/TerminalApp/TerminalWindow.cpp @@ -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 - // a indicator that it needs to dismiss any open flyouts. + // an indicator that it needs to dismiss any open flyouts. // Arguments: // - // Return Value: diff --git a/src/cascadia/TerminalConnection/AzureConnection.cpp b/src/cascadia/TerminalConnection/AzureConnection.cpp index 72208af1009..81f5940ebfe 100644 --- a/src/cascadia/TerminalConnection/AzureConnection.cpp +++ b/src/cascadia/TerminalConnection/AzureConnection.cpp @@ -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 the code is still valid for + // - the duration for which the code is still valid // 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 the cloud shell team itself does it + // the logic here is based on the way that the cloud shell team itself does it winrt::hstring finalSocketUri; const std::wstring_view wCloudShellUri{ _cloudShellUri }; diff --git a/src/cascadia/TerminalConnection/CTerminalHandoff.cpp b/src/cascadia/TerminalConnection/CTerminalHandoff.cpp index c132a746159..a3bef730a20 100644 --- a/src/cascadia/TerminalConnection/CTerminalHandoff.cpp +++ b/src/cascadia/TerminalConnection/CTerminalHandoff.cpp @@ -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 a event handler is not registered before calling. `::DuplicateHandle` +// - E_NOT_VALID_STATE if an 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) diff --git a/src/cascadia/TerminalControl/ControlCore.cpp b/src/cascadia/TerminalControl/ControlCore.cpp index 7b9d05e5a3d..6f4ed75321f 100644 --- a/src/cascadia/TerminalControl/ControlCore.cpp +++ b/src/cascadia/TerminalControl/ControlCore.cpp @@ -2309,7 +2309,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation // The absolute cursor coordinate. const auto cursor = _terminal->GetViewportRelativeCursorPosition(); - // GH#18732: Users want the row the cursor is on to be preserved across clears. + // GH#18732: Users want the row that the cursor is on to be preserved across clears. std::wstring sequence; if (clearType == ClearBufferType::Scrollback || clearType == ClearBufferType::All) @@ -2859,7 +2859,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation if (markStart <= pos && markEnd >= pos) { - // ... select the part of the mark the caller told us about. + // ... select the part of the mark that the caller told us about. _selectSpan(getSpan(m)); // And quick bail return; diff --git a/src/cascadia/TerminalControl/HwndTerminalAutomationPeer.cpp b/src/cascadia/TerminalControl/HwndTerminalAutomationPeer.cpp index 92724a2c675..ae3ccc5c04a 100644 --- a/src/cascadia/TerminalControl/HwndTerminalAutomationPeer.cpp +++ b/src/cascadia/TerminalControl/HwndTerminalAutomationPeer.cpp @@ -140,7 +140,7 @@ void HwndTerminalAutomationPeer::NotifyNewOutput(std::wstring_view newOutput) } // Try to suppress any events (or event data) - // that is just the keypress the user made + // that is just the keypress that the user made auto sanitized{ Sanitize(newOutput) }; while (!_keyEvents.empty() && IsReadable(sanitized)) { diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index 61690a723b4..a616bec79ac 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -586,7 +586,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation const auto data = buffer.data(); const auto stride = scrollBarWidthInPx * sizeof(til::color); - // The bitmap has the size of the entire scrollbar, but we want the marks to only show in the range the "thumb" + // The bitmap has the size of the entire scrollbar, but we want the marks to only show in the range that the "thumb" // (the scroll indicator) can move. That's why we need to add an offset to the start of the drawable bitmap area // (to offset the decrease button) and subtract twice that (to offset the increase button as well). // diff --git a/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp b/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp index bf49dd2e855..4ed8fc524f4 100644 --- a/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp +++ b/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp @@ -213,7 +213,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation { auto sanitized{ Sanitize(newOutput) }; // Try to suppress any events (or event data) - // that are just the keypresses the user made + // that are just the keypresses that the user made { auto keyEvents = _keyEvents.lock(); while (!keyEvents->empty() && IsReadable(sanitized)) diff --git a/src/cascadia/TerminalCore/Terminal.cpp b/src/cascadia/TerminalCore/Terminal.cpp index afdb6b4f459..39a0406278f 100644 --- a/src/cascadia/TerminalCore/Terminal.cpp +++ b/src/cascadia/TerminalCore/Terminal.cpp @@ -735,7 +735,7 @@ TerminalInput::OutputType Terminal::SendCharEvent(const wchar_t ch, const WORD s } // GH#1527: When the user has auto mark prompts enabled, we're going to try - // and heuristically detect if this was the line the prompt was on. + // and heuristically detect if this was the line with the prompt. // * If the key was an Enter keypress (Terminal.app also marks ^C keypresses // as prompts. That's omitted for now.) // * AND we're not in the alt buffer diff --git a/src/cascadia/TerminalSettingsEditor/Appearances.cpp b/src/cascadia/TerminalSettingsEditor/Appearances.cpp index c7548e636bc..ec66af8cd02 100644 --- a/src/cascadia/TerminalSettingsEditor/Appearances.cpp +++ b/src/cascadia/TerminalSettingsEditor/Appearances.cpp @@ -59,7 +59,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation }; // Turns a DWRITE_MAKE_OPENTYPE_TAG into a string_view... - // (...buffer holder because someone needs to hold onto the data the view refers to.) + // (...buffer holder because someone needs to hold onto the data to which the view refers.) static TagToStringImpl tagToString(uint32_t tag) noexcept { return TagToStringImpl{ tag }; @@ -1425,9 +1425,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation // button won't work right. }); - // make sure to send all the property changed events once here - // we do this in the case an old appearance was deleted and then a new one is created, - // the old settings need to be updated in xaml + // make sure to send all the property changed events once here. + // we do this so that if an old appearance was deleted and then a new one created, + // the old settings are updated in xaml PropertyChanged.raise(*this, PropertyChangedEventArgs{ L"CurrentCursorShape" }); PropertyChanged.raise(*this, PropertyChangedEventArgs{ L"IsVintageCursor" }); PropertyChanged.raise(*this, PropertyChangedEventArgs{ L"CurrentColorScheme" }); diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw index 29137c94f02..9eb703a6e2e 100644 --- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw @@ -293,7 +293,7 @@ Header for a control to set the query URL when using the "search web" action. - The placeholder "%s" will replaced with the search query. + The placeholder "%s" will be replaced with the search query. {Locked="%s"} Additional text presented near "Globals_SearchWebDefaultQueryUrl.Header". @@ -507,7 +507,7 @@ Hide the title bar (requires relaunch) - Header for a control to toggle whether the title bar should be shown or not. Changing this setting requires the user to relaunch the app. + Header for a control to toggle whether or not the title bar should be shown. Changing this setting requires the user to relaunch the app. When disabled, the title bar will appear above the tabs. @@ -1195,15 +1195,15 @@ Starting directory - Name for a control to determine the directory the session opens it at launch. This is on a text box that accepts folder paths. + Name for a control to determine the session's initial directory. This is on a text box that accepts folder paths. Starting directory - Header for a control to determine the directory the session opens it at launch. This is on a text box that accepts folder paths. + Header for a control to determine the session's initial directory. This is on a text box that accepts folder paths. Starting directory - Name for a control to determine the directory the session opens it at launch. This is on a text box that accepts folder paths. + Name for a control to determine the session's initial directory. This is on a text box that accepts folder paths. The directory the profile starts in when it is loaded. @@ -2147,7 +2147,7 @@ Shortcut - The label for a "key chord listener" control that sets the keys a key binding is bound to. + The label for a "key chord listener" control that sets the keys to which a key binding is bound. Text Formatting diff --git a/src/cascadia/TerminalSettingsModel/IDynamicProfileGenerator.h b/src/cascadia/TerminalSettingsModel/IDynamicProfileGenerator.h index 9144bcb3259..95b18655a64 100644 --- a/src/cascadia/TerminalSettingsModel/IDynamicProfileGenerator.h +++ b/src/cascadia/TerminalSettingsModel/IDynamicProfileGenerator.h @@ -6,7 +6,7 @@ Module Name: - IDynamicProfileGenerator Abstract: -- The DynamicProfileGenerator interface. A dynamic profile generator is a object +- The DynamicProfileGenerator interface. A dynamic profile generator is an object that can synthesize a list of profiles based on some arbitrary, typically external criteria. Profiles from dynamic sources are only available in the user's profiles if the generator actually ran and created the profile. diff --git a/src/cascadia/TerminalSettingsModel/Theme.cpp b/src/cascadia/TerminalSettingsModel/Theme.cpp index 3b79b5297d7..e53c72a79e4 100644 --- a/src/cascadia/TerminalSettingsModel/Theme.cpp +++ b/src/cascadia/TerminalSettingsModel/Theme.cpp @@ -162,7 +162,7 @@ winrt::WUX::Media::Brush ThemeColor::Evaluate(const winrt::WUX::ResourceDictiona // Method Description: // - This is not an actual property on a theme color setting, but rather // something derived from the value itself. This is "the opacity we should use -// for this ThemeColor should it be used as a unfocusedTab color". Basically, +// for this ThemeColor should it be used as an unfocusedTab color". Basically, // terminalBackground and accent use 30% opacity when set, to match the how // inactive tabs were colored before themes existed. // Arguments: diff --git a/src/cascadia/UIHelpers/TextMenuFlyout.h b/src/cascadia/UIHelpers/TextMenuFlyout.h index 87a6d9a3f94..c134577d51c 100644 --- a/src/cascadia/UIHelpers/TextMenuFlyout.h +++ b/src/cascadia/UIHelpers/TextMenuFlyout.h @@ -9,7 +9,7 @@ namespace winrt::Microsoft::Terminal::UI::implementation { // This custom flyout exists because WinUI 2 only supports 1 text block flyout // *per thread* not per window. If you have >1 window per 1 thread, as we do, - // the focus will just be delegated to the window the flyout was first opened in. + // the focus will just be delegated to the window that opened the first flyout. // Once the first window is gone, WinUI will either do nothing or crash. // See: GH#18599 struct TextMenuFlyout : TextMenuFlyoutT diff --git a/src/cascadia/UIMarkdown/MarkdownToXaml.cpp b/src/cascadia/UIMarkdown/MarkdownToXaml.cpp index eb515898b20..ecdea1e88e2 100644 --- a/src/cascadia/UIMarkdown/MarkdownToXaml.cpp +++ b/src/cascadia/UIMarkdown/MarkdownToXaml.cpp @@ -219,7 +219,7 @@ void MarkdownToXaml::_RenderNode(cmark_node* node, cmark_event_type ev_type) } case CMARK_NODE_ITEM: - // A list item, either for a ordered list or an unordered one. + // A list item, either for an ordered list or an unordered one. if (entering) { _EndParagraph(); diff --git a/src/cascadia/UnitTests_Control/ControlCoreTests.cpp b/src/cascadia/UnitTests_Control/ControlCoreTests.cpp index 5b242b82352..7a0ef5134fe 100644 --- a/src/cascadia/UnitTests_Control/ControlCoreTests.cpp +++ b/src/cascadia/UnitTests_Control/ControlCoreTests.cpp @@ -598,7 +598,7 @@ namespace ControlUnitTests } Log::Comment(L"then move the cursor to the left"); - // This emulates the state the buffer is in when pwsh does it's "ghost + // This emulates the state the buffer is in when pwsh does its "ghost // text" thing. We don't want to include all that ghost text in the // current commandline. conn->WriteInput(winrt_wstring_to_array_view(L"\x1b[D")); @@ -682,7 +682,7 @@ namespace ControlUnitTests void ControlCoreTests::TestSelectOutputExactWrap() { // Just like the TestSelectOutputScrolling test, but these lines will - // exactly wrap to the right edge of the buffer, to catch a edge case + // exactly wrap to the right edge of the buffer, to catch an edge case // present in `ControlCore::_selectSpan` auto [settings, conn] = _createSettingsAndConnection(); Log::Comment(L"Create ControlCore object"); diff --git a/src/cascadia/UnitTests_SettingsModel/ProfileTests.cpp b/src/cascadia/UnitTests_SettingsModel/ProfileTests.cpp index 7697715b8f8..76ae58bba6c 100644 --- a/src/cascadia/UnitTests_SettingsModel/ProfileTests.cpp +++ b/src/cascadia/UnitTests_SettingsModel/ProfileTests.cpp @@ -222,7 +222,7 @@ namespace SettingsModelUnitTests VERIFY_ARE_EQUAL(L"not-null.png", profile0->Icon().Path()); Log::Comment(NoThrowString().Format( - L"Verify that layering an object the key set to null will clear the key")); + L"Verify that layering an object with the key set to null will clear the key")); profile0->LayerJson(profile1Json); VERIFY_IS_TRUE(profile0->Icon().Path().empty()); diff --git a/src/cascadia/UnitTests_TerminalCore/InputTest.cpp b/src/cascadia/UnitTests_TerminalCore/InputTest.cpp index 01436fcddf3..97a8b218905 100644 --- a/src/cascadia/UnitTests_TerminalCore/InputTest.cpp +++ b/src/cascadia/UnitTests_TerminalCore/InputTest.cpp @@ -38,10 +38,10 @@ namespace TerminalCoreUnitTests { // Tests GH:637 - // Verify that Alt+a generates a lowercase a on the input + // Verify that Alt+a generates a lowercase 'a' on the input VERIFY_ARE_EQUAL(escChar(L'a'), term.SendCharEvent(L'a', 0, ControlKeyStates::LeftAltPressed)); - // Verify that Alt+shift+a generates a uppercase a on the input + // Verify that Alt+shift+a generates an uppercase 'a' on the input VERIFY_ARE_EQUAL(escChar(L'A'), term.SendCharEvent(L'A', 0, ControlKeyStates::LeftAltPressed | ControlKeyStates::ShiftPressed)); } diff --git a/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp b/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp index 07eba616f1d..5ab07ef7607 100644 --- a/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp +++ b/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp @@ -673,7 +673,7 @@ int NonClientIslandWindow::_GetResizeHandleHeight() const noexcept auto state = (UINT)SHAppBarMessage(ABM_GETSTATE, &autohide); if (WI_IsFlagSet(state, ABS_AUTOHIDE)) { - // This helper can be used to determine if there's a auto-hide + // This helper can be used to determine if there's an auto-hide // taskbar on the given edge of the monitor we're currently on. auto hasAutohideTaskbar = [&monInfo](const UINT edge) -> bool { APPBARDATA data{ 0 }; diff --git a/src/host/ConsoleArguments.cpp b/src/host/ConsoleArguments.cpp index a0c6fb18373..ec88e5e9013 100644 --- a/src/host/ConsoleArguments.cpp +++ b/src/host/ConsoleArguments.cpp @@ -315,7 +315,7 @@ void ConsoleArguments::s_ConsumeArg(_Inout_ std::vector& args, _In } else { - // If we're trying to set the handle a second time, invalid. + // If we're trying to set the handle again, invalid. hr = E_INVALIDARG; } diff --git a/src/host/PtySignalInputThread.cpp b/src/host/PtySignalInputThread.cpp index 063d3d4c4db..a9bf8e2a114 100644 --- a/src/host/PtySignalInputThread.cpp +++ b/src/host/PtySignalInputThread.cpp @@ -30,7 +30,7 @@ PtySignalInputThread::PtySignalInputThread(wil::unique_hfile hPipe) : PtySignalInputThread::~PtySignalInputThread() { - // Manually terminate our thread during unittesting. Otherwise, the test + // Manually terminate our thread during unit testing. Otherwise, the test // will finish, but TAEF will not manually kill the test. #ifdef UNIT_TESTING TerminateThread(_hThread.get(), 0); diff --git a/src/host/_stream.cpp b/src/host/_stream.cpp index 235ba52b10f..14d0bf91df6 100644 --- a/src/host/_stream.cpp +++ b/src/host/_stream.cpp @@ -126,7 +126,7 @@ static void AdjustCursorPosition(SCREEN_INFORMATION& screenInfo, _In_ til::point buffer.IncrementCircularBuffer(buffer.GetCurrentAttributes()); // TODO: This is very bad for performance. - // Track the total scroll offset as a int64 in buffer --> No need to track it here anymore. + // Track the total scroll offset as an int64 in buffer --> No need to track it here anymore. if (buffer.IsActiveBuffer()) { auto& an = ServiceLocator::LocateGlobals().accessibilityNotifier; diff --git a/src/host/ft_host/API_InputTests.cpp b/src/host/ft_host/API_InputTests.cpp index 3bb9f39b66d..26240440388 100644 --- a/src/host/ft_host/API_InputTests.cpp +++ b/src/host/ft_host/API_InputTests.cpp @@ -681,7 +681,7 @@ void InputTests::RawReadUnpacksCoalescedInputRecords() SetConsoleMode(hIn, mode); // flush input queue before attempting to add new events and check - // in case any are leftover from previous tests + // in case any are left over from previous tests VERIFY_WIN32_BOOL_SUCCEEDED(FlushConsoleInputBuffer(hIn)); INPUT_RECORD record; diff --git a/src/host/ft_host/API_RgbColorTests.cpp b/src/host/ft_host/API_RgbColorTests.cpp index 42f5334a6f1..4d1304c1af4 100644 --- a/src/host/ft_host/API_RgbColorTests.cpp +++ b/src/host/ft_host/API_RgbColorTests.cpp @@ -78,7 +78,7 @@ class RgbColorTests TEST_METHOD(TestVT256Grid); }; -// Takes windows 16 color table index, and returns a int for the equivalent SGR sequence +// Takes windows 16 color table index, and returns an int for the equivalent SGR sequence WORD WinToVTColor(int winColor, bool isForeground) { auto red = (winColor & FOREGROUND_RED) > 0; diff --git a/src/host/ft_host/CJK_DbcsTests.cpp b/src/host/ft_host/CJK_DbcsTests.cpp index a773a31486b..dc4398230ef 100644 --- a/src/host/ft_host/CJK_DbcsTests.cpp +++ b/src/host/ft_host/CJK_DbcsTests.cpp @@ -21,7 +21,7 @@ constexpr CHAR_INFO makeCharInfo(T ch, WORD attr) CHAR_INFO info{}; // If T is a char, it'll be a signed integer, whereas UnicodeChar is an unsigned one. // A negative char like -1 would then result in a wchar_t of 0xffff instead of the expected 0xff. - // Casting ch to a unsigned integer first prevents such "sign extension". + // Casting ch to an unsigned integer first prevents such "sign extension". info.Char.UnicodeChar = static_cast(til::as_unsigned(ch)); info.Attributes = attr; return info; diff --git a/src/host/ft_integrity/IntegrityTest.cpp b/src/host/ft_integrity/IntegrityTest.cpp index 0ca45b0b5d1..a5a79ebbea6 100644 --- a/src/host/ft_integrity/IntegrityTest.cpp +++ b/src/host/ft_integrity/IntegrityTest.cpp @@ -131,7 +131,7 @@ bool IntegrityTest::ClassSetup() VERIFY_IS_NOT_NULL(appAumids); VERIFY_ARE_EQUAL(appAumids->Size, 1u); - // save off aumid + // save off AUMID this->_appAumid = appAumids->GetAt(0); return true; diff --git a/src/host/getset.cpp b/src/host/getset.cpp index 73c4a7fded7..13e49724a29 100644 --- a/src/host/getset.cpp +++ b/src/host/getset.cpp @@ -874,7 +874,7 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont NewWindowSize.height = CalcWindowSizeY(Window); // see MSFT:17415266 - // If we have a actual head, we care about the maximum size the window can be. + // If we have an actual head, we care about the maximum size the window can be. // if we're headless, not so much. However, GetMaxWindowSizeInCharacters // will only return the buffer size, so we can't use that to clip the arg here. // So only clip the requested size if we're not headless diff --git a/src/host/inputBuffer.cpp b/src/host/inputBuffer.cpp index 240b3ee3291..ecc9f4633be 100644 --- a/src/host/inputBuffer.cpp +++ b/src/host/inputBuffer.cpp @@ -743,7 +743,7 @@ void InputBuffer::_WriteBuffer(const std::span& inEvents, _O // - Coalescing here means updating a record that already exists in // the buffer with updated values from an incoming event, instead of // storing the incoming event (which would make the original one -// redundant/out of date with the most current state). +// redundant/out-of-date with the most current state). bool InputBuffer::_CoalesceEvent(const INPUT_RECORD& inEvent) noexcept { auto& lastEvent = _storage.back(); diff --git a/src/host/inputKeyInfo.cpp b/src/host/inputKeyInfo.cpp index 01554c3ac42..40c7ad5e0e5 100644 --- a/src/host/inputKeyInfo.cpp +++ b/src/host/inputKeyInfo.cpp @@ -92,7 +92,7 @@ const bool INPUT_KEY_INFO::IsShiftAndCtrlOnly() const } // Routine Description: -// - Helps determine if this key input represents a alt+KEY combo +// - Helps determine if this key input represents an alt+KEY combo // Arguments: // - // Return Value: diff --git a/src/host/output.cpp b/src/host/output.cpp index e0dd534ef01..74a0f42283f 100644 --- a/src/host/output.cpp +++ b/src/host/output.cpp @@ -381,7 +381,7 @@ void ScrollRegion(SCREEN_INFORMATION& screenInfo, const auto originalTargetOrigin = target.Origin(); target = Viewport::Intersect(clip, target); - // OK, if the target became smaller than before, we need to also adjust the source accordingly + // OK, if the target became smaller than before, we also need to adjust the source accordingly // so we don't waste time loading up/copying things that have no place to go within the target. { const auto currentTargetOrigin = target.Origin(); diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp index 3852f8a8f42..df07c620d65 100644 --- a/src/host/outputStream.cpp +++ b/src/host/outputStream.cpp @@ -192,7 +192,7 @@ void ConhostInternalGetSet::SetWindowTitle(std::wstring_view title) // screen buffer and an alternate. This creates a new alternate, and switches to it. // If there is an already existing alternate, it is discarded. // Arguments: -// - attrs - the attributes the buffer is initialized with. +// - attrs - the attributes for initializing the buffer. // Return Value: // - void ConhostInternalGetSet::UseAlternateScreenBuffer(const TextAttribute& attrs) diff --git a/src/host/proxy/ITerminalHandoff.idl b/src/host/proxy/ITerminalHandoff.idl index f48bc10f691..de2a153650f 100644 --- a/src/host/proxy/ITerminalHandoff.idl +++ b/src/host/proxy/ITerminalHandoff.idl @@ -64,7 +64,7 @@ typedef struct _TERMINAL_STARTUP_INFO }; // Quite a while later, we realized that passing the in/out handles as [in] instead of [out] has always been flawed. -// It prevents the terminal from making choices over the pipe buffer size and whether to use overlapped IO or not. +// It prevents the terminal from making choices over the pipe buffer size and whether or not to use overlapped IO. // The other handles remain [in] parameters because they have always been created internally by ConPTY. // Additionally, passing TERMINAL_STARTUP_INFO by-value was unusual under COM as structs are usually given by-ref. [ diff --git a/src/host/screenInfo.cpp b/src/host/screenInfo.cpp index 51beb398225..b0372755d83 100644 --- a/src/host/screenInfo.cpp +++ b/src/host/screenInfo.cpp @@ -1764,7 +1764,7 @@ const SCREEN_INFORMATION* SCREEN_INFORMATION::GetAltBuffer() const noexcept // machine with the main buffer it belongs to. // TODO: MSFT:19817348 Don't create alt screenbuffer's via an out SCREEN_INFORMATION** // Parameters: -// - initAttributes - the attributes the buffer is initialized with. +// - initAttributes - the attributes for initializing the buffer. // - ppsiNewScreenBuffer - a pointer to receive the newly created buffer. // Return value: // - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. @@ -1871,7 +1871,7 @@ void SCREEN_INFORMATION::_handleDeferredResize(SCREEN_INFORMATION& siMain) // screen buffer and an alternate. ASBSET creates a new alternate, and switches to it. If there is an already // existing alternate, it is discarded. This allows applications to retain one HANDLE, and switch which buffer it points to seamlessly. // Parameters: -// - initAttributes - the attributes the buffer is initialized with. +// - initAttributes - the attributes for initializing the buffer. // Return value: // - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. [[nodiscard]] NTSTATUS SCREEN_INFORMATION::UseAlternateScreenBuffer(const TextAttribute& initAttributes) diff --git a/src/host/selection.cpp b/src/host/selection.cpp index 40e675d6b80..352b558d77e 100644 --- a/src/host/selection.cpp +++ b/src/host/selection.cpp @@ -413,7 +413,7 @@ void Selection::ClearSelection(const bool fStartingNewSelection) // Routine Description: // - Colors all text in the given rectangle with the color attribute provided. -// - This does not validate whether there is a valid selection right now or not. +// - This does not validate whether or not there is a valid selection right now. // It is assumed to already be in a proper selecting state and the given rectangle should be highlighted with the given color unconditionally. // Arguments: // - psrRect - Rectangular area to fill with color (exclusive) @@ -433,7 +433,7 @@ void Selection::ColorSelection(const til::rect& srRect, const TextAttribute attr coordTarget.x = srRect.left; coordTarget.y = srRect.top; - // Now color the selection a line at a time. + // Now color the selection one line at a time. for (; (coordTarget.y < srRect.top + coordTargetSize.y); ++coordTarget.y) { const auto cchWrite = gsl::narrow(coordTargetSize.x); diff --git a/src/host/selection.hpp b/src/host/selection.hpp index 7006291cd07..e4c19c50fb6 100644 --- a/src/host/selection.hpp +++ b/src/host/selection.hpp @@ -161,13 +161,13 @@ class Selection bool fLineSelection{ true }; // whether to use line selection or block selection bool fUseAlternateSelection{ false }; // whether the user has triggered the alternate selection method - bool allowMouseDragSelection{ true }; // true if the dragging the mouse should change the selection + bool allowMouseDragSelection{ true }; // true if dragging the mouse should change the selection // Flags for this DWORD are defined in wincon.h. Search for def:CONSOLE_SELECTION_IN_PROGRESS, etc. DWORD dwSelectionFlags{ 0 }; // -- Current Selection Data -- - // Anchor is the point the selection was started from (and will be one of the corners of the rectangle). + // Anchor is the point from which the selection was started (and will be one of the corners of the rectangle). til::point coordSelectionAnchor{}; // Rectangle is the area inscribing the selection. It is extended to screen edges in a particular way for line selection. til::inclusive_rect srSelectionRect{}; diff --git a/src/host/selectionState.cpp b/src/host/selectionState.cpp index b769c3dc257..3acaeaf0fbd 100644 --- a/src/host/selectionState.cpp +++ b/src/host/selectionState.cpp @@ -110,7 +110,7 @@ bool Selection::IsKeyboardMarkSelection() const // Routine Description: // - Determines whether a mouse event was responsible for initiating this selection. // - This primarily refers to mouse drag in QuickEdit mode. -// - However, it refers to any non-mark-mode selection, whether the mouse actually started it or not. +// - However, it refers to any non-mark-mode selection, whether or not the mouse actually started it. // Arguments: // - // Return Value: diff --git a/src/host/srvinit.cpp b/src/host/srvinit.cpp index c42a8663d2f..2ebf9d083f6 100644 --- a/src/host/srvinit.cpp +++ b/src/host/srvinit.cpp @@ -395,7 +395,7 @@ HRESULT ConsoleCreateIoThread(_In_ HANDLE Server, // all necessary callback information for all subsequent API calls. // Return Value: // - COM errors, registry errors, pipe errors, handle manipulation errors, -// errors from the creating the thread for the +// errors from creating the thread for the // standard IO thread loop for the server to process messages // from the driver... or an S_OK success. [[nodiscard]] HRESULT ConsoleEstablishHandoff([[maybe_unused]] _In_ HANDLE Server, diff --git a/src/host/ut_host/ConsoleArgumentsTests.cpp b/src/host/ut_host/ConsoleArgumentsTests.cpp index b03b9099dbf..6abefefe7b7 100644 --- a/src/host/ut_host/ConsoleArgumentsTests.cpp +++ b/src/host/ut_host/ConsoleArgumentsTests.cpp @@ -280,7 +280,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests() true); // successful parse? commandline = L"conhost.exe foo -- bar"; - ArgTestsRunner(L"#3 Check that a implicit commandline with other expected args is treated as a whole client commandline (1)", + ArgTestsRunner(L"#3 Check that an implicit commandline with other expected args is treated as a whole client commandline (1)", commandline, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, @@ -301,7 +301,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests() true); // successful parse? commandline = L"conhost.exe foo -- bar"; - ArgTestsRunner(L"#4 Check that a implicit commandline with other expected args is treated as a whole client commandline (2)", + ArgTestsRunner(L"#4 Check that an implicit commandline with other expected args is treated as a whole client commandline (2)", commandline, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, @@ -322,7 +322,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests() true); // successful parse? commandline = L"conhost.exe console --vtmode foo foo -- bar"; - ArgTestsRunner(L"#5 Check that a implicit commandline with other expected args is treated as a whole client commandline (3)", + ArgTestsRunner(L"#5 Check that an implicit commandline with other expected args is treated as a whole client commandline (3)", commandline, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, @@ -343,7 +343,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests() true); // successful parse? commandline = L"conhost.exe console --vtmode foo --outpipe foo -- bar"; - ArgTestsRunner(L"#6 Check that a implicit commandline with other expected args is treated as a whole client commandline (4)", + ArgTestsRunner(L"#6 Check that an implicit commandline with other expected args is treated as a whole client commandline (4)", commandline, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, @@ -1149,7 +1149,7 @@ void ConsoleArgumentsTests::FeatureArgTests() false); // successful parse? commandline = L"conhost.exe --feature pty --feature --signal foo"; - ArgTestsRunner(L"#6 a invalid feature value that is otherwise a valid arg", + ArgTestsRunner(L"#6 an invalid feature value that is otherwise a valid arg", commandline, hInSample, hOutSample, diff --git a/src/host/ut_host/TextBufferTests.cpp b/src/host/ut_host/TextBufferTests.cpp index af9954fef1c..0c48af7c257 100644 --- a/src/host/ut_host/TextBufferTests.cpp +++ b/src/host/ut_host/TextBufferTests.cpp @@ -1305,7 +1305,7 @@ void TextBufferTests::TestBackspaceRightSideVt() VERIFY_ARE_EQUAL(0, postCursorPosition.x); VERIFY_ARE_EQUAL(preCursorPosition.y, postCursorPosition.y - 1); - // make sure "yx" was written to the end of the line the cursor started on + // make sure "yx" was written to the end of the line where the cursor started const auto& row = tbi.GetRowByOffset(preCursorPosition.y); const auto rowText = row.GetText(); auto it = rowText.crbegin(); diff --git a/src/inc/TestUtils.h b/src/inc/TestUtils.h index 36743f62c46..42ee49baa26 100644 --- a/src/inc/TestUtils.h +++ b/src/inc/TestUtils.h @@ -32,7 +32,7 @@ class TerminalCoreUnitTests::TestUtils // caller should ensure that `iter` starts where they would like to validate. // Arguments: // - expectedChar: The character (or characters) we're expecting - // - iter: a iterator pointing to the cell we'd like to start validating at. + // - iter: an iterator pointing to the cell we'd like to start validating at. // - start: the first index in the range we'd like to validate // - end: the last index in the range we'd like to validate // Return Value: @@ -62,7 +62,7 @@ class TerminalCoreUnitTests::TestUtils // expectedString. // Arguments: // - expectedString: The characters we're expecting - // - iter: a iterator pointing to the cell we'd like to start validating at. + // - iter: an iterator pointing to the cell we'd like to start validating at. // Return Value: // - static void VerifyExpectedString(std::wstring_view expectedString, diff --git a/src/inc/til/mutex.h b/src/inc/til/mutex.h index b08dcd4b2b4..e4299d31cfc 100644 --- a/src/inc/til/mutex.h +++ b/src/inc/til/mutex.h @@ -71,7 +71,7 @@ namespace til { public: // An exclusive, read/write reference to a til::shared_mutex's underlying data. - // If you drop the guard the mutex is unlocked. + // If you drop the guard, the mutex is unlocked. using guard = details::shared_mutex_guard>; // A shared, read-only reference to a til::shared_mutex's underlying data. diff --git a/src/inc/til/spsc.h b/src/inc/til/spsc.h index 9732cd5796d..6f4669b2113 100644 --- a/src/inc/til/spsc.h +++ b/src/inc/til/spsc.h @@ -169,7 +169,7 @@ namespace til::spsc // https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem // // arc follows the classic spsc design and manages a ring buffer with two positions: _producer and _consumer. - // They contain the position the producer / consumer will next write to / read from respectively. + // They contain the position that the producer / consumer will next write to / read from respectively. // As usual with ring buffers, these positions are modulo to the _capacity of the underlying buffer. // The producer's writable range is [_producer, _consumer) and the consumer's readable is [_consumer, _producer). // @@ -183,7 +183,7 @@ namespace til::spsc // Wait, what? [7, 0)? How does that work? As all positions are modulo _capacity, 0 mod 10 is the same as 10 mod 10. // If we only want to read forward in the buffer [7, 0) is thus the same as [7, 10). // - // If we read 3 items from the queue the contents will be: + // If we read 3 items from the queue, the contents will be: // [ _ | _ | _ | 3 | 4 | 5 | 6 | _ | _ | _ | _ ] // ^ ^ // _consumer = 3 _producer = 7 diff --git a/src/inc/til/u8u16convert.h b/src/inc/til/u8u16convert.h index b0262204140..30ee8489933 100644 --- a/src/inc/til/u8u16convert.h +++ b/src/inc/til/u8u16convert.h @@ -9,10 +9,10 @@ Module Name: - Defines classes which hold the status of the current partials handling. - Defines functions for converting between UTF-8 and UTF-16 strings. -Tests have been made in order to investigate whether or not own algorithms +Tests have been made in order to investigate whether or not our algorithms could overcome disadvantages of syscalls. Test results can be read up in PR #4093 and the test algorithms are available in src\tools\U8U16Test. -Based on the results the decision was made to keep using the platform +Based on the results, the decision was made to keep using the platform functions MultiByteToWideChar and WideCharToMultiByte. Author(s): diff --git a/src/interactivity/base/HostSignalInputThread.cpp b/src/interactivity/base/HostSignalInputThread.cpp index c32e796c53b..1eb58031291 100644 --- a/src/interactivity/base/HostSignalInputThread.cpp +++ b/src/interactivity/base/HostSignalInputThread.cpp @@ -26,7 +26,7 @@ HostSignalInputThread::HostSignalInputThread(wil::unique_hfile&& hPipe) : HostSignalInputThread::~HostSignalInputThread() { - // Manually terminate our thread during unittesting. Otherwise, the test + // Manually terminate our thread during unit testing. Otherwise, the test // will finish, but TAEF will not manually kill the test. #ifdef UNIT_TESTING TerminateThread(_hThread.get(), 0); diff --git a/src/interactivity/win32/window.cpp b/src/interactivity/win32/window.cpp index aa21904f6c7..f7a72fb2ed1 100644 --- a/src/interactivity/win32/window.cpp +++ b/src/interactivity/win32/window.cpp @@ -238,7 +238,7 @@ void Window::_UpdateSystemMetrics() const //if launched from a shortcut, ensure window is visible on screen if (pSettings->IsStartupTitleIsLinkNameSet()) { - // if window would be fully OFFscreen, change position so it is ON screen. + // if window would be fully OFF-screen, change position so it is ON-screen. // This doesn't change the actual coordinates // stored in the link, just the starting position // of the window. diff --git a/src/propsheet/fontdlg.cpp b/src/propsheet/fontdlg.cpp index c45e3e519f0..5e92ef0af67 100644 --- a/src/propsheet/fontdlg.cpp +++ b/src/propsheet/fontdlg.cpp @@ -528,7 +528,7 @@ FontDlgProc( // Iterate through all of our fonts to find the font entries that match the desired family, charset, name (TT), and // boldness (TT). Each entry in FontInfo represents a specific combination of font states. We expect to encounter // numerous entries for each size/boldness/charset of TT fonts. If fAddBoldFonts is true, we'll add a font even if it's -// bold, regardless of whether the user has chosen bold fonts or not. +// bold, regardless of whether or not the user has chosen bold fonts. void AddFontSizesToList(PCWSTR pwszTTFace, PCWSTR pwszAltTTFace, const LONG_PTR dwExStyle, @@ -579,8 +579,8 @@ void AddFontSizesToList(PCWSTR pwszTTFace, continue; } - // if we're being asked to add bold fonts, add unconditionally according to weight. Otherwise, only this - // entry to the list of it's in line with user choice. Raster fonts aren't available in bold. + // if we're being asked to add bold fonts, add unconditionally according to weight. Otherwise, only add this + // entry to the list if it's in line with user choice. Raster fonts aren't available in bold. if (!fAddBoldFonts && gbBold != IS_BOLD(FontInfo[i].Weight)) { DBGFONTS((" Font %x has weight %d, but we wanted %sbold\n", diff --git a/src/renderer/base/renderer.cpp b/src/renderer/base/renderer.cpp index 4a98b757a39..3bf90c29046 100644 --- a/src/renderer/base/renderer.cpp +++ b/src/renderer/base/renderer.cpp @@ -504,7 +504,7 @@ void Renderer::SynchronizedOutputChanged() noexcept // essentially drop our renderer to 10 FPS, because `_isSynchronizingOutput` is always true. // // Obviously calling LockConsole/UnlockConsole here is an awful, ugly hack, - // since there's no guarantee that this is the same lock as the one the VT parser uses. + // since there's no guarantee that this is the same lock as the one that the VT parser uses. // But the alternative is Denial-Of-Service of the render thread. // // Note that this causes raw throughput of DECSET 2026 to be comparatively low, but that's fine. diff --git a/src/renderer/gdi/state.cpp b/src/renderer/gdi/state.cpp index 62a20591c5e..b31478fc302 100644 --- a/src/renderer/gdi/state.cpp +++ b/src/renderer/gdi/state.cpp @@ -406,7 +406,7 @@ GdiEngine::~GdiEngine() // 1. The lines are half the width of an underline // 2. Ideally the bottom line is aligned with the bottom of the underline // 3. The top underline is vertically in the middle between baseline and ideal bottom underline - // 4. If the top line gets too close to the baseline the underlines are shifted downwards + // 4. If the top line gets too close to the baseline, the underlines are shifted downwards // 5. The minimum gap between the two lines appears to be similar to Tex (1.2pt) // (Additional notes below.) diff --git a/src/server/ProcessList.cpp b/src/server/ProcessList.cpp index c83879dacf7..bab3beed242 100644 --- a/src/server/ProcessList.cpp +++ b/src/server/ProcessList.cpp @@ -11,7 +11,7 @@ using namespace Microsoft::Console::Interactivity; // Routine Description: -// - Allocates and stores in a list the process information given. +// - Allocates and stores the given process information in a list. // - Will not create a new entry in the list given information matches a known process. Will instead return existing entry. // Arguments: // - dwProcessId - Process ID of connecting client @@ -19,7 +19,7 @@ using namespace Microsoft::Console::Interactivity; // - ulProcessGroupId - Process Group ID from connecting client (sometimes referred to as parent) // - pParentProcessData - Used to specify parent while locating appropriate scope of sending control messages // - ppProcessData - Filled on exit with a pointer to the process handle information. Optional. -// - If not used, return code will specify whether this process is known to the list or not. +// - If not used, return code will specify whether or not this process is known to the list. // Return Value: // - S_OK if the process was recorded in the list successfully or already existed. // - S_FALSE if we're running into an LPC port conflict by nature of the process chain. diff --git a/src/server/WaitBlock.cpp b/src/server/WaitBlock.cpp index d1485f7068c..aed40e10ed5 100644 --- a/src/server/WaitBlock.cpp +++ b/src/server/WaitBlock.cpp @@ -65,7 +65,7 @@ ConsoleWaitBlock::ConsoleWaitBlock(_In_ ConsoleWaitQueue* const pProcessQueue, } // Routine Description: -// - Destroys a ConsolewaitBlock +// - Destroys a ConsoleWaitBlock // - On deletion, ConsoleWaitBlocks will erase themselves from the process and object queues in // constant time with the iterator acquired on construction. ConsoleWaitBlock::~ConsoleWaitBlock() diff --git a/src/terminal/adapter/DispatchTypes.hpp b/src/terminal/adapter/DispatchTypes.hpp index b99dd997dde..66ec6eb08f2 100644 --- a/src/terminal/adapter/DispatchTypes.hpp +++ b/src/terminal/adapter/DispatchTypes.hpp @@ -57,7 +57,7 @@ namespace Microsoft::Console::VirtualTerminal } // In order for the _string to hold the correct representation of the - // ID stored in _value, we must be on a little endian architecture. + // ID stored in _value, we must be on a little-endian architecture. static_assert(std::endian::native == std::endian::little); uint64_t _value = 0; diff --git a/src/terminal/adapter/SixelParser.cpp b/src/terminal/adapter/SixelParser.cpp index e23c23d1e60..959c6f2f307 100644 --- a/src/terminal/adapter/SixelParser.cpp +++ b/src/terminal/adapter/SixelParser.cpp @@ -387,7 +387,7 @@ void SixelParser::_updateRasterAttributes(const VTParameters& rasterAttributes) // And while not documented, we know from testing on a VT330 that the raster // attributes command should also trigger a carriage return. This applies - // regardless of whether the requested aspect ratio is valid or not. + // regardless of whether or not the requested aspect ratio is valid. _executeCarriageReturn(); } diff --git a/src/terminal/adapter/adaptDispatch.cpp b/src/terminal/adapter/adaptDispatch.cpp index e454822d8b7..e1fdb6a69c7 100644 --- a/src/terminal/adapter/adaptDispatch.cpp +++ b/src/terminal/adapter/adaptDispatch.cpp @@ -3649,7 +3649,7 @@ void AdaptDispatch::DoConEmuAction(const std::wstring_view string) } // Method Description: -// - Performs a iTerm2 action +// - Performs an iTerm2 action // - Ascribes to the ITermDispatch interface // - Currently, the actions we support are: // * `OSC1337;SetMark`: mark a line as a prompt line @@ -3878,7 +3878,7 @@ void AdaptDispatch::DoWTAction(const std::wstring_view string) // - SIXEL - Defines an image transmitted in sixel format via the returned // StringHandler function. // Arguments: -// - macroParameter - Selects one a of set of predefined aspect ratios. +// - macroParameter - Selects one of a set of predefined aspect ratios. // - backgroundSelect - Whether the background should be transparent or opaque. // - backgroundColor - The color number used for the background (VT240). // Return Value: diff --git a/src/terminal/adapter/ut_adapter/adapterTest.cpp b/src/terminal/adapter/ut_adapter/adapterTest.cpp index 7da1782fde0..596c9ed1a26 100644 --- a/src/terminal/adapter/ut_adapter/adapterTest.cpp +++ b/src/terminal/adapter/ut_adapter/adapterTest.cpp @@ -1648,7 +1648,7 @@ class AdapterTest Log::Comment(L"Test 2: Verify space decrease"); _testGetSet->PrepData(); - // Define four 8-byte macros, i.e. 32 byes (2 macro blocks). + // Define four 8-byte macros, i.e. 32 bytes (2 macro blocks). _stateMachine->ProcessString(L"\033P1;0;0!z12345678\033\\"); _stateMachine->ProcessString(L"\033P2;0;0!z12345678\033\\"); _stateMachine->ProcessString(L"\033P3;0;0!z12345678\033\\"); @@ -3151,7 +3151,7 @@ class AdapterTest _testGetSet->_expectedAttribute = _testGetSet->_textBuffer->GetCurrentAttributes(); - Log::Comment(L"Test 1: Change Indexed Foreground with missing index parameter"); + Log::Comment(L"Test 1: Change Indexed Foreground without index parameter"); rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundExtended; rgOptions[1] = DispatchTypes::GraphicsOptions::BlinkOrXterm256Index; _testGetSet->_expectedAttribute.SetIndexedForeground256(TextColor::DARK_BLACK); @@ -3226,7 +3226,7 @@ class AdapterTest _testGetSet->_expectedAttribute = _testGetSet->_textBuffer->GetCurrentAttributes(); - Log::Comment(L"Test 1: Change Indexed Foreground with missing index sub parameter"); + Log::Comment(L"Test 1: Change Indexed Foreground without index sub parameter"); rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundExtended; _testGetSet->MakeSubParamsAndRanges({ { 5 } }, rgSubParamOpts, subParamRanges); _testGetSet->_expectedAttribute.SetIndexedForeground256(TextColor::DARK_BLACK); diff --git a/src/terminal/parser/ft_fuzzer/fuzzing_logic.h b/src/terminal/parser/ft_fuzzer/fuzzing_logic.h index 726ed890833..0ac574f611d 100644 --- a/src/terminal/parser/ft_fuzzer/fuzzing_logic.h +++ b/src/terminal/parser/ft_fuzzer/fuzzing_logic.h @@ -346,9 +346,9 @@ namespace fuzz }; CFuzzString<__FUZZING_ALLOCATOR, CHAR> eval(FUZZ_MAP(fuzzMap), pszReallocTemp); - // Performance optimization: 95% of the time the buffer returned from eval will not be reallocated + // Performance optimization: 95% of the time, the buffer returned from eval will not be reallocated // and thus will still be pointing at pszReallocTemp. In this case, it is not necessary to duplicate - // the string a second time, just transfer ownership to the calling function. + // the string again, just transfer ownership to the calling function. if ((LPSTR)eval == pszReallocTemp) { pszRealloc = pszReallocTemp; diff --git a/src/terminal/parser/stateMachine.cpp b/src/terminal/parser/stateMachine.cpp index 23139fbdafa..f01b45fcb16 100644 --- a/src/terminal/parser/stateMachine.cpp +++ b/src/terminal/parser/stateMachine.cpp @@ -288,7 +288,7 @@ static constexpr bool _isOscDelimiter(const wchar_t wch) noexcept } // Routine Description: -// - Determines if a character should be ignored in a operating system control sequence +// - Determines if a character should be ignored in an operating system control sequence // Arguments: // - wch - Character to check. // Return Value: @@ -1968,7 +1968,7 @@ bool StateMachine::FlushToTerminal() // Routine Description: // - Helper for entry to the state machine. Will take an array of characters // and print as many as it can without encountering a character indicating -// a escape sequence, then feed characters into the state machine one at a +// an escape sequence, then feed characters into the state machine one at a // time until we return to the ground state. // Arguments: // - string - Characters to operate upon diff --git a/src/terminal/parser/ut_parser/InputEngineTest.cpp b/src/terminal/parser/ut_parser/InputEngineTest.cpp index 6c7baa9bdc9..19aa93919e9 100644 --- a/src/terminal/parser/ut_parser/InputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/InputEngineTest.cpp @@ -896,7 +896,7 @@ void InputEngineTest::AltCtrlDTest() void InputEngineTest::AltIntermediateTest() { - // Tests GH#1209. When we process a alt+key combination where the key just + // Tests GH#1209. When we process an alt+key combination where the key just // so happens to be an intermediate character, we should make sure that an // immediately subsequent ctrl character is handled correctly. @@ -966,7 +966,7 @@ void InputEngineTest::AltBackspaceEnterTest() inputRec.Event.KeyEvent.wVirtualScanCode = static_cast(OneCoreSafeMapVirtualKeyW(VK_BACK, MAPVK_VK_TO_VSC)); inputRec.Event.KeyEvent.uChar.UnicodeChar = L'\x08'; - // First, expect a alt+backspace. + // First, expect an alt+backspace. testState.vExpectedInput.push_back(inputRec); std::wstring seq = L"\x1b\x7f"; @@ -981,7 +981,7 @@ void InputEngineTest::AltBackspaceEnterTest() inputRec.Event.KeyEvent.wVirtualScanCode = static_cast(OneCoreSafeMapVirtualKeyW(VK_RETURN, MAPVK_VK_TO_VSC)); inputRec.Event.KeyEvent.uChar.UnicodeChar = L'\x0d'; //maybe \xa - // Then, expect a enter + // Then, expect an enter testState.vExpectedInput.push_back(inputRec); seq = L"\x0d"; diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index f12dac966cf..f4db87490ff 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -3425,7 +3425,7 @@ class StateMachineExternalTest final pDispatch->ClearState(); pDispatch->_copyContent = L"UNCHANGED"; - // Passing a query character with missing `Pc` param is illegal, won't change the content. + // Passing a query character without `Pc` param is illegal, won't change the content. mach.ProcessString(L"\x1b]52;?\x07"); VERIFY_ARE_EQUAL(L"UNCHANGED", pDispatch->_copyContent); diff --git a/src/tools/ansi-color/ansi-color.cmd b/src/tools/ansi-color/ansi-color.cmd index a0169cf3b62..3b5462b71b8 100644 --- a/src/tools/ansi-color/ansi-color.cmd +++ b/src/tools/ansi-color/ansi-color.cmd @@ -33,7 +33,7 @@ GOTO :END_DATA_SEGMENT :: Complete matrix of SGR parameters available :: This definition also demonstrates the various configuration changes -:: which are used to control the way the table is generated +:: which are used to control the way that the table is generated __DATA__ :: Select Graphic Rendition (SGR) parameters :: #NUL# is treated as a special case to provide cells in that column @@ -1496,10 +1496,11 @@ IF NOT EXIST !DATA_FILE! ( :: :USAGE SET "SCRIPT_NAME=%~nx0" +SET BLANK_TO_EOL= z :: The following ECHO intentionally has 80 spaces to clear the :: line any remaining on screen text on call. -ECHO. +ECHO.%BLANK_TO_EOL:z=% IF [%1] NEQ [] ( ECHO !%1! ECHO. diff --git a/src/tools/ansi-color/sgr.def b/src/tools/ansi-color/sgr.def index 3daed559620..a81582f3297 100644 --- a/src/tools/ansi-color/sgr.def +++ b/src/tools/ansi-color/sgr.def @@ -1,6 +1,6 @@ :: Complete matrix of SGR parameters available :: This definition also demonstrates the various configuration changes -:: which are used to control the way the table is generated +:: which are used to control the way that the table is generated :: Requires 97 columns to display correctly __DATA__ :: Select Graphic Rendition (SGR) parameters @@ -345,4 +345,4 @@ REM 29m 21;96m 21;97m __ROWS:END__ -__DATA:END__ \ No newline at end of file +__DATA:END__ diff --git a/src/tools/vtapp/Program.cs b/src/tools/vtapp/Program.cs index 3751b6e4212..12ec6ff93aa 100644 --- a/src/tools/vtapp/Program.cs +++ b/src/tools/vtapp/Program.cs @@ -37,7 +37,7 @@ static void Main(string[] args) keyInfo = Console.ReadKey(true); // 40-7E are the "dispatch" characters meaning the sequence is done. - // 0x5B '[' is expected after the escape. So ignore that. We don't know a of a sequence terminated with it, so it also continues the loop. + // 0x5B '[' is expected after the escape. So ignore that. We don't know of a sequence terminated with it, so it also continues the loop. // keep collecting characters as the "reply" until then while (keyInfo.KeyChar < 0x40 || keyInfo.KeyChar > 0x7E || keyInfo.KeyChar == '[') { diff --git a/src/types/ut_types/UuidTests.cpp b/src/types/ut_types/UuidTests.cpp index e0abbc6a6f3..488293fb212 100644 --- a/src/types/ut_types/UuidTests.cpp +++ b/src/types/ut_types/UuidTests.cpp @@ -34,7 +34,7 @@ class UuidTests { const GUID uuidExpected{ 0xe04fb1f7, 0x739d, 0x5d63, { 0xbb, 0x18, 0xe0, 0xea, 0x00, 0xb1, 0x9e, 0xe8 } }; - // This'll come out in little endian; the reference GUID was generated as such. + // This'll come out in little-endian; the reference GUID was generated as such. std::wstring name{ L"testing" }; auto uuidActual = CreateV5Uuid(TEST_NAMESPACE_GUID, std::as_bytes(std::span{ name })); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 18af447d8bf..1ff0ba7b101 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -172,7 +172,7 @@ std::optional Utils::ColorFromXTermColor(const std::wstring_view str // spec2: a color in the following format: // "#" // -// In both specs, is a value contains up to 4 hex digits, upper or lower case. +// In both specs, is a value contains up to 4 hex digits, uppercase or lowercase. // Arguments: // - string - The string containing the color spec string to parse. // Return Value: @@ -544,7 +544,7 @@ bool Utils::HexToUint(const wchar_t wch, // - wstr - String to convert. // - value - receives the int value of the string // Return Value: -// - true iff the string is a unsigned integer string. +// - true iff the string is an unsigned integer string. bool Utils::StringToUint(const std::wstring_view wstr, unsigned int& value) { diff --git a/src/types/viewport.cpp b/src/types/viewport.cpp index ce4b38565eb..6be33107fb6 100644 --- a/src/types/viewport.cpp +++ b/src/types/viewport.cpp @@ -440,7 +440,7 @@ void Viewport::ConvertToOrigin(_Inout_ til::inclusive_rect* const psr) const noe // - Translates the input coordinate out of our coordinate space, whose origin is // at (this.left, this.right) // Arguments: -// - pcoord: a pointer to a coordinate the translate into our coordinate space. +// - pcoord: a pointer to a coordinate to translate into our coordinate space. // Return Value: // - void Viewport::ConvertToOrigin(_Inout_ til::point* const pcoord) const noexcept @@ -470,7 +470,7 @@ void Viewport::ConvertFromOrigin(_Inout_ til::inclusive_rect* const psr) const n // - Translates the input coordinate to our coordinate space, whose origin is // at (this.left, this.right) // Arguments: -// - pcoord: a pointer to a coordinate the translate into our coordinate space. +// - pcoord: a pointer to a coordinate to translate into our coordinate space. // Return Value: // - void Viewport::ConvertFromOrigin(_Inout_ til::point* const pcoord) const noexcept diff --git a/src/winconpty/winconpty.h b/src/winconpty/winconpty.h index e917a18ad75..47968df294a 100644 --- a/src/winconpty/winconpty.h +++ b/src/winconpty/winconpty.h @@ -10,7 +10,7 @@ extern "C" { // This structure is part of an ABI shared with the rest of the operating system. typedef struct _PseudoConsole { - // hSignal is a anonymous pipe used for out of band communication with conhost. + // hSignal is an anonymous pipe used for out of band communication with conhost. // It's used to send the various PTY_SIGNAL_* messages. HANDLE hSignal; // The "server handle" in conhost represents the console IPC "pipe" over which all console