From 06ea16ddb8142e68d4637684050509478a45e3da Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Thu, 26 Mar 2020 07:15:09 -0400 Subject: [PATCH 1/6] Spellchecking --- build/pipelines/templates/check-formatting.yml | 2 +- src/cascadia/TerminalApp/AppCommandlineArgs.cpp | 2 +- src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp | 2 +- src/host/consoleInformation.cpp | 4 ++-- src/host/directio.cpp | 2 +- src/host/ut_host/ApiRoutinesTests.cpp | 2 +- src/terminal/adapter/adaptDefaults.hpp | 2 +- src/terminal/adapter/adaptDispatch.cpp | 4 ++-- src/til/ut_til/ColorTests.cpp | 2 +- src/types/convert.cpp | 2 +- src/types/utils.cpp | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/pipelines/templates/check-formatting.yml b/build/pipelines/templates/check-formatting.yml index f8b513cf465..f487a7a81c9 100644 --- a/build/pipelines/templates/check-formatting.yml +++ b/build/pipelines/templates/check-formatting.yml @@ -11,7 +11,7 @@ jobs: clean: true - task: PowerShell@2 - displayName: 'Code Formattting Check' + displayName: 'Code Formatting Check' inputs: targetType: filePath filePath: '.\build\scripts\Invoke-FormattingCheck.ps1' diff --git a/src/cascadia/TerminalApp/AppCommandlineArgs.cpp b/src/cascadia/TerminalApp/AppCommandlineArgs.cpp index 38e7675d67b..eddff6fc79c 100644 --- a/src/cascadia/TerminalApp/AppCommandlineArgs.cpp +++ b/src/cascadia/TerminalApp/AppCommandlineArgs.cpp @@ -444,7 +444,7 @@ std::vector AppCommandlineArgs::BuildCommands(const std::vector // Return Value: @@ -229,7 +229,7 @@ COLORREF CONSOLE_INFORMATION::GetDefaultForeground() const noexcept // - Return the default background color of the console. If the settings are // configured to have a default background color (separate from the color // table), this will return that value. Otherwise it will return the value -// from the colortable corresponding to our default attributes. +// from the color table corresponding to our default attributes. // Arguments: // - // Return Value: diff --git a/src/host/directio.cpp b/src/host/directio.cpp index 6efcfb6b09e..ca1b04f51c4 100644 --- a/src/host/directio.cpp +++ b/src/host/directio.cpp @@ -580,7 +580,7 @@ void EventsToUnicode(_Inout_ std::deque>& inEvents, // Arguments: // - pInputBuffer - the input buffer to write to. Currently unused, as // HandleGenericKeyEvent just gets the global input buffer, but all -// ConGetSet API's require an input or output object. +// ConGetSet APIs require an input or output object. // - key - The keyevent to send to the console. // Return Value: // - HRESULT indicating success or failure diff --git a/src/host/ut_host/ApiRoutinesTests.cpp b/src/host/ut_host/ApiRoutinesTests.cpp index eb5d6c0a29e..542bebcaddb 100644 --- a/src/host/ut_host/ApiRoutinesTests.cpp +++ b/src/host/ut_host/ApiRoutinesTests.cpp @@ -195,7 +195,7 @@ class ApiRoutinesTests TEST_METHOD(ApiSetConsoleInputModeImplPSReadlineScenario) { - Log::Comment(L"Set Powershell PSReadline expected modes."); + Log::Comment(L"Set PowerShell PSReadline expected modes."); PrepVerifySetConsoleInputModeImpl(0x1F7); Log::Comment(L"Should return an invalid argument code because ECHO is set without LINE."); Log::Comment(L"Input mode should be set anyway despite FAILED return code."); diff --git a/src/terminal/adapter/adaptDefaults.hpp b/src/terminal/adapter/adaptDefaults.hpp index 239c16d20c6..93bbc35f9ee 100644 --- a/src/terminal/adapter/adaptDefaults.hpp +++ b/src/terminal/adapter/adaptDefaults.hpp @@ -23,7 +23,7 @@ namespace Microsoft::Console::VirtualTerminal public: virtual ~AdaptDefaults() = default; virtual void Print(const wchar_t wch) = 0; - // These characters need to be mutable so that they can be processed by the TerminalInput translater. + // These characters need to be mutable so that they can be processed by the TerminalInput translator. virtual void PrintString(const std::wstring_view string) = 0; virtual void Execute(const wchar_t wch) = 0; }; diff --git a/src/terminal/adapter/adaptDispatch.cpp b/src/terminal/adapter/adaptDispatch.cpp index de859d96634..18cf54e0aa6 100644 --- a/src/terminal/adapter/adaptDispatch.cpp +++ b/src/terminal/adapter/adaptDispatch.cpp @@ -1909,7 +1909,7 @@ bool AdaptDispatch::SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle) } // Method Description: -// - Sets a single entry of the colortable to a new value +// - Sets a single entry of the color table to a new value // Arguments: // - tableIndex: The VT color table index // - dwColor: The new RGB color value to use. @@ -1926,7 +1926,7 @@ bool AdaptDispatch::SetCursorColor(const COLORREF cursorColor) } // Method Description: -// - Sets a single entry of the colortable to a new value +// - Sets a single entry of the color table to a new value // Arguments: // - tableIndex: The VT color table index // - dwColor: The new RGB color value to use. diff --git a/src/til/ut_til/ColorTests.cpp b/src/til/ut_til/ColorTests.cpp index a2381f80945..83f37d966f7 100644 --- a/src/til/ut_til/ColorTests.cpp +++ b/src/til/ut_til/ColorTests.cpp @@ -61,7 +61,7 @@ class ColorTests { til::color rgb{ 0xf0, 0x0d, 0xca, 0xfe }; - VERIFY_ARE_EQUAL(0x00CA0DF0u, static_cast(rgb)); // alpha is dropped, COLOREREF is 0BGR + VERIFY_ARE_EQUAL(0x00CA0DF0u, static_cast(rgb)); // alpha is dropped, COLORREF is 0BGR } template diff --git a/src/types/convert.cpp b/src/types/convert.cpp index f4608a2e35a..7ccce3b6658 100644 --- a/src/types/convert.cpp +++ b/src/types/convert.cpp @@ -281,7 +281,7 @@ std::deque> SynthesizeNumpadEvents(const wchar_t wch, { // It is OK if the char is "signed -1", we want to interpret that as "unsigned 255" for the // "integer to character" conversion below with ::to_string, thus the static_cast. - // Prime example is nonbreaking space U+00A0 will convert to OEM by codepage 437 to 0xFF which is -1 signed. + // Prime example is non-breaking space U+00A0 will convert to OEM by codepage 437 to 0xFF which is -1 signed. // But it is absolutely valid as 0xFF or 255 unsigned as the correct CP437 character. // We need to treat it as unsigned because we're going to pretend it was a keypad entry // and you don't enter negative numbers on the keypad. diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 75994421d9e..5d02a762293 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -471,7 +471,7 @@ GUID Utils::CreateV5Uuid(const GUID& namespaceGuid, const gsl::span Date: Thu, 26 Mar 2020 08:43:57 -0400 Subject: [PATCH 2/6] Spelling p2 --- ...eOnExit and TerminalConnection evolution.md | 2 +- ...dline Arguments for the Windows Terminal.md | 10 +++++----- doc/specs/#754 - Cascading Default Settings.md | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md b/doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md index 3f682859fcc..fdc3c74697f 100644 --- a/doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md +++ b/doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md @@ -41,7 +41,7 @@ Other terminal emulators like ConEmu have a similar feature. ### `TerminalControl` Changes -* As the decision as to whether to close a terminal control hosting a connection that has transitioned into a terminal state will be made by the application, the unexpressive `Close` event will be removed and replaced with a `ConnectionStateChanged` event. +* As the decision as to whether to close a terminal control hosting a connection that has transitioned into a terminal state will be made by the application, the inexpressive `Close` event will be removed and replaced with a `ConnectionStateChanged` event. * `event ConnectionStateChanged(TerminalControl, IInspectable)` event will project its connection's `StateChanged` event. * TerminalControl's new `ConnectionState` will project its connection's `State`. * (this is indicated for an eventual data binding; see Future Considerations.) 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 24af8e6639b..3ff27995958 100644 --- a/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md +++ b/doc/specs/#607 - Commandline Arguments for the Windows Terminal.md @@ -549,14 +549,14 @@ itself, we'll use `\;` as an escaped `;` within the commandline. This is an area we've been caught in before, so extensive testing will be necessary to make sure 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 +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 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 +`; split-pane``` in PowerShell, and ```wt new-tab ; split-pane commandline \; with \; semicolons``` would need to become ```wt new-tab `; split-pane commandline \`; with \`; semicolons```, using ```\`;``` to first escape the semicolon for -powershell, then the backslash to escape it for `wt`. +PowerShell, then the backslash to escape it for `wt`. Alternatively, the user could choose to escape the semicolons with quotes (either single or double), like so: ```wt new-tab ';' split-pane "commandline \; diff --git a/doc/specs/#754 - Cascading Default Settings.md b/doc/specs/#754 - Cascading Default Settings.md index 1c98ee398ea..eb68031556c 100644 --- a/doc/specs/#754 - Cascading Default Settings.md +++ b/doc/specs/#754 - Cascading Default Settings.md @@ -342,7 +342,7 @@ class IDynamicProfileGenerator ``` For example, the WSL generator would return `Microsoft.Terminal.WSL`. The -Powershell Core generator would return `Microsoft.Terminal.PowershellCore`. +PowerShell Core generator would return `Microsoft.Terminal.PowershellCore`. We'll use these names to be able to generate uuidv5 GUIDs that will be unique (so long as the names are unique). @@ -370,23 +370,23 @@ It's not the responsibility of the dynamic profile generator to fill in the through and fill in the guid for the generated profiles given the generator's namespace GUID. -### Powershell Core & the Defaults +### PowerShell Core & the Defaults -How do we handle the potential existence of Powershell Core in this model? -Powershell core is unique as far as the default profiles goes - it may or may +How do we handle the potential existence of PowerShell Core in this model? +PowerShell core is unique as far as the default profiles goes - it may or may not exist on the user's system. Not only that, but depending on the user's -install of Powershell Core, it might have a path in either `Program Files` or +install of PowerShell Core, it might have a path in either `Program Files` or `Program Files(x86)`. Additionally, if it _is_ installed, we set it as the default profile instead of -Windows Powershell. +Windows PowerShell. -Powershell core acts much like a dynamic profile. It has an installation source +PowerShell core acts much like a dynamic profile. It has an installation source that may or not be there. So we'll add a dynamic profile generator for -Powershell Core. This will automatically create a profile for Powershell Core if +PowerShell Core. This will automatically create a profile for Powershell Core if necessary. -Unlike the other dynamic profiles, if Powershell Core is present on +Unlike the other dynamic profiles, if PowerShell Core is present on _first_ launch of the terminal, we set that as the default profile. This can still be done - we'll need to do some special-case work when we're loading the user settings and we _don't_ find any existing settings. When that happens, From b7a5e940ca66546666a1b2bdb0b35bc7673385ad Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Thu, 26 Mar 2020 08:48:36 -0400 Subject: [PATCH 3/6] PowerShell --- .../#754 - Cascading Default Settings.md | 18 ++++++++--------- doc/user-docs/UsingJsonSettings.md | 2 +- .../TerminalApp/DefaultProfileUtils.h | 2 +- .../PowershellCoreProfileGenerator.cpp | 20 +++++++++---------- src/host/getset.cpp | 2 +- tools/GenerateAppxFromManifest.ps1 | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/specs/#754 - Cascading Default Settings.md b/doc/specs/#754 - Cascading Default Settings.md index eb68031556c..beaa5a1f0f3 100644 --- a/doc/specs/#754 - Cascading Default Settings.md +++ b/doc/specs/#754 - Cascading Default Settings.md @@ -383,7 +383,7 @@ Windows PowerShell. PowerShell core acts much like a dynamic profile. It has an installation source that may or not be there. So we'll add a dynamic profile generator for -PowerShell Core. This will automatically create a profile for Powershell Core if +PowerShell Core. This will automatically create a profile for PowerShell Core if necessary. Unlike the other dynamic profiles, if PowerShell Core is present on @@ -391,7 +391,7 @@ _first_ launch of the terminal, we set that as the default profile. This can still be done - we'll need to do some special-case work when we're loading the user settings and we _don't_ find any existing settings. When that happens, we'll generate all the default user settings. Before we commit them, we'll check -if the Powershell Core profile exists, and if it does, we'll set that as the +if the PowerShell Core profile exists, and if it does, we'll set that as the default profile before writing the settings to disk. ### Unbinding a Keybinding @@ -432,7 +432,7 @@ it's first generated, taking all the above points into consideration. "guid": "{6239a42c-1de4-49a3-80bd-e8fdd045185c}" }, { - // Make changes here to the Windows Powershell profile + // Make changes here to the Windows PowerShell profile "guid": "{086a83cd-e4ef-418b-89b1-3f6523ff9195}", }, { @@ -455,7 +455,7 @@ it's first generated, taking all the above points into consideration. Note the following: * cmd.exe and powershell.exe are both in the file, as to give users an easy point to extend the settings for those default profiles. -* Powershell Core is included in the file, and the default profile has been set +* PowerShell Core is included in the file, and the default profile has been set to its GUID. The `source` has been set, indicating that it came from a dynamic profile source. * There are a few helpful comments scattered throughout the file to help point the user in the right direction. @@ -620,20 +620,20 @@ the `profiles.json` file. Fortunately though, users should be able to remove much of the boilerplate from their `profiles.json` files, and trim it down just to their modifications. -#### Migrating Powershell Core +#### Migrating PowerShell Core -Right now, default-generated Powershell Core profiles exist with a stable guid -we've generated for them. However, when we move Powershell Core to being a +Right now, default-generated PowerShell Core profiles exist with a stable guid +we've generated for them. However, when we move PowerShell Core to being a dynamically generated profile, we'll have to ensure that we don't create a duplicated "dynamic" entry for that profile. If we want to convert the existing -Powershell Core profiles into a dynamic profile, we'll need to make sure to add +PowerShell Core profiles into a dynamic profile, we'll need to make sure to add a `source` key to the profile. Everything else in the profile can remain the same. Once the `source` is added, we'll know to treat it as a dynamic profile, and it'll respond dynamically. This is actually something that will automatically be covered by the scenario mentioned above in "Profiles with the same `guid` as a dynamic profile but not -the same `source`". When we encounter the existing Powershell Core profiles that +the same `source`". When we encounter the existing PowerShell Core profiles that don't have a `source`, we'll automatically think they're the dynamically generated ones, and auto-migrate them. diff --git a/doc/user-docs/UsingJsonSettings.md b/doc/user-docs/UsingJsonSettings.md index bc2f65d522f..86c749db4d9 100644 --- a/doc/user-docs/UsingJsonSettings.md +++ b/doc/user-docs/UsingJsonSettings.md @@ -180,7 +180,7 @@ The runtime settings are actually constructed from _three_ sources: * The default settings, which are hardcoded into the application, and available in `defaults.json`. This includes the default keybindings, color schemes, and profiles for both Windows PowerShell and Command Prompt (`cmd.exe`). -* Dynamic Profiles, which are generated at runtime. These include Powershell +* Dynamic Profiles, which are generated at runtime. These include PowerShell Core, the Azure Cloud Shell connector, and profiles for and WSL distros. * The user settings from `profiles.json`. diff --git a/src/cascadia/TerminalApp/DefaultProfileUtils.h b/src/cascadia/TerminalApp/DefaultProfileUtils.h index 16d0f99deb1..a03e1e573e1 100644 --- a/src/cascadia/TerminalApp/DefaultProfileUtils.h +++ b/src/cascadia/TerminalApp/DefaultProfileUtils.h @@ -6,7 +6,7 @@ Licensed under the MIT license. - This header stores our default namespace guid. This is used in the creation of default and in-box dynamic profiles. It also provides a helper function for creating a "default" profile. Prior to GH#754, this was used to create the - cmd, powershell, wsl, pwsh, and azure profiles. Now, this helper is used for + cmd, PowerShell, wsl, pwsh, and azure profiles. Now, this helper is used for any of the in-box dynamic profile generators. Author(s): diff --git a/src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp b/src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp index d3285d34bd6..58b17385534 100644 --- a/src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp +++ b/src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp @@ -32,7 +32,7 @@ namespace // They are ordered such that the "most important" flags have the largest // impact on the sort space. For example, since we want Preview to be very polar // we give it the highest flag value. - // The "ideal" powershell instance has 0 flags (stable, native, Program Files location) + // The "ideal" PowerShell instance has 0 flags (stable, native, Program Files location) // // With this ordering, the sort space ends up being (for PowerShell 6) // (numerically greater values are on the left; this is flipped in the final sort) @@ -82,7 +82,7 @@ namespace } // Method Description: - // - Generates a name, based on flags, for a powershell instance. + // - Generates a name, based on flags, for a PowerShell instance. // Return value: // - the name std::wstring Name() const @@ -137,7 +137,7 @@ namespace using namespace ::TerminalApp; // Function Description: -// - Finds all powershell instances with the traditional layout under a directory. +// - Finds all PowerShell instances with the traditional layout under a directory. // - The "traditional" directory layout requires that pwsh.exe exist in a versioned directory, as in // ROOT\6\pwsh.exe // Arguments: @@ -190,7 +190,7 @@ catch (...) } // Function Description: -// - Finds all powershell instances that have App Execution Aliases in the standard location +// - Finds all PowerShell instances that have App Execution Aliases in the standard location // Arguments: // - out: the list into which to accumulate these instances. static void _accumulateStorePowerShellInstances(std::vector& out) @@ -207,7 +207,7 @@ static void _accumulateStorePowerShellInstances(std::vector& if (std::filesystem::exists(appExecAliasPath)) { - // App execution aliases for preview powershell + // App execution aliases for preview PowerShell const auto previewPath = appExecAliasPath / POWERSHELL_PREVIEW_PFN; if (std::filesystem::exists(previewPath)) { @@ -221,7 +221,7 @@ static void _accumulateStorePowerShellInstances(std::vector& } } - // App execution aliases for stable powershell + // App execution aliases for stable PowerShell const auto gaPath = appExecAliasPath / POWERSHELL_PFN; if (std::filesystem::exists(gaPath)) { @@ -239,8 +239,8 @@ static void _accumulateStorePowerShellInstances(std::vector& } // Function Description: -// - Finds a powershell instance that's just a pwsh.exe in a folder. -// - This function cannot determine the version number of such a powershell instance. +// - Finds a PowerShell instance that's just a pwsh.exe in a folder. +// - This function cannot determine the version number of such a PowerShell instance. // Arguments: // - directory: the directory under which to search // - flags: flags to apply to all found instances @@ -256,9 +256,9 @@ static void _accumulatePwshExeInDirectory(const std::wstring_view directory, con } // Function Description: -// - Builds a comprehensive priority-ordered list of powershell instances. +// - Builds a comprehensive priority-ordered list of PowerShell instances. // Return value: -// - a comprehensive priority-ordered list of powershell instances. +// - a comprehensive priority-ordered list of PowerShell instances. static std::vector _collectPowerShellInstances() { std::vector versions; diff --git a/src/host/getset.cpp b/src/host/getset.cpp index e55ba97c8f1..391b9a3e67b 100644 --- a/src/host/getset.cpp +++ b/src/host/getset.cpp @@ -358,7 +358,7 @@ void ApiRoutines::GetNumberOfConsoleMouseButtonsImpl(ULONG& buttons) noexcept // as might be expected. // This is a bug from a long time ago and some applications depend on this functionality to operate properly. // --- - // A prime example of this is that PSReadline module in Powershell will set the invalid mode 0x1e4 + // A prime example of this is that PSReadline module in PowerShell will set the invalid mode 0x1e4 // which includes 0x4 for ECHO_INPUT but turns off 0x2 for LINE_INPUT. This is invalid, but PSReadline // relies on it to properly receive the ^C printout and make a new line when the user presses Ctrl+C. { diff --git a/tools/GenerateAppxFromManifest.ps1 b/tools/GenerateAppxFromManifest.ps1 index 3bf0bba8268..17f9f1729a2 100644 --- a/tools/GenerateAppxFromManifest.ps1 +++ b/tools/GenerateAppxFromManifest.ps1 @@ -21,7 +21,7 @@ param ( [xml]$appxPrototypeData = Get-Content $AppxManifestPrototype # You need to make sure each element we add is part of the same namespace as the -# Package, otherwise powershell will append a bunch of `xmlns=""` properties +# Package, otherwise PowerShell will append a bunch of `xmlns=""` properties # that will make the appx deployment reject the manifest. $rootNS = $appxPrototypeData.Package.NamespaceURI From 31ec0a1c60a04d2526abe56294a7c6e4e0e1352e Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Thu, 26 Mar 2020 08:55:01 -0400 Subject: [PATCH 4/6] APIs --- src/cascadia/TerminalApp/TerminalPage.cpp | 2 +- src/host/telemetry.cpp | 2 +- src/interactivity/base/ApiDetector.cpp | 4 ++-- src/interactivity/inc/IInteractivityFactory.hpp | 2 +- src/interactivity/inc/Module.hpp | 2 +- src/interactivity/inc/ServiceLocator.hpp | 2 +- src/interactivity/inc/VtApiRedirection.hpp | 4 ++-- src/winconpty/winconpty.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 0f2773402dd..ad0ad89f7c4 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -1472,7 +1472,7 @@ namespace winrt::TerminalApp::implementation fire_and_forget TerminalPage::_LaunchSettings(const bool openDefaults) { // This will switch the execution of the function to a background (not - // UI) thread. This is IMPORTANT, because the Windows.Storage API's + // UI) thread. This is IMPORTANT, because the Windows.Storage APIs // (used for retrieving the path to the file) will crash on the UI // thread, because the main thread is a STA. co_await winrt::resume_background(); diff --git a/src/host/telemetry.cpp b/src/host/telemetry.cpp index 7a0d916011f..41ce627ea27 100644 --- a/src/host/telemetry.cpp +++ b/src/host/telemetry.cpp @@ -527,7 +527,7 @@ void Telemetry::WriteFinalTraceLog() { if (_rguiTimesApiUsedAnsi[n]) { - // Ansi specific API's are used less, so check if we have anything to send back. + // Ansi specific APIs are used less, so check if we have anything to send back. // Also breaking it up into a separate TraceLoggingWriteTagged fixes a compilation warning that // the heap is too small. // clang-format off diff --git a/src/interactivity/base/ApiDetector.cpp b/src/interactivity/base/ApiDetector.cpp index 02947482e6f..8cc2e0ca9c2 100644 --- a/src/interactivity/base/ApiDetector.cpp +++ b/src/interactivity/base/ApiDetector.cpp @@ -88,12 +88,12 @@ using namespace Microsoft::Console::Interactivity; // downlevel (i.e. < Windows 10), we do not run the risk of failing // to accurately detect system functionality there. // - // N.B.: We cannot use IsWindowsVersionOrGreater or associated helper API's + // N.B.: We cannot use IsWindowsVersionOrGreater or associated helper APIs // because those are subject to manifesting and may tell us we are // running on Windows 8 even if we are running on Windows 10. // // TODO: MSFT 10916452 Determine what manifest magic is required to make - // versioning API's behave sanely. + // versioning APIs behave sanely. status = TryLoadWellKnownLibrary(lpLibrary, LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER, phModule); if (!NT_SUCCESS(status) && GetLastError() == ERROR_INVALID_PARAMETER) diff --git a/src/interactivity/inc/IInteractivityFactory.hpp b/src/interactivity/inc/IInteractivityFactory.hpp index 4996f30d689..f40e7cfb73c 100644 --- a/src/interactivity/inc/IInteractivityFactory.hpp +++ b/src/interactivity/inc/IInteractivityFactory.hpp @@ -8,7 +8,7 @@ Module Name: Abstract: - Defines methods for a factory class that picks the implementation of interfaces depending on whether the console is running on OneCore or a larger - edition of Windows with all the requisite API's to run the full console. + edition of Windows with all the requisite APIs to run the full console. Author(s): - Hernan Gatta (HeGatta) 29-Mar-2017 diff --git a/src/interactivity/inc/Module.hpp b/src/interactivity/inc/Module.hpp index cea667e43c0..90ff1c6910b 100644 --- a/src/interactivity/inc/Module.hpp +++ b/src/interactivity/inc/Module.hpp @@ -7,7 +7,7 @@ Module Name: Abstract: - Lists all the interfaces for which there exist multiple implementations that - can be picked amongst depending on API's available on the host OS. + can be picked amongst depending on APIs available on the host OS. Author(s): - Hernan Gatta (HeGatta) 29-Mar-2017 diff --git a/src/interactivity/inc/ServiceLocator.hpp b/src/interactivity/inc/ServiceLocator.hpp index d81d77d666b..9fca9bacf30 100644 --- a/src/interactivity/inc/ServiceLocator.hpp +++ b/src/interactivity/inc/ServiceLocator.hpp @@ -7,7 +7,7 @@ Module Name: Abstract: - Locates and holds instances of classes for which multiple implementations - exist depending on API's available on the host OS. + exist depending on APIs available on the host OS. Author(s): - Hernan Gatta (HeGatta) 29-Mar-2017 diff --git a/src/interactivity/inc/VtApiRedirection.hpp b/src/interactivity/inc/VtApiRedirection.hpp index 14dcc1cc8da..a4cac70d3e4 100644 --- a/src/interactivity/inc/VtApiRedirection.hpp +++ b/src/interactivity/inc/VtApiRedirection.hpp @@ -6,10 +6,10 @@ Module Name: - VtApiRedirection.h Abstract: -- Redefines several input-related API's that are not available on OneCore such +- Redefines several input-related APIs that are not available on OneCore such that they be redirected through the ServiceLocator via the IInputServices interface. -- This ensures that all calls to these API's are executed as normal when the +- This ensures that all calls to these APIs are executed as normal when the console is running on big Windows, but that they are also redirected to the Console IO Server when it is running on a OneCore system, where the OneCore implementations live. diff --git a/src/winconpty/winconpty.cpp b/src/winconpty/winconpty.cpp index ed250b55a6e..9dc84b344c4 100644 --- a/src/winconpty/winconpty.cpp +++ b/src/winconpty/winconpty.cpp @@ -296,7 +296,7 @@ VOID _ClosePseudoConsole(_In_ PseudoConsole* pPty) // - `hOutput` is used for reading the output of the pty, encoded as UTF-8 and VT sequences. // Once the call completes, `phPty` will receive a token value to identify this // conpty object. This value should be used in conjunction with the other -// Pseudoconsole API's. +// Pseudoconsole APIs. // `dwFlags` is used to specify optional behavior to the created pseudoconsole. // The flags can be combinations of the following values: // INHERIT_CURSOR: This will cause the created conpty to attempt to inherit the From 8c5da5281d3b5942170621d280e7e2ee4f4268fa Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:29:11 -0400 Subject: [PATCH 5/6] last changes --- src/buffer/out/OutputCellView.cpp | 2 +- src/buffer/out/TextColor.cpp | 2 +- src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp | 4 ++-- src/cascadia/TerminalApp/GlobalAppSettings.cpp | 2 +- src/cascadia/TerminalApp/Tab.cpp | 2 +- src/cascadia/TerminalCore/TerminalApi.cpp | 2 +- src/cascadia/TerminalCore/TerminalDispatch.cpp | 2 +- src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp | 2 +- src/host/screenInfo.cpp | 2 +- src/host/settings.cpp | 6 +++--- src/interactivity/win32/windowproc.cpp | 2 +- src/terminal/input/mouseInput.cpp | 2 +- src/til/ut_til/RectangleTests.cpp | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/buffer/out/OutputCellView.cpp b/src/buffer/out/OutputCellView.cpp index cd1f16a7646..78be4a09009 100644 --- a/src/buffer/out/OutputCellView.cpp +++ b/src/buffer/out/OutputCellView.cpp @@ -102,7 +102,7 @@ bool OutputCellView::operator==(const OutputCellView& it) const noexcept // Arguments: // - it - Other view to compare tot his one. // Return Value: -// - True if any contents or references are inequal. False if they're all equal. +// - True if any contents or references are unequal. False if they're all equal. bool OutputCellView::operator!=(const OutputCellView& it) const noexcept { return !(*this == it); diff --git a/src/buffer/out/TextColor.cpp b/src/buffer/out/TextColor.cpp index 05fcded149a..6981daab552 100644 --- a/src/buffer/out/TextColor.cpp +++ b/src/buffer/out/TextColor.cpp @@ -22,7 +22,7 @@ void TextColor::SetColor(const COLORREF rgbColor) noexcept // Method Description: // - Sets this TextColor to be a legacy-style index into the color table. // Arguments: -// - index: the index of the colortable we should use for this TextColor. +// - index: the index of the color table we should use for this TextColor. // Return Value: // - void TextColor::SetIndex(const BYTE index) noexcept diff --git a/src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp b/src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp index a539086f652..d6591d0a948 100644 --- a/src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp +++ b/src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp @@ -113,10 +113,10 @@ std::unique_ptr CascadiaSettings::LoadAll() // Make sure there's a $schema at the top of the file. needToWriteFile = resultPtr->_PrependSchemaDirective() || needToWriteFile; - // TODO:GH#2721 If powershell core is installed, we need to set that to the + // TODO:GH#2721 If PowerShell Core is installed, we need to set that to the // default profile, but only when the settings file was newly created. We'll // re-write the segment of the user settings for "default profile" to have - // the powershell core GUID instead. + // the PowerShell core GUID instead. // If we created the file, or found new dynamic profiles, write the user // settings string back to the file. diff --git a/src/cascadia/TerminalApp/GlobalAppSettings.cpp b/src/cascadia/TerminalApp/GlobalAppSettings.cpp index 832061aa4ad..526f2d256b1 100644 --- a/src/cascadia/TerminalApp/GlobalAppSettings.cpp +++ b/src/cascadia/TerminalApp/GlobalAppSettings.cpp @@ -514,7 +514,7 @@ std::wstring_view GlobalAppSettings::_SerializeTabWidthMode(const TabViewWidthMo } // Method Description: -// - Adds the given colorscheme to our map of schemes, using its name as the key. +// - Adds the given ColorScheme to our map of schemes, using its name as the key. // Arguments: // - scheme: the color scheme to add // Return Value: diff --git a/src/cascadia/TerminalApp/Tab.cpp b/src/cascadia/TerminalApp/Tab.cpp index 1fb49c719a7..a7050ffcfdd 100644 --- a/src/cascadia/TerminalApp/Tab.cpp +++ b/src/cascadia/TerminalApp/Tab.cpp @@ -381,7 +381,7 @@ namespace winrt::TerminalApp::implementation // This is called when the terminal changes its font size or sets it for the first // time (because when we just create terminal via its ctor it has invalid font size). // On the latter event, we tell the root pane to resize itself so that its descendants - // (including ourself) can properly snap to character grids. In future, we may also + // (including ourselves) can properly snap to character grids. In future, we may also // want to do that on regular font changes. control.FontSizeChanged([this](const int /* fontWidth */, const int /* fontHeight */, diff --git a/src/cascadia/TerminalCore/TerminalApi.cpp b/src/cascadia/TerminalCore/TerminalApi.cpp index c2196399959..d35a15ec8b1 100644 --- a/src/cascadia/TerminalCore/TerminalApi.cpp +++ b/src/cascadia/TerminalCore/TerminalApi.cpp @@ -417,7 +417,7 @@ try CATCH_LOG_RETURN_FALSE() // Method Description: -// - Updates the value in the colortable at index tableIndex to the new color +// - Updates the value in the color table at index tableIndex to the new color // color. color is a COLORREF, format 0x00BBGGRR. // Arguments: // - tableIndex: the index of the color table to update. diff --git a/src/cascadia/TerminalCore/TerminalDispatch.cpp b/src/cascadia/TerminalCore/TerminalDispatch.cpp index c209e810d25..f0f5fd367a6 100644 --- a/src/cascadia/TerminalCore/TerminalDispatch.cpp +++ b/src/cascadia/TerminalCore/TerminalDispatch.cpp @@ -125,7 +125,7 @@ try CATCH_LOG_RETURN_FALSE() // Method Description: -// - Sets a single entry of the colortable to a new value +// - Sets a single entry of the color table to a new value // Arguments: // - tableIndex: The VT color table index // - color: The new RGB color value to use. diff --git a/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp b/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp index bb52c75408e..61bfcf1ca0d 100644 --- a/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp +++ b/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp @@ -398,7 +398,7 @@ int NonClientIslandWindow::_GetResizeHandleHeight() const noexcept // If there's a taskbar on any side of the monitor, reduce our size // a little bit on that edge. // - // Note to future code archeologists: + // Note to future code archaeologists: // This doesn't seem to work for fullscreen on the primary display. // However, testing a bunch of other apps with fullscreen modes // and an auto-hiding taskbar has shown that _none_ of them diff --git a/src/host/screenInfo.cpp b/src/host/screenInfo.cpp index ba1de0e99e0..72e8a17e861 100644 --- a/src/host/screenInfo.cpp +++ b/src/host/screenInfo.cpp @@ -1870,7 +1870,7 @@ const SCREEN_INFORMATION& SCREEN_INFORMATION::GetMainBuffer() const if (NT_SUCCESS(Status)) { // if this is already an alternate buffer, we want to make the new - // buffer the alt on our main buffer, not on ourself, because there + // buffer the alt on our main buffer, not on ourselves, because there // can only ever be one main and one alternate. SCREEN_INFORMATION* const psiOldAltBuffer = siMain._psiAlternateBuffer; diff --git a/src/host/settings.cpp b/src/host/settings.cpp index 154d3b921c9..20b58b51a73 100644 --- a/src/host/settings.cpp +++ b/src/host/settings.cpp @@ -778,7 +778,7 @@ COLORREF Settings::GetColorTableEntry(const size_t index) const // Parameters: // - attributes - The TextAttributes to generate a legacy attribute for. // Return value: -// - A WORD representing the entry in the color table that most closely represents the given fullcolor attributes. +// - A WORD representing the entry in the color table that most closely represents the given full color attributes. WORD Settings::GenerateLegacyAttributes(const TextAttribute attributes) const { const WORD wLegacyOriginal = attributes.GetLegacyAttributes(); @@ -916,7 +916,7 @@ bool Settings::GetUseDx() const noexcept // - Return the default foreground color of the console. If the settings are // configured to have a default foreground color (separate from the color // table), this will return that value. Otherwise it will return the value -// from the colortable corresponding to our default legacy attributes. +// from the color table corresponding to our default legacy attributes. // Arguments: // - // Return Value: @@ -931,7 +931,7 @@ COLORREF Settings::CalculateDefaultForeground() const noexcept // - Return the default background color of the console. If the settings are // configured to have a default background color (separate from the color // table), this will return that value. Otherwise it will return the value -// from the colortable corresponding to our default legacy attributes. +// from the color table corresponding to our default legacy attributes. // Arguments: // - // Return Value: diff --git a/src/interactivity/win32/windowproc.cpp b/src/interactivity/win32/windowproc.cpp index d20bdc84556..35536fca073 100644 --- a/src/interactivity/win32/windowproc.cpp +++ b/src/interactivity/win32/windowproc.cpp @@ -828,7 +828,7 @@ void Window::_HandleWindowPosChanged(const LPARAM lParam) // --- // We've tried in the past to not call BeginPaint/EndPaint // and under certain circumstances (windows with SW_HIDE, SKUs without DWM, etc.) - // the system either sends WM_PAINT messages ad nauseum or fails to redraw everything correctly. + // the system either sends WM_PAINT messages ad nauseam or fails to redraw everything correctly. PAINTSTRUCT ps; HDC const hdc = BeginPaint(hwnd, &ps); RETURN_HR_IF_NULL(E_FAIL, hdc); diff --git a/src/terminal/input/mouseInput.cpp b/src/terminal/input/mouseInput.cpp index c215c810146..28cbc5f4e3e 100644 --- a/src/terminal/input/mouseInput.cpp +++ b/src/terminal/input/mouseInput.cpp @@ -57,7 +57,7 @@ static constexpr bool _isButtonMsg(const unsigned int button) noexcept // Parameters: // - buttonCode - the message to decode. // Return value: -// - true iff buttonCode is a hover enent to translate +// - true iff buttonCode is a hover event to translate static constexpr bool _isHoverMsg(const unsigned int buttonCode) noexcept { return buttonCode == WM_MOUSEMOVE; diff --git a/src/til/ut_til/RectangleTests.cpp b/src/til/ut_til/RectangleTests.cpp index 82aa5a69a75..65a7b80988b 100644 --- a/src/til/ut_til/RectangleTests.cpp +++ b/src/til/ut_til/RectangleTests.cpp @@ -998,7 +998,7 @@ class RectangleTests const til::rectangle spillsOut{ 0, 0, 50, 50 }; const til::rectangle sticksOut{ 14, 12, 30, 13 }; - VERIFY_IS_TRUE(rc.contains(rc), L"We contain ourself."); + VERIFY_IS_TRUE(rc.contains(rc), L"We contain ourselves."); VERIFY_IS_TRUE(rc.contains(fitsInside), L"We fully contain a smaller rectangle."); VERIFY_IS_FALSE(rc.contains(spillsOut), L"We do not fully contain rectangle larger than us."); VERIFY_IS_FALSE(rc.contains(sticksOut), L"We do not contain a rectangle that is smaller, but sticks out our edge."); From c3e0e3b39c48b27e02c411c0a925c2755079aa27 Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:33:32 -0400 Subject: [PATCH 6/6] Update GlobalAppSettings.cpp --- src/cascadia/TerminalApp/GlobalAppSettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/GlobalAppSettings.cpp b/src/cascadia/TerminalApp/GlobalAppSettings.cpp index 526f2d256b1..9faade149aa 100644 --- a/src/cascadia/TerminalApp/GlobalAppSettings.cpp +++ b/src/cascadia/TerminalApp/GlobalAppSettings.cpp @@ -516,7 +516,7 @@ std::wstring_view GlobalAppSettings::_SerializeTabWidthMode(const TabViewWidthMo // Method Description: // - Adds the given ColorScheme to our map of schemes, using its name as the key. // Arguments: -// - scheme: the color scheme to add +// - scheme: the ColorScheme to add // Return Value: // - void GlobalAppSettings::AddColorScheme(ColorScheme scheme)