From c96799c6e9d84b5968f8841633c6d74480f91d02 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Tue, 22 Mar 2022 06:00:06 -0500 Subject: [PATCH 01/49] Preview the input via the TSF input control. This is awesome, and should go into main --- .../TerminalApp/ActionPreviewHandlers.cpp | 27 +++++++++++++++++++ src/cascadia/TerminalApp/TerminalPage.h | 1 + .../TerminalControl/TSFInputControl.cpp | 15 +++++++++++ .../TerminalControl/TSFInputControl.h | 2 ++ .../TerminalControl/TSFInputControl.idl | 3 +++ src/cascadia/TerminalControl/TermControl.cpp | 6 +++++ src/cascadia/TerminalControl/TermControl.h | 1 + src/cascadia/TerminalControl/TermControl.idl | 2 ++ 8 files changed, 57 insertions(+) diff --git a/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp b/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp index 84aba407f74..e867d41b5a6 100644 --- a/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp +++ b/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp @@ -50,6 +50,7 @@ namespace winrt::TerminalApp::implementation { case ShortcutAction::SetColorScheme: case ShortcutAction::AdjustOpacity: + case ShortcutAction::SendInput: { _RunRestorePreviews(); break; @@ -140,6 +141,27 @@ namespace winrt::TerminalApp::implementation }); } + void TerminalPage::_PreviewSendInput(const Settings::Model::SendInputArgs& args) + { + const auto backup = _restorePreviewFuncs.empty(); + + _ApplyToActiveControls([&](const auto& control) { + // // Stash a copy of the original opacity. + // auto originalOpacity{ control.BackgroundOpacity() }; + + // Apply the new opacity + control.PreviewInput(args.Input()); + + if (backup) + { + _restorePreviewFuncs.emplace_back([=]() { + // On dismiss: + control.PreviewInput(L""); + }); + } + }); + } + // Method Description: // - Handler for the CommandPalette::PreviewAction event. The Command // Palette will raise this even when an action is selected, but _not_ @@ -176,6 +198,11 @@ namespace winrt::TerminalApp::implementation _PreviewAdjustOpacity(args.ActionAndArgs().Args().try_as()); break; } + case ShortcutAction::SendInput: + { + _PreviewSendInput(args.ActionAndArgs().Args().try_as()); + break; + } } // GH#9818 Other ideas for actions that could be preview-able: diff --git a/src/cascadia/TerminalApp/TerminalPage.h b/src/cascadia/TerminalApp/TerminalPage.h index 55021a1e896..7ae426dd738 100644 --- a/src/cascadia/TerminalApp/TerminalPage.h +++ b/src/cascadia/TerminalApp/TerminalPage.h @@ -414,6 +414,7 @@ namespace winrt::TerminalApp::implementation void _RunRestorePreviews(); void _PreviewColorScheme(const Microsoft::Terminal::Settings::Model::SetColorSchemeArgs& args); void _PreviewAdjustOpacity(const Microsoft::Terminal::Settings::Model::AdjustOpacityArgs& args); + void _PreviewSendInput(const Microsoft::Terminal::Settings::Model::SendInputArgs& args); winrt::Microsoft::Terminal::Settings::Model::Command _lastPreviewedCommand{ nullptr }; std::vector> _restorePreviewFuncs{}; diff --git a/src/cascadia/TerminalControl/TSFInputControl.cpp b/src/cascadia/TerminalControl/TSFInputControl.cpp index efac84e2917..026be091854 100644 --- a/src/cascadia/TerminalControl/TSFInputControl.cpp +++ b/src/cascadia/TerminalControl/TSFInputControl.cpp @@ -470,4 +470,19 @@ namespace winrt::Microsoft::Terminal::Control::implementation void TSFInputControl::_formatUpdatingHandler(CoreTextEditContext sender, const CoreTextFormatUpdatingEventArgs& /*args*/) { } + + void TSFInputControl::ManuallyDisplayText(const winrt::hstring& text) + { + _focused = !text.empty(); + Canvas().Visibility(text.empty() ? Visibility::Collapsed : Visibility::Visible); + + _inputBuffer.clear(); + // _editContext.NotifyFocusLeave(); + _activeTextStart = 0; + _inComposition = false; + + TextBlock().Text(text); + TextBlock().UpdateLayout(); + TryRedrawCanvas(); + } } diff --git a/src/cascadia/TerminalControl/TSFInputControl.h b/src/cascadia/TerminalControl/TSFInputControl.h index d70eec8301c..b3392f466cd 100644 --- a/src/cascadia/TerminalControl/TSFInputControl.h +++ b/src/cascadia/TerminalControl/TSFInputControl.h @@ -40,6 +40,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation void ClearBuffer(); void TryRedrawCanvas(); + void ManuallyDisplayText(const winrt::hstring& text); + void Close(); // -------------------------------- WinRT Events --------------------------------- diff --git a/src/cascadia/TerminalControl/TSFInputControl.idl b/src/cascadia/TerminalControl/TSFInputControl.idl index 6a6f6814f2a..ce274a6eb8a 100644 --- a/src/cascadia/TerminalControl/TSFInputControl.idl +++ b/src/cascadia/TerminalControl/TSFInputControl.idl @@ -31,6 +31,9 @@ namespace Microsoft.Terminal.Control void ClearBuffer(); void TryRedrawCanvas(); + void ManuallyDisplayText(String text); + + void Close(); } } diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index 3aeeb35786c..5fa19244882 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -329,6 +329,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation // - void TermControl::SendInput(const winrt::hstring& wstr) { + PreviewInput(L""); _core.SendInput(wstr); } void TermControl::ClearBuffer(Control::ClearBufferType clearType) @@ -2834,4 +2835,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation return _core.OwningHwnd(); } + void TermControl::PreviewInput(const winrt::hstring& text) + { + TSFInputControl().ManuallyDisplayText(text); + } + } diff --git a/src/cascadia/TerminalControl/TermControl.h b/src/cascadia/TerminalControl/TermControl.h index fdb10e9b978..06124c37da3 100644 --- a/src/cascadia/TerminalControl/TermControl.h +++ b/src/cascadia/TerminalControl/TermControl.h @@ -41,6 +41,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation Windows::Foundation::Size CharacterDimensions() const; Windows::Foundation::Size MinimumSize(); float SnapDimensionToGrid(const bool widthOrHeight, const float dimension); + void PreviewInput(const winrt::hstring& text); void WindowVisibilityChanged(const bool showOrHide); diff --git a/src/cascadia/TerminalControl/TermControl.idl b/src/cascadia/TerminalControl/TermControl.idl index b221cc85cd4..95d5e5780de 100644 --- a/src/cascadia/TerminalControl/TermControl.idl +++ b/src/cascadia/TerminalControl/TermControl.idl @@ -85,5 +85,7 @@ namespace Microsoft.Terminal.Control // opacity set by the settings should call this instead. Double BackgroundOpacity { get; }; + void PreviewInput(String text); + } } From 1449088e80b81d82cbf5456baaf69798ee849d16 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 1 Apr 2022 06:55:32 -0500 Subject: [PATCH 02/49] bugfixes for the demo --- src/cascadia/TerminalApp/CommandPalette.cpp | 10 ++++++++-- src/cascadia/TerminalApp/TerminalPage.cpp | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp index 5d13fdbf972..b378ff40f99 100644 --- a/src/cascadia/TerminalApp/CommandPalette.cpp +++ b/src/cascadia/TerminalApp/CommandPalette.cpp @@ -236,13 +236,17 @@ namespace winrt::TerminalApp::implementation void CommandPalette::_selectedCommandChanged(const IInspectable& /*sender*/, const Windows::UI::Xaml::RoutedEventArgs& /*args*/) { + const auto currentlyVisible{ Visibility() == Visibility::Visible }; + const auto selectedCommand = _filteredActionsView().SelectedItem(); const auto filteredCommand{ selectedCommand.try_as() }; if (_currentMode == CommandPaletteMode::TabSwitchMode) { _switchToTab(filteredCommand); } - else if (_currentMode == CommandPaletteMode::ActionMode && filteredCommand != nullptr) + else if (_currentMode == CommandPaletteMode::ActionMode && + filteredCommand != nullptr && + currentlyVisible) { if (const auto actionPaletteItem{ filteredCommand.Item().try_as() }) { @@ -1047,7 +1051,9 @@ namespace winrt::TerminalApp::implementation { std::copy(begin(commandsToFilter), end(commandsToFilter), std::back_inserter(actions)); } - else if (_currentMode == CommandPaletteMode::TabSearchMode || _currentMode == CommandPaletteMode::ActionMode || _currentMode == CommandPaletteMode::CommandlineMode) + else if (_currentMode == CommandPaletteMode::TabSearchMode || + _currentMode == CommandPaletteMode::ActionMode || + _currentMode == CommandPaletteMode::CommandlineMode) { for (const auto& action : commandsToFilter) { diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 2d0078c3747..ff2821a13b8 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -1273,7 +1273,13 @@ namespace winrt::TerminalApp::implementation return; } - if (const auto p = CommandPalette(); p.Visibility() == Visibility::Visible && cmd.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette) + if (const auto p = CommandPalette(); p.Visibility() == Visibility::Visible && + cmd.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette) + { + p.Visibility(Visibility::Collapsed); + } + if (const auto p = AutoCompleteMenu(); p.Visibility() == Visibility::Visible && + cmd.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette) { p.Visibility(Visibility::Collapsed); } From d3b5533a1eef45edbfbae4e68ee7e9507c97406c Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 29 Apr 2022 06:22:48 -0500 Subject: [PATCH 03/49] fix remaining bugs --- src/cascadia/TerminalApp/ActionPreviewHandlers.cpp | 4 ++++ src/cascadia/TerminalApp/CommandPalette.cpp | 7 +++++-- src/cascadia/TerminalApp/TerminalPage.cpp | 5 ----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp b/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp index e867d41b5a6..a059372f869 100644 --- a/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp +++ b/src/cascadia/TerminalApp/ActionPreviewHandlers.cpp @@ -203,6 +203,10 @@ namespace winrt::TerminalApp::implementation _PreviewSendInput(args.ActionAndArgs().Args().try_as()); break; } + default: + { + _EndPreview(); + } } // GH#9818 Other ideas for actions that could be preview-able: diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp index b378ff40f99..5fe6323b9fb 100644 --- a/src/cascadia/TerminalApp/CommandPalette.cpp +++ b/src/cascadia/TerminalApp/CommandPalette.cpp @@ -245,10 +245,13 @@ namespace winrt::TerminalApp::implementation _switchToTab(filteredCommand); } else if (_currentMode == CommandPaletteMode::ActionMode && - filteredCommand != nullptr && currentlyVisible) { - if (const auto actionPaletteItem{ filteredCommand.Item().try_as() }) + if (filteredCommand == nullptr) + { + _PreviewActionHandlers(*this, nullptr); + } + else if (const auto actionPaletteItem{ filteredCommand.Item().try_as() }) { _PreviewActionHandlers(*this, actionPaletteItem.Command()); } diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index ff2821a13b8..6714bb3bd86 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -1278,11 +1278,6 @@ namespace winrt::TerminalApp::implementation { p.Visibility(Visibility::Collapsed); } - if (const auto p = AutoCompleteMenu(); p.Visibility() == Visibility::Visible && - cmd.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette) - { - p.Visibility(Visibility::Collapsed); - } // Let's assume the user has bound the dead key "^" to a sendInput command that sends "b". // If the user presses the two keys "^a" it'll produce "bâ", despite us marking the key event as handled. From 0bda66fc2f0f5d6a5e709d8ebc4678256d132fc3 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 29 Apr 2022 06:55:15 -0500 Subject: [PATCH 04/49] a comment I missed --- src/cascadia/TerminalApp/CommandPalette.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp index 5fe6323b9fb..904b739d029 100644 --- a/src/cascadia/TerminalApp/CommandPalette.cpp +++ b/src/cascadia/TerminalApp/CommandPalette.cpp @@ -247,6 +247,8 @@ namespace winrt::TerminalApp::implementation else if (_currentMode == CommandPaletteMode::ActionMode && currentlyVisible) { + // If we don't have a selected command, then end any previews we + // might currently be showing. if (filteredCommand == nullptr) { _PreviewActionHandlers(*this, nullptr); From ccfc83443be754abac5be2200e3df05a8ae6f2ca Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 29 Apr 2022 06:55:15 -0500 Subject: [PATCH 05/49] Migrate spelling-0.0.21 changes from main --- .github/actions/spelling/README.md | 15 + .github/actions/spelling/advice.md | 34 +- .github/actions/spelling/allow/allow.txt | 24 +- .github/actions/spelling/allow/apis.txt | 22 +- .github/actions/spelling/allow/names.txt | 2 + .github/actions/spelling/candidate.patterns | 523 +++++++++++ .github/actions/spelling/excludes.txt | 44 +- .github/actions/spelling/expect/alphabet.txt | 8 - .github/actions/spelling/expect/expect.txt | 885 +++--------------- .github/actions/spelling/expect/web.txt | 23 - .../actions/spelling/line_forbidden.patterns | 62 ++ .../actions/spelling/patterns/patterns.txt | 82 +- .github/actions/spelling/reject.txt | 28 +- .github/workflows/spelling2.yml | 132 ++- 14 files changed, 1035 insertions(+), 849 deletions(-) create mode 100644 .github/actions/spelling/README.md create mode 100644 .github/actions/spelling/candidate.patterns create mode 100644 .github/actions/spelling/line_forbidden.patterns diff --git a/.github/actions/spelling/README.md b/.github/actions/spelling/README.md new file mode 100644 index 00000000000..4c40f7f02ac --- /dev/null +++ b/.github/actions/spelling/README.md @@ -0,0 +1,15 @@ +# check-spelling/check-spelling configuration + +File | Purpose | Format | Info +-|-|-|- +[allow/*.txt](allow/) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow) +[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject) +[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes) +[patterns/*.txt](patterns/) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) +[candidate.patterns](candidate.patterns) | Patterns that might be worth adding to [patterns.txt](patterns.txt) | perl regular expression with optional comment block introductions (all matches will be suggested) | [candidates](https://github.com/check-spelling/check-spelling/wiki/Feature:-Suggest-patterns) +[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) + +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 885b1a6978d..d82df49ee22 100644 --- a/.github/actions/spelling/advice.md +++ b/.github/actions/spelling/advice.md @@ -1,4 +1,4 @@ - +
:pencil2: Contributor please read this @@ -6,7 +6,7 @@ By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later. -:warning: The command is written for posix shells. You can copy the contents of each `perl` command excluding the outer `'` marks and dropping any `'"`/`"'` quotation mark pairs into a file and then run `perl file.pl` from the root of the repository to run the code. Alternatively, you can manually insert the items... +:warning: The command is written for posix shells. If it doesn't work for you, you can manually _add_ (one word per line) / _remove_ items to `expect.txt` and the `excludes.txt` files. If the listed items are: @@ -20,31 +20,29 @@ See the `README.md` in each directory for more information. :microscope: You can test your commits **without** *appending* to a PR by creating a new branch with that extra change and pushing it to your fork. The [check-spelling](https://github.com/marketplace/actions/check-spelling) action will run in response to your **push** -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink: -
:clamp: If you see a bunch of garbage -If it relates to a ... -
well-formed pattern +
If the flagged items are :exploding_head: false positives -See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it. +If items relate to a ... +* binary file (or some other file you wouldn't want to check at all). -If not, try writing one and adding it to a `patterns/{file}.txt`. + Please add a file path to the `excludes.txt` file matching the containing file. -Patterns are Perl 5 Regular Expressions - you can [test]( -https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. + File paths are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. -Note that patterns can't match multiline strings. -
-
binary-ish string + `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( +../tree/HEAD/README.md) (on whichever branch you're using). -Please add a file path to the `excludes.txt` file instead of just accepting the garbage. +* well-formed pattern. -File paths are Perl 5 Regular Expressions - you can [test]( -https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. + If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, + try adding it to the `patterns.txt` file. -`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( -../tree/HEAD/README.md) (on whichever branch you're using). -
+ Patterns are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. + Note that patterns can't match multiline strings.
diff --git a/.github/actions/spelling/allow/allow.txt b/.github/actions/spelling/allow/allow.txt index 37a5b7d0f28..eaa0a471190 100644 --- a/.github/actions/spelling/allow/allow.txt +++ b/.github/actions/spelling/allow/allow.txt @@ -1,20 +1,21 @@ admins -apc +allcolors Apc -bsd +apc breadcrumb breadcrumbs +bsd calt -CMMI ccmp changelog clickable clig +CMMI copyable cybersecurity dalet -dcs Dcs +dcs dialytika dje downside @@ -26,36 +27,43 @@ EDDC Enum'd Fitt formattings +FTCS ftp fvar +gantt gcc geeksforgeeks ghe +github gje godbolt hostname hostnames +https hyperlink hyperlinking hyperlinks +iconify img inlined It'd kje libfuzzer +libuv liga lje Llast llvm Lmid locl +lol lorem Lorigin maxed +minimalistic mkmk mnt mru -noreply nje noreply ogonek @@ -76,13 +84,16 @@ runtimes shcha slnt Sos +ssh timeline timelines timestamped TLDR tokenizes tonos +toolset tshe +ubuntu uiatextrange UIs und @@ -91,6 +102,7 @@ versioned vsdevcmd We'd wildcards +XBox +YBox yeru zhe -allcolors diff --git a/.github/actions/spelling/allow/apis.txt b/.github/actions/spelling/allow/apis.txt index 682023fd96c..e0cc7550095 100644 --- a/.github/actions/spelling/allow/apis.txt +++ b/.github/actions/spelling/allow/apis.txt @@ -5,6 +5,7 @@ aclapi alignas alignof APPLYTOSUBMENUS +appxrecipe bitfield bitfields BUILDBRANCH @@ -14,6 +15,7 @@ BYCOMMAND BYPOSITION charconv CLASSNOTAVAILABLE +CLOSEAPP cmdletbinding COLORPROPERTY colspan @@ -28,9 +30,14 @@ dataobject dcomp DERR dlldata +DNE DONTADDTORECENT +DWMSBT +DWMWA +DWMWA DWORDLONG endfor +ENDSESSION enumset environstrings EXPCMDFLAGS @@ -70,6 +77,7 @@ IDirect IExplorer IFACEMETHOD IFile +IGraphics IInheritable IMap IMonarch @@ -84,6 +92,7 @@ istream IStringable ITab ITaskbar +itow IUri IVirtual KEYSELECT @@ -95,12 +104,15 @@ lround Lsa lsass LSHIFT +LTGRAY +MAINWINDOW memchr memicmp MENUCOMMAND MENUDATA -MENUITEMINFOW MENUINFO +MENUITEMINFOW +mmeapi MOUSELEAVE mov mptt @@ -136,16 +148,18 @@ OUTLINETEXTMETRICW overridable PACL PAGESCROLL +PATINVERT PEXPLICIT PICKFOLDERS pmr ptstr +QUERYENDSESSION rcx REGCLS RETURNCMD rfind -roundf ROOTOWNER +roundf RSHIFT SACL schandle @@ -175,6 +189,8 @@ Stubless Subheader Subpage syscall +SYSTEMBACKDROP +TABROW TASKBARCREATED TBPF THEMECHANGED @@ -194,6 +210,8 @@ UOI UPDATEINIFILE userenv USEROBJECTFLAGS +Viewbox +virtualalloc wcsstr wcstoui winmain diff --git a/.github/actions/spelling/allow/names.txt b/.github/actions/spelling/allow/names.txt index 58b24116e63..1c6ef9a373c 100644 --- a/.github/actions/spelling/allow/names.txt +++ b/.github/actions/spelling/allow/names.txt @@ -69,6 +69,8 @@ Rincewind rprichard Schoonover shadertoy +Shomnipotence +simioni Somuah sonph sonpham diff --git a/.github/actions/spelling/candidate.patterns b/.github/actions/spelling/candidate.patterns new file mode 100644 index 00000000000..4b40e728ee3 --- /dev/null +++ b/.github/actions/spelling/candidate.patterns @@ -0,0 +1,523 @@ +# marker to ignore all code on line +^.*/\* #no-spell-check-line \*/.*$ +# marker for ignoring a comment to the end of the line +// #no-spell-check.*$ + +# patch hunk comments +^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .* +# git index header +index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40} + +# cid urls +(['"])cid:.*?\g{-1} + +# data url in parens +\(data:[^)]*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\) +# data url in quotes +([`'"])data:.*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1} +# data url +data:[-a-zA-Z=;:/0-9+]*,\S* + +# mailto urls +mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,} + +# magnet urls +magnet:[?=:\w]+ + +# magnet urls +"magnet:[^"]+" + +# obs: +"obs:[^"]*" + +# The `\b` here means a break, it's the fancy way to handle urls, but it makes things harder to read +# In this examples content, I'm using a number of different ways to match things to show various approaches +# asciinema +\basciinema\.org/a/[0-9a-zA-Z]+ + +# apple +\bdeveloper\.apple\.com/[-\w?=/]+ +# Apple music +\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+ + +# appveyor api +\bci\.appveyor\.com/api/projects/status/[0-9a-z]+ +# appveyor project +\bci\.appveyor\.com/project/(?:[^/\s"]*/){2}builds?/\d+/job/[0-9a-z]+ + +# Amazon + +# Amazon +\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|) +# AWS S3 +\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]* +# AWS execute-api +\b[0-9a-z]{10}\.execute-api\.[-0-9a-z]+\.amazonaws\.com\b +# AWS ELB +\b\w+\.[-0-9a-z]+\.elb\.amazonaws\.com\b +# AWS SNS +\bsns\.[-0-9a-z]+.amazonaws\.com/[-\w/&#%_?:=]* +# AWS VPC +vpc-\w+ + +# 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?&=_%]* +# YouTube music +\bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*) +# YouTube tag +<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"] +# YouTube image +\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]* +# Google Accounts +\baccounts.google.com/[-_/?=.:;+%&0-9a-zA-Z]* +# Google Analytics +\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]* +# Google APIs +\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+ +# Google Storage +\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|) +# Google Calendar +\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+ +\w+\@group\.calendar\.google\.com\b +# Google DataStudio +\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|) +# The leading `/` here is as opposed to the `\b` above +# ... a short way to match `https://` or `http://` since most urls have one of those prefixes +# Google Docs +/docs\.google\.com/[a-z]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|)) +# Google Drive +\bdrive\.google\.com/(?:file/d/|open)[-0-9a-zA-Z_?=]* +# Google Groups +\bgroups\.google\.com/(?:(?:forum/#!|d/)(?:msg|topics?|searchin)|a)/[^/\s"]+/[-a-zA-Z0-9$]+(?:/[-a-zA-Z0-9]+)* +# Google Maps +\bmaps\.google\.com/maps\?[\w&;=]* +# Google themes +themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. +# Google CDN +\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]* +# Goo.gl +/goo\.gl/[a-zA-Z0-9]+ +# Google Chrome Store +\bchrome\.google\.com/webstore/detail/[-\w]*(?:/\w*|) +# Google Books +\bgoogle\.(?:\w{2,4})/books(?:/\w+)*\?[-\w\d=&#.]* +# Google Fonts +\bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]* +# Google Forms +\bforms\.gle/\w+ +# Google Scholar +\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+ +# Google Colab Research Drive +\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]* + +# GitHub SHAs (api) +\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b +# GitHub SHAs (markdown) +(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|) +# GitHub SHAs +\bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b +# GitHub wiki +\bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b +# githubusercontent +/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]* +# githubassets +\bgithubassets.com/[0-9a-f]+(?:[-/\w.]+) +# gist github +\bgist\.github\.com/[^/\s"]+/[0-9a-f]+ +# git.io +\bgit\.io/[0-9a-zA-Z]+ +# GitHub JSON +"node_id": "[-a-zA-Z=;:/0-9+]*" +# Contributor +\[[^\]]+\]\(https://github\.com/[^/\s"]+\) +# GHSA +GHSA(?:-[0-9a-z]{4}){3} + +# GitLab commit +\bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b +# GitLab merge requests +\bgitlab\.[^/\s"]*/\S+/\S+/-/merge_requests/\d+/diffs#[0-9a-f]{40}\b +# GitLab uploads +\bgitlab\.[^/\s"]*/uploads/[-a-zA-Z=;:/0-9+]* +# GitLab commits +\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b + +# binanace +accounts.binance.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* + +# bitbucket diff +\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}diff(?:stat|)(?:/[^/\s"]+){2}:[0-9a-f]+ +# bitbucket repositories commits +\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}commits?/[0-9a-f]+ +# bitbucket commits +\bbitbucket\.org/(?:[^/\s"]+/){2}commits?/[0-9a-f]+ + +# bit.ly +\bbit\.ly/\w+ + +# bitrise +\bapp\.bitrise\.io/app/[0-9a-f]*/[\w.?=&]* + +# bootstrapcdn.com +\bbootstrapcdn\.com/[-./\w]+ + +# cdn.cloudflare.com +\bcdnjs\.cloudflare\.com/[./\w]+ + +# circleci +\bcircleci\.com/gh(?:/[^/\s"]+){1,5}.[a-z]+\?[-0-9a-zA-Z=&]+ + +# gitter +\bgitter\.im(?:/[^/\s"]+){2}\?at=[0-9a-f]+ + +# gravatar +\bgravatar\.com/avatar/[0-9a-f]+ + +# ibm +[a-z.]*ibm\.com/[-_#=:%!?~.\\/\d\w]* + +# imgur +\bimgur\.com/[^.]+ + +# Internet Archive +\barchive\.org/web/\d+/(?:[-\w.?,'/\\+&%$#_:]*) + +# discord +/discord(?:app\.com|\.gg)/(?:invite/)?[a-zA-Z0-9]{7,} + +# Disqus +\bdisqus\.com/[-\w/%.()!?&=_]* + +# medium link +\blink\.medium\.com/[a-zA-Z0-9]+ +# medium +\bmedium\.com/\@?[^/\s"]+/[-\w]+ + +# microsoft +\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]* +# powerbi +\bapp\.powerbi\.com/reportEmbed/[^"' ]* +# vs devops +\bvisualstudio.com(?::443|)/[-\w/?=%&.]* +# microsoft store +\bmicrosoft\.com/store/apps/\w+ + +# mvnrepository.com +\bmvnrepository\.com/[-0-9a-z./]+ + +# now.sh +/[0-9a-z-.]+\.now\.sh\b + +# oracle +\bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]* + +# chromatic.com +/\S+.chromatic.com\S*[")] + +# codacy +\bapi\.codacy\.com/project/badge/Grade/[0-9a-f]+ + +# compai +\bcompai\.pub/v1/png/[0-9a-f]+ + +# mailgun api +\.api\.mailgun\.net/v3/domains/[0-9a-z]+\.mailgun.org/messages/[0-9a-zA-Z=@]* +# mailgun +\b[0-9a-z]+.mailgun.org + +# /message-id/ +/message-id/[-\w@./%]+ + +# Reddit +\breddit\.com/r/[/\w_]* + +# requestb.in +\brequestb\.in/[0-9a-z]+ + +# sched +\b[a-z0-9]+\.sched\.com\b + +# Slack url +slack://[a-zA-Z0-9?&=]+ +# Slack +\bslack\.com/[-0-9a-zA-Z/_~?&=.]* +# Slack edge +\bslack-edge\.com/[-a-zA-Z0-9?&=%./]+ +# Slack images +\bslack-imgs\.com/[-a-zA-Z0-9?&=%.]+ + +# shields.io +\bshields\.io/[-\w/%?=&.:+;,]* + +# stackexchange -- https://stackexchange.com/feeds/sites +\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/) + +# Sentry +[0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b + +# Twitter markdown +\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\) +# Twitter hashtag +\btwitter\.com/hashtag/[\w?_=&]* +# Twitter status +\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|) +# Twitter profile images +\btwimg\.com/profile_images/[_\w./]* +# Twitter media +\btwimg\.com/media/[-_\w./?=]* +# Twitter link shortened +\bt\.co/\w+ + +# facebook +\bfburl\.com/[0-9a-z_]+ +# facebook CDN +\bfbcdn\.net/[\w/.,]* +# facebook watch +\bfb\.watch/[0-9A-Za-z]+ + +# dropbox +\bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+ + +# ipfs protocol +ipfs://[0-9a-z]* +# ipfs url +/ipfs/[0-9a-z]* + +# w3 +\bw3\.org/[-0-9a-zA-Z/#.]+ + +# loom +\bloom\.com/embed/[0-9a-f]+ + +# regex101 +\bregex101\.com/r/[^/\s"]+/\d+ + +# figma +\bfigma\.com/file(?:/[0-9a-zA-Z]+/)+ + +# freecodecamp.org +\bfreecodecamp\.org/[-\w/.]+ + +# image.tmdb.org +\bimage\.tmdb\.org/[/\w.]+ + +# mermaid +\bmermaid\.ink/img/[-\w]+|\bmermaid-js\.github\.io/mermaid-live-editor/#/edit/[-\w]+ + +# Wikipedia +\ben\.wikipedia\.org/wiki/[-\w%.#]+ + +# gitweb +[^"\s]+/gitweb/\S+;h=[0-9a-f]+ + +# HyperKitty lists +/archives/list/[^@/]+\@[^/\s"]*/message/[^/\s"]*/ + +# lists +/thread\.html/[^"\s]+ + +# list-management +\blist-manage\.com/subscribe(?:[?&](?:u|id)=[0-9a-f]+)+ + +# kubectl.kubernetes.io/last-applied-configuration +"kubectl.kubernetes.io/last-applied-configuration": ".*" + +# pgp +\bgnupg\.net/pks/lookup[?&=0-9a-zA-Z]* + +# Spotify +\bopen\.spotify\.com/embed/playlist/\w+ + +# Mastodon +\bmastodon\.[-a-z.]*/(?:media/|\@)[?&=0-9a-zA-Z_]* + +# scastie +\bscastie\.scala-lang\.org/[^/]+/\w+ + +# images.unsplash.com +\bimages\.unsplash\.com/(?:(?:flagged|reserve)/|)[-\w./%?=%&.;]+ + +# pastebin +\bpastebin\.com/[\w/]+ + +# heroku +\b\w+\.heroku\.com/source/archive/\w+ + +# quip +\b\w+\.quip\.com/\w+(?:(?:#|/issues/)\w+)? + +# badgen.net +\bbadgen\.net/badge/[^")\]'\s]+ + +# statuspage.io +\w+\.statuspage\.io\b + +# media.giphy.com +\bmedia\.giphy\.com/media/[^/]+/[\w.?&=]+ + +# tinyurl +\btinyurl\.com/\w+ + +# getopts +\bgetopts\s+(?:"[^"]+"|'[^']+') + +# ANSI color codes +(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m + +# URL escaped characters +\%[0-9A-F][A-F] +# IPv6 +\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b +# c99 hex digits (not the full format, just one I've seen) +0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP] +# Punycode +\bxn--[-0-9a-z]+ +# sha +sha\d+:[0-9]*[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 +# hex in url queries +=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?& +# ssh +(?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,} + +# PGP +\b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b +# GPG keys +\b(?:[0-9A-F]{4} ){5}(?: [0-9A-F]{4}){5}\b +# Well known gpg keys +.well-known/openpgpkey/[\w./]+ + +# 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)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b +# integrity +integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}" + +# https://www.gnu.org/software/groff/manual/groff.html +# man troff content +\\f[BCIPR] +# ' +\\\(aq + +# .desktop mime types +^MimeTypes?=.*$ +# .desktop localized entries +^[A-Z][a-z]+\[[a-z]+\]=.*$ +# Localized .desktop content +Name\[[^\]]+\]=.* + +# IServiceProvider +\bI(?=(?:[A-Z][a-z]{2,})+\b) + +# crypt +"\$2[ayb]\$.{56}" + +# scrypt / argon +\$(?:scrypt|argon\d+[di]*)\$\S+ + +# Input to GitHub JSON +content: "[-a-zA-Z=;:/0-9+]*=" + +# Python stringprefix / binaryprefix +# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings +(?v# +(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) +# Compiler flags (Scala) +(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) +# Compiler flags +#(?:^|[\t ,"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (linker) +,-B +# curl arguments +\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)* +# set arguments +\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)* +# tar arguments +\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+ +# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long... +\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b +# macOS temp folders +/var/folders/\w\w/[+\w]+/(?:T|-Caches-)/ diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index 4b755b30e6b..bc509a5669e 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -1,28 +1,39 @@ +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes (?:(?i)\.png$) +(?:^|/)(?i)COPYRIGHT +(?:^|/)(?i)LICEN[CS]E +(?:^|/)3rdparty/ (?:^|/)dirs$ (?:^|/)go\.mod$ (?:^|/)go\.sum$ -(?:^|/)package-lock\.json$ +(?:^|/)package(?:-lock|)\.json$ (?:^|/)sources(?:|\.dep)$ -SUMS$ +(?:^|/)vendor/ +\.a$ \.ai$ +\.avi$ \.bmp$ +\.bz2$ \.cer$ \.class$ \.crl$ \.crt$ \.csr$ \.dll$ +\.docx?$ +\.drawio$ \.DS_Store$ \.eot$ \.eps$ \.exe$ \.gif$ +\.gitattributes$ \.graffle$ \.gz$ \.icns$ \.ico$ \.jar$ +\.jks$ \.jpeg$ \.jpg$ \.key$ @@ -30,28 +41,52 @@ SUMS$ \.lock$ \.map$ \.min\.. +\.mod$ \.mp3$ \.mp4$ +\.o$ +\.ocf$ \.otf$ \.pbxproj$ \.pdf$ \.pem$ +\.png$ \.psd$ +\.pyc$ \.runsettings$ +\.s$ \.sig$ \.so$ \.svg$ \.svgz$ +\.svgz?$ \.tar$ \.tgz$ +\.tiff?$ \.ttf$ \.vsdx$ +\.wav$ +\.webm$ +\.webp$ \.woff +\.woff2?$ \.xcf$ \.xls +\.xlsx?$ \.xpm$ \.yml$ \.zip$ +^\.github/actions/spelling/ +^\.github/fabricbot.json$ +^\.gitignore$ +^\Q.git-blame-ignore-revs\E$ +^\Q.github/workflows/spelling.yml\E$ +^\Qdoc/reference/windows-terminal-logo.ans\E$ +^\Qsamples/ConPTY/EchoCon/EchoCon/EchoCon.vcxproj.filters\E$ +^\Qsrc/host/exe/Host.EXE.vcxproj.filters\E$ +^\Qsrc/host/ft_host/chafa.txt\E$ +^\Qsrc/tools/closetest/CloseTest.vcxproj.filters\E$ +^\XamlStyler.json$ ^build/config/ ^consolegit2gitfilters\.json$ ^dep/ @@ -78,6 +113,5 @@ SUMS$ ^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$ ^src/types/ut_types/UtilsTests.cpp$ ^tools/ReleaseEngineering/ServicingPipeline.ps1$ -^\.github/actions/spelling/ -^\.gitignore$ -^\XamlStyler.json$ +ignore$ +SUMS$ diff --git a/.github/actions/spelling/expect/alphabet.txt b/.github/actions/spelling/expect/alphabet.txt index 47663b0d075..23933713a40 100644 --- a/.github/actions/spelling/expect/alphabet.txt +++ b/.github/actions/spelling/expect/alphabet.txt @@ -5,26 +5,19 @@ AAAAAABBBBBBCCC AAAAABBBBBBCCC abcd abcd -abcde -abcdef -ABCDEFG -ABCDEFGH ABCDEFGHIJ abcdefghijk ABCDEFGHIJKLMNO abcdefghijklmnop ABCDEFGHIJKLMNOPQRST -abcdefghijklmnopqrstuvwxyz ABCG ABE abf BBBBB BBBBBBBB -BBBBBBBBBBBBBBDDDD BBBBBCCC BBBBCCCCC BBGGRR -CCE EFG EFGh QQQQQQQQQQABCDEFGHIJ @@ -33,7 +26,6 @@ QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ qrstuvwxyz qwerty -QWERTYUIOP qwertyuiopasdfg YYYYYYYDDDDDDDDDDD ZAAZZ diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 804d81e0c8d..8f8f4828d0a 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -1,20 +1,19 @@ +aabbcc ABANDONFONT +abbcc +ABCDEFGHIJKLMNOPQRSTUVWXY abgr abi +ABORTIFHUNG ACCESSTOKEN -acec -acf acidev ACIOSS ACover actctx ACTCTXW activatable -ACTIVEBORDER -ACTIVECAPTION ADDALIAS ADDREF -addressof ADDSTRING ADDTOOL AEnd @@ -26,51 +25,39 @@ ahz AImpl AInplace ALIGNRIGHT -alloc allocing +allocs alpc ALTERNATENAME ALTF ALTNUMPAD ALWAYSTIP amd -ansicode ansicpg ANSISYS ANSISYSRC ANSISYSSC -antialias antialiasing ANull anycpu -AOn APARTMENTTHREADED APCs -api APIENTRY -apimswincoresynchl apiset APPBARDATA -appconsult appcontainer -APPICON appium -applet appletname +applets applicationmodel APPLMODAL appmodel -apps APPWINDOW APrep apsect APSTUDIO archeologists -architected argb -argc -args -argv ARRAYSIZE ARROWKEYS asan @@ -80,22 +67,15 @@ ASDF asdfghjkl ASetting ASingle -asm -asmv asmx -aspx -astextplain -AStomps ASYNCWINDOWPOS atch ATest -attr ATTRCOLOR aumid Authenticode AUTOBUDDY AUTOCHECKBOX -autogenerated autohide AUTOHSCROLL automagically @@ -104,37 +84,30 @@ AUTORADIOBUTTON autoscrolling Autowrap AVerify -AVI AVX awch -azuredevopspodcast azzle -backend backgrounded Backgrounder backgrounding -backport +backported backstory barbaz Batang -baz Bazz BBDM bbwe bcount -bcrypt bcx bcz BEFOREPARENT beginthread -bgcolor bgfx bgidx Bgk BGR -BGRA +bgra BHID -biblioscape bigobj binplace binplaced @@ -143,15 +116,12 @@ bitcrazed bitflag bitmask BITOPERATION -bitsavers -bitset +bitsets BKCOLOR BKGND Bksp -blog Blt BLUESCROLL -bmp BODGY BOLDFONT BOOLIFY @@ -167,44 +137,34 @@ bpp BPPF branchconfig brandings -BRK Browsable -bsearch Bspace bstr BTNFACE -buf bufferout buffersize buflen -bugfix buildtransitive BUILDURI burriter BValue -byref -bytearray bytebuffer cac cacafire -callee capslock CARETBLINKINGENABLED CARRIAGERETURN cascadia -cassert castsi catid cazamor CBash -cbegin cbiex CBN CBoolean cbt cbuffer CCCBB -ccf cch CCHAR cci @@ -215,17 +175,11 @@ CComp CConsole CConversion CCRT -cctype -CDATA cdd -cdecl CDeclaration CEdit CELLSIZE -cend -cerr cfae -Cfg cfie cfiex cfte @@ -233,49 +187,33 @@ CFuzz cgscrn chafa changelist +chaof charinfo -charlespetzold -charset CHARSETINFO -chcp -checkbox -checkboxes -Checkin chh -Childitem chk -chrono CHT Cic -cjk -ckuehl -cla +CLA Clcompile CLE cleartype CLICKACTIVE clickdown -climits clipbrd CLIPCHILDREN CLIPSIBLINGS -cliutils -clocale closetest cloudconsole cls CLSCTX -clsid +clsids CLUSTERMAP -cmath cmatrix cmder CMDEXT -Cmdlet -cmdline cmh CMOUSEBUTTONS -cmp cmpeq cmt cmw @@ -283,18 +221,16 @@ cmyk CNL cnt CNTRL -codebase Codeflow codepage codepath -codepoint -codeproject +codepoints coinit COLLECTIONURI colorizing -colororacle -colorref -colorscheme +COLORMATRIX +COLORREFs +colorschemes colorspaces colorspec colortable @@ -303,34 +239,27 @@ colortest colortool COLR combaseapi -combobox comctl COMDAT commandline commctrl commdlg COMMITID -compat componentization conapi conareainfo conattrs conbufferout -concat concfg conclnt conddkrefs -condev condrv conechokey conemu -config configurability conhost -conhostv conime conimeinfo -conint conintegrity conintegrityuwp coninteractivitybase @@ -356,108 +285,76 @@ consolehost CONSOLEIME consoleinternal Consoleroot -Consolescreen CONSOLESETFOREGROUND consoletaeftemplates -CONSOLEV +consoleuwp Consolewait CONSOLEWINDOWOWNER consrv -constexpr constexprable constness contentfiles conterm -CONTEXTMENU contsf contypes convarea conwinuserrefs -coord coordnew COPYCOLOR CORESYSTEM cotaskmem countof -cout CPG cpinfo CPINFOEX CPLINFO cplusplus -cpp -CPPARM CPPCORECHECK cppcorecheckrules -cppm cpprest cpprestsdk cppwinrt -CPPx CProc cpx -crbegin CREATESCREENBUFFER CREATESTRUCT CREATESTRUCTW -creativecommons cred -cref -crend -Crisman +crisman CRLFs crloew Crt CRTLIBS csbi csbiex -csharp CSHORT -CSIDL Cspace -csproj -Csr csrmsg CSRSS csrutil -css -cstdarg -cstddef -cstdio -cstdlib -cstr -cstring cstyle -csv CSwitch CTerminal CText -ctime ctl ctlseqs -Ctlv -ctor CTRLEVENT +CTRLFREQUENCY CTRLKEYSHORTCUTS -Ctx +CTRLVOLUME Ctxt -ctype CUF cupxy -curated CURRENTFONT currentmode CURRENTPAGE CURSORCOLOR CURSORSIZE CURSORTYPE +CUsers CUU Cwa cwch -cwchar -cwctype -cwd -cxcy CXFRAME CXFULLSCREEN CXHSCROLL @@ -467,14 +364,11 @@ CXSIZE CXSMICON CXVIRTUALSCREEN CXVSCROLL -cxx CYFRAME CYFULLSCREEN -cygwin CYHSCROLL CYMIN CYPADDEDBORDER -CYRL CYSIZE CYSIZEFRAME CYSMICON @@ -482,8 +376,6 @@ CYVIRTUALSCREEN CYVSCROLL dai DATABLOCK -DATAVIEW -DATAW DBatch dbcs DBCSCHAR @@ -496,12 +388,10 @@ DBGOUTPUT dbh dblclk DBlob -dbproj -DBUILD DColor DCOLORVALUE dcommon -DCompile +dcompile dcompiler DComposition dde @@ -510,41 +400,44 @@ DDevice DEADCHAR dealloc Debian -debolden debugtype DECAC DECALN DECANM +DECARM DECAUPSS DECAWM +DECBKM +DECCARA DECCKM DECCOLM DECCRA +DECCTR DECDHL decdld -DECDLD DECDWL DECEKBD +DECERA +DECFRA DECID DECKPAM DECKPM DECKPNM DECLRMM -decls -declspec -decltype -declval DECNKM DECNRCM DECOM -deconstructed DECPCTERM +DECPS +DECRARA DECRC DECREQTPARM DECRLM DECRQM DECRQSS -DECRST +DECRQTSR +decrst +DECSACE DECSASD DECSC DECSCA @@ -553,19 +446,17 @@ DECSCPP DECSCUSR DECSED DECSEL +DECSERA DECSET DECSLPP DECSLRM DECSMKR DECSR -decstandar DECSTBM DECSTR DECSWL DECTCEM -Dedupe -deduplicate -deduplicated +DECXCPR DEFAPP DEFAULTBACKGROUND DEFAULTFOREGROUND @@ -580,41 +471,23 @@ DEFFACE defing DEFPUSHBUTTON defterm -deiconify DELAYLOAD -deletable DELETEONRELEASE -delims Delt demoable depersist deprioritized -deps -deque -deref -deserialization -deserialize -deserialized -deserializer -deserializing +deserializers desktopwindowxamlsource -dest DESTINATIONNAME -devblogs devicecode -devicefamily -devops Dext DFactory DFF -DFMT dhandler dialogbox -diffing -DINLINE directio DIRECTX -Dirs DISABLEDELAYEDEXPANSION DISABLENOSCROLL DISPLAYATTRIBUTE @@ -623,28 +496,21 @@ DISPLAYCHANGE distro dlg DLGC -dll -dllexport DLLGETVERSIONPROC -dllimport dllinit dllmain DLLVERSIONINFO DLOAD DLOOK dmp -DOCTYPE -docx DONTCARE doskey dotnet -doubleclick -downlevel DPG -dpi DPIAPI DPICHANGE DPICHANGED +DPIs dpix dpiy dpnx @@ -652,150 +518,114 @@ DRAWFRAME DRAWITEM DRAWITEMSTRUCT drcs -dropdown -DROPDOWNLIST DROPFILES drv +DSBCAPS +DSBLOCK +DSBPLAY +DSBUFFERDESC +DSBVOLUME dsm -dst +dsound +DSSCL DSwap DTest -dtor DTTERM DUMMYUNIONNAME -DUNICODE -DUNIT dup'ed dvi dwl DWLP dwm dwmapi -DWMWA -dword +DWORDs dwrite -dwriteglyphrundescriptionclustermap dxgi dxgidwm +dxguid dxinterop -dxp dxsm dxttbmp Dyreen -eaf EASTEUROPE ECH echokey ecount ECpp +ect Edgium EDITKEYS EDITTEXT EDITUPDATE edputil -edu Efast EHsc EINS EJO ELEMENTNOTAVAILABLE elems -elif -elseif emacs EMPTYBOX enabledelayedexpansion -endian -endif -endl -endlocal endptr endregion -ENQ -enqueuing -entrypoint +ENTIREBUFFER +entrypoints ENU -enum ENUMLOGFONT ENUMLOGFONTEX enumranges -envvar -eol +eplace EPres EQU ERASEBKGND -errno -errorlevel -ETB etcoreapp ETW -ETX EUDC EVENTID eventing everytime evflags evt -ewdelete -exe execd -executables executionengine exemain EXETYPE +exeuwp exewin exitwin expectedinput -expr EXPUNGECOMMANDHISTORY EXSTYLE EXTENDEDEDITKEY EXTKEY EXTTEXTOUT -fabricbot facename FACENODE FACESIZE -failfast FAILIFTHERE -fallthrough -FARPROC fastlink -fcb fcharset -fclose -fcntl -fdc -FDD -fdopen fdw fesb FFDE FFrom fgbg FGCOLOR -fgetc -fgetwc FGHIJ fgidx FGs FILEDESCRIPTION -fileno -filepath FILESUBTYPE FILESYSPATH -filesystem -FILETYPE fileurl FILEW FILLATTR FILLCONSOLEOUTPUT FILTERONPASTE -finalizer FINDCASE FINDDLG FINDDOWN -FINDSTR FINDSTRINGEXACT FINDUP FIter @@ -803,11 +633,9 @@ FIXEDCONVERTED FIXEDFILEINFO Flg flyout -fmix fmodern fmtarg fmtid -FNV FOLDERID FONTCHANGE fontdlg @@ -816,8 +644,7 @@ FONTENUMPROC FONTFACE FONTFAMILY FONTHEIGHT -FONTINFO -fontlist +fontinfo FONTOK FONTSIZE FONTSTRING @@ -827,28 +654,20 @@ FONTWEIGHT FONTWIDTH FONTWINDOW fooo -forceinline FORCEOFFFEEDBACK FORCEONFEEDBACK -FORCEV -foreach -fprintf framebuffer FRAMECHANGED fre -freopen -frontend +frontends fsanitize Fscreen FSCTL FSINFOCLASS -fsproj -fstream fte Ftm -fullscreen +Fullscreens fullwidth -func FUNCTIONCALL fuzzer fuzzmain @@ -860,10 +679,10 @@ fwlink GAUSSIAN gci gcx -gcy gdi gdip gdirenderer +Geddy geopol GETALIAS GETALIASES @@ -873,7 +692,6 @@ GETALIASEXESLENGTH GETAUTOHIDEBAREX GETCARETWIDTH getch -getchar GETCLIENTAREAANIMATION GETCOMMANDHISTORY GETCOMMANDHISTORYLENGTH @@ -898,7 +716,6 @@ GETKEYBOARDLAYOUTNAME GETKEYSTATE GETLARGESTWINDOWSIZE GETLBTEXT -getline GETMINMAXINFO GETMOUSEINFO GETMOUSEVANISH @@ -908,8 +725,6 @@ GETOBJECT GETPOS GETSELECTIONINFO getset -GETSTATE -GETTEXT GETTEXTLEN GETTITLE GETWAITTOKILLSERVICETIMEOUT @@ -917,7 +732,6 @@ GETWAITTOKILLTIMEOUT GETWHEELSCROLLCHARACTERS GETWHEELSCROLLCHARS GETWHEELSCROLLLINES -getwriter GFEh Gfun gfx @@ -926,23 +740,17 @@ GHIJK GHIJKL GHIJKLM gitfilters -github -gitlab +gitmodules gle -globals +GLOBALFOCUS GLYPHENTRY -gmail GMEM GNUC Goldmine gonce -Google goutput -GPUs -grayscale GREENSCROLL Grehan -grep Greyscale gridline groupbox @@ -950,22 +758,16 @@ gset gsl GTP GTR -guardxfg guc -gui guidatom -guiddef GValue GWL GWLP gwsz HABCDEF Hackathon -halfwidth HALTCOND HANGEUL -hardcoded -hardcodes hashalg HASSTRINGS hbitmap @@ -980,7 +782,6 @@ hdr HDROP hdrstop HEIGHTSCROLL -hfile hfont hfontresource hglobal @@ -988,11 +789,9 @@ hhh hhook hhx HIBYTE -HICON +hicon HIDEWINDOW -HIGHLIGHTTEXT hinst -HINSTANCE Hirots HISTORYBUFS HISTORYNODUP @@ -1005,40 +804,31 @@ hkl HKLM hlocal hlsl -HMENU hmod hmodule hmon -HMONITOR -horiz HORZ hostable hostlib HPA -HPAINTBUFFER HPCON hpj -hpp HPR -HPROPSHEETPAGE HProvider HREDRAW hresult -HRSRC +hrottled hscroll hsl hstr hstring -hsv HTBOTTOMLEFT HTBOTTOMRIGHT HTCAPTION HTCLIENT HTLEFT -htm HTMAXBUTTON HTMINBUTTON -html HTMLTo HTRIGHT HTTOP @@ -1049,37 +839,17 @@ HVP hwheel hwnd HWNDPARENT -hxx -IAccessibility -IAction -IApi -IApplication -IBase -ICache -icacls iccex -icch -IChar -ico -IComponent +icket ICONERROR Iconified -Iconify ICONINFORMATION IConsole ICONSTOP -IControl ICONWARNING -ICore -IData IDCANCEL IDD -IDesktop -IDevice -IDictionary IDISHWND -IDispatch -IDisposable idl idllib IDOK @@ -1087,37 +857,18 @@ IDR idth idx IDXGI -IDynamic IEnd IEnum -IEnumerable -ies -ietf IFACEMETHODIMP -ifdef ification -ifndef -IFont -ifstream IGNOREEND IGNORELANGUAGE -IHigh IHosted iid -IInitialize -IInput -IInspectable -IInteract -IInteractivity IIo -IList -imagemagick -Imatch ime Imm -IMouse IMPEXP -impl inbox inclusivity INCONTEXT @@ -1125,105 +876,59 @@ INFOEX inheritcursor inheritdoc inheritfrom -ini INITCOMMONCONTROLSEX INITDIALOG initguid INITMENU inkscape -inl INLINEPREFIX inlines -INotify -inout -inplace inproc Inputkeyinfo INPUTPROCESSORPROFILE inputrc Inputreadhandledata INSERTMODE -intellisense INTERACTIVITYBASE INTERCEPTCOPYPASTE INTERNALNAME -interop -interoperability inthread -intptr -intrin intsafe INVALIDARG INVALIDATERECT -inwap -IObservable ioctl -iomanip -iostream -iot -ipa ipch -ipconfig -IPersist ipp IProperty IPSINK ipsp -IRaw -IRead -IReference -IRender -IScheme -ISelection IShell -issuecomment -IState -IStoryboard -isupper ISwap -iswdigit -iswspace -ISystem iterm itermcolors ITerminal -IText itf Ith itoa IUI -IUia IUnknown ivalid -IValue -IVector -IWait -iwch -IWeb -IWin -IWindow -IXaml +IWIC IXMP IXP -ixx jconcpp JOBOBJECT JOBOBJECTINFOCLASS jpe -jpeg -jpg JPN -json -jsonc jsoncpp +Jsons jsprovider jumplist KAttrs kawa -kayla Kazu kazum -kbd kcub kcud kcuf @@ -1231,13 +936,11 @@ kcuu kernelbase kernelbasestaging KEYBDINPUT -keybinding keychord keydown keyevent KEYFIRST KEYLAST -keymap Keymapping keyscan keystate @@ -1257,22 +960,19 @@ langid LANGUAGELIST lasterror lastexitcode -LATN LAYOUTRTL +lbl LBN -LBound LBUTTON LBUTTONDBLCLK LBUTTONDOWN LBUTTONUP lcb +lci LCONTROL LCTRL lcx LEFTALIGN -LEFTSHIFT -len -lhs libpopcnt libsancov libtickit @@ -1282,17 +982,11 @@ LINESELECTION LINEWRAP LINKERRCAP LINKERROR -linkid -linkpath linputfile -Linq -linux -listbox listproperties listptr listptrsize lld -LLVM llx LMENU LMNOP @@ -1304,39 +998,28 @@ LOADONCALL loadu LOBYTE localappdata -localhost locsrc -locstudio Loewen LOGFONT LOGFONTA LOGFONTW logissue -lowercased loword lparam -lparen -LPBYTE LPCCH lpch -LPCHARSETINFO -LPCOLORREF LPCPLINFO LPCREATESTRUCT lpcs -LPCSTR LPCTSTR -LPCWSTR lpdata LPDBLIST lpdis LPDRAWITEMSTRUCT lpdw -LPDWORD lpelfe lpfn LPFNADDPROPSHEETPAGE -LPINT lpl LPMEASUREITEMSTRUCT LPMINMAXINFO @@ -1346,44 +1029,38 @@ LPNEWCPLINFOA LPNEWCPLINFOW LPNMHDR lpntme -LPPOINT LPPROC LPPROPSHEETPAGE LPPSHNOTIFY lprc -LPRECT lpstr lpsz LPTSTR LPTTFONTLIST lpv -LPVOID LPW LPWCH +lpwfx LPWINDOWPOS lpwpos lpwstr LRESULT -lru lsb lsconfig -lsproj lss lstatus lstrcmp lstrcmpi LTEXT LTLTLTLTL -ltrim -ltype LUID +luma lval LVB LVERTICAL LWA LWIN lwkmvj -mailto majorly makeappx MAKEINTRESOURCE @@ -1392,14 +1069,11 @@ MAKELANGID MAKELONG MAKELPARAM MAKELRESULT -malloc -manpage MAPBITMAP MAPVIRTUALKEY MAPVK MAXDIMENSTRING maxing -MAXLENGTH MAXSHORT maxval maxversiontested @@ -1415,35 +1089,25 @@ MDs MEASUREITEM megamix memallocator -memcmp -memcpy -memmove -memset MENUCHAR MENUCONTROL MENUDROPALIGNMENT -MENUITEM MENUITEMINFO MENUSELECT -Mersenne messageext -metadata metaproj midl mii MIIM milli -mimetype mincore mindbogglingly -mingw minimizeall minkernel MINMAXINFO minwin minwindef Mip -mkdir MMBB mmcc MMCPL @@ -1452,70 +1116,48 @@ MNC MNOPQ MNOPQR MODALFRAME -modelproj MODERNCORE MONITORINFO MONITORINFOEXW MONITORINFOF -monospaced -monostate MOUSEACTIVATE MOUSEFIRST MOUSEHWHEEL MOUSEMOVE -mousewheel movemask MOVESTART msb -msbuild -mscorlib msctf msctls msdata -MSDL -msdn msft MSGCMDLINEF MSGF MSGFILTER MSGFLG MSGMARKMODE -MSGS MSGSCROLLMODE MSGSELECTMODE msiexec MSIL msix -mspartners msrc -msvcrt MSVCRTD msys -msysgit MTSM -mui -Mul -multiline munged munges murmurhash -mutex -mutexes muxes myapplet mydir -myignite MYMAX Mypair Myval NAMELENGTH nameof -namespace -namespaced namestream -nano natvis -nbsp NCCALCSIZE NCCREATE NCLBUTTONDOWN @@ -1527,16 +1169,12 @@ NCRBUTTONDOWN NCRBUTTONUP NCXBUTTONDOWN NCXBUTTONUP -NDEBUG -ned NEL -NEQ netcoreapp netstandard NEWCPLINFO NEWCPLINFOA NEWCPLINFOW -newcursor Newdelete NEWINQUIRE NEWINQURE @@ -1546,23 +1184,16 @@ NEWTEXTMETRICEX Newtonsoft NEXTLINE nfe -nlength -Nls NLSMODE nnn NOACTIVATE NOAPPLYNOW NOCLIP -NOCOLOR NOCOMM NOCONTEXTHELP NOCOPYBITS -nodefaultlib -nodiscard NODUP -noexcept -NOHELP -noinline +noexcepts NOINTEGRALHEIGHT NOINTERFACE NOLINKINFO @@ -1578,13 +1209,13 @@ NONINFRINGEMENT NONPREROTATED nonspace NOOWNERZORDER +Nop NOPAINT NOPQRST noprofile NOREDRAW NOREMOVE NOREPOSITION -noreturn NORMALDISPLAY NOSCRATCH NOSEARCH @@ -1593,24 +1224,17 @@ NOSENDCHANGING NOSIZE NOSNAPSHOT NOTHOUSANDS -nothrow NOTICKS +NOTIMEOUTIFNOTHUNG NOTIMPL -notin -notmatch -NOTNULL NOTOPMOST NOTRACK NOTSUPPORTED nouicompat nounihan NOUPDATE -novtable -NOWAIT NOYIELD NOZORDER -NPM -npos nrcs NSTATUS ntapi @@ -1622,6 +1246,7 @@ ntdll ntifs ntlpcapi ntm +nto ntrtl ntstatus ntsubauth @@ -1632,31 +1257,25 @@ ntuser NTVDM ntverp NTWIN -nuget nugetversions nullability nullness nullonfailure -nullopt -nullptr +nullopts NULs numlock numpad NUMSCROLL nupkg -nuspec NVIDIA -NVR OACR -oauth objbase -ocf ocolor odl -oem oemcp OEMFONT OEMFORMAT +OEMs offboarded OLEAUT OLECHAR @@ -1679,9 +1298,7 @@ openconsoleproxy OPENIF OPENLINK openps -opensource openvt -openxmlformats ORIGINALFILENAME osc OSCBG @@ -1692,20 +1309,15 @@ OSCSCB OSCSCC OSCWT OSDEPENDSROOT -osfhandle OSG OSGENG osign oss -ostream -ostringstream +otepad ouicompat OUnter outdir -outfile -Outof OUTOFCONTEXT -OUTOFMEMORY Outptr outstr OVERLAPPEDWINDOW @@ -1721,15 +1333,12 @@ PAINTPARAMS PAINTSTRUCT PALPC pankaj -params parentable parms passthrough PATCOPY pathcch PATTERNID -PBOOL -PBYTE pcat pcb pcch @@ -1738,7 +1347,6 @@ PCCONSOLE PCD pcg pch -PCHAR PCIDLIST PCIS PCLIENT @@ -1760,18 +1368,13 @@ PCWCH PCWCHAR PCWSTR pda -pdb -pdbonly +Pdbs pdbstr -pdf -pdp pdtobj pdw -PDWORD pdx peb PEMAGIC -PENDTASKMSG pfa PFACENODE pfed @@ -1785,17 +1388,13 @@ PFS pgd pgdn PGONu -pgorepro -pgort -PGU pguid pgup -PHANDLE phhook phwnd -pid pidl PIDLIST +pids pii pinvoke pipename @@ -1804,17 +1403,12 @@ pixelheight PIXELSLIST PJOBOBJECT pkey -placeholders platforming playsound -plist -PLOC -PLOCA -PLOCM +ploc +ploca +plocm PLOGICAL -plugin -PMv -png pnm PNMLINK pntm @@ -1822,27 +1416,21 @@ PNTSTATUS POBJECT Podcast POINTSLIST -Poli POLYTEXTW -popd -POPF poppack -popup POPUPATTR +popups PORFLG positionals -posix POSTCHARBREAKS POSX POSXSCROLL POSYSCROLL -ppci PPEB ppf ppguid ppidl pplx -PPORT PPROC PPROCESS ppropvar @@ -1853,18 +1441,12 @@ ppsz ppv ppwch PQRST -pragma prc prealigned -prebuilt -precomp prect prefast -prefilled prefs preinstalled -PRELOAD -PREMULTIPLIED prepopulated presorted PREVENTPINNING @@ -1873,14 +1455,11 @@ PREVIEWWINDOW PREVLINE prg pri -printf prioritization processenv processhost PROCESSINFOCLASS procs -Progman -proj PROPERTYID PROPERTYKEY PROPERTYVAL @@ -1894,7 +1473,6 @@ propvar propvariant propvarutil psa -psd PSECURITY pseudocode pseudoconsole @@ -1902,13 +1480,10 @@ pseudoterminal psh pshn PSHNOTIFY -PSHORT pshpack PSINGLE psl psldl -psm -PSMALL PSNRET PSobject psp @@ -1917,47 +1492,36 @@ psr PSTR psz ptch -ptr -ptrdiff +ptrs ptsz PTYIn PUCHAR -PULONG PUNICODE -pushd -putchar -putwchar -PVOID pwch -PWCHAR PWDDMCONSOLECONTEXT -PWORD pws -pwsh pwstr pwsz pythonw +Qaabbcc qos QRSTU -qsort -queryable QUERYOPEN QUESTIONMARK quickedit QUZ QWER +Qxxxxxxxxxxxxxxx qzmp RAII RALT rasterbar rasterfont rasterization -rawinput RAWPATH raytracers razzlerc rbar -rbegin RBUTTON RBUTTONDBLCLK RBUTTONDOWN @@ -1973,37 +1537,23 @@ RCOCW RCONTROL RCOW rcv -rdbuf -RDONLY -rdpartysource readback READCONSOLE READCONSOLEOUTPUT READCONSOLEOUTPUTSTRING -Readline -readme READMODE -readonly -READWRITE -realloc +reallocs reamapping rects redef redefinable Redir -redirector redist -redistributable REDSCROLL -refactor -refactoring REFCLSID -refcount -referencesource REFGUID REFIID REFPROPERTYKEY -regex REGISTEROS REGISTERVDM regkey @@ -2024,20 +1574,15 @@ rescap Resequence RESETCONTENT resheader -resizable resmimetype -restrictedcapabilities resw resx -retval rfa -rfc rfid rftp -rgb -rgba RGBCOLOR rgbi +rgbs rgci rgfae rgfte @@ -2050,51 +1595,43 @@ rgs rgui rgw rgwch -rhs RIGHTALIGN RIGHTBUTTON riid Rike RIPMSG RIS -RMENU -rng roadmap robomac -roundtrip -rparen +rosetta +roundtrips RRF RRRGGGBB rsas rtcore RTEXT -rtf RTFTo -Rtl RTLREADING Rtn -rtrim RTTI ruleset runas -runasradio RUNDLL runformat runft RUNFULLSCREEN +runfuzz runsettings -runtests +runtest runtimeclass runuia runut runxamlformat -rvalue RVERTICAL rvpa RWIN rxvt safearray -SAFECAST safemath sapi sba @@ -2107,18 +1644,15 @@ scancode scanline schemename SCL -scm SCRBUF SCRBUFSIZE screenbuffer SCREENBUFFERINFO screeninfo -screenshot +screenshots scriptload -Scrollable scrollback -scrollbar -Scroller +scrollbars SCROLLFORWARD SCROLLINFO scrolllock @@ -2128,18 +1662,14 @@ SCROLLSCREENBUFFER scursor sddl sdeleted -sdk SDKDDK -searchbox securityappcontainer segfault SELCHANGE SELECTALL -selectany SELECTEDFONT SELECTSTRING Selfhosters -SERIALIZERS SERVERDLL SETACTIVE SETBUDDYINT @@ -2150,7 +1680,6 @@ SETCURSOR SETCURSORINFO SETCURSORPOSITION SETDISPLAYMODE -setfill SETFOCUS SETFONT SETFOREGROUND @@ -2161,28 +1690,24 @@ setintegritylevel SETITEMDATA SETITEMHEIGHT SETKEYSHORTCUTS -setlocal -setlocale SETMENUCLOSE -setmode SETNUMBEROFCOMMANDS SETOS SETPALETTE -SETPOS SETRANGE SETSCREENBUFFERSIZE SETSEL SETTEXTATTRIBUTE SETTINGCHANGE -SETTITLE -setw Setwindow SETWINDOWINFO +SFGAO +SFGAOF sfi SFINAE +SFolder SFUI sgr -SHANDLE SHCo shcore shellapi @@ -2190,7 +1715,6 @@ shellex shellscalingapi SHFILEINFO SHGFI -SHGFP SHIFTJIS Shl shlguid @@ -2205,7 +1729,6 @@ SHOWNA SHOWNOACTIVATE SHOWNORMAL SHOWWINDOW -SHRT sidebyside SIF SIGDN @@ -2214,7 +1737,6 @@ SINGLETHREADED siup sixel SIZEBOX -sizeof SIZESCROLL SKIPFONT SKIPOWNPROCESS @@ -2235,29 +1757,19 @@ Solutiondir somefile SOURCEBRANCH sourced -SOURCESDIRECTORY spammy spand -sprintf -sqlproj -srand -src SRCCODEPAGE SRCCOPY SRCINVERT srcsrv SRCSRVTRG srctool -sre srect srv srvinit srvpipe ssa -ssh -sstream -stackoverflow -standalone STARTF STARTUPINFO STARTUPINFOEX @@ -2270,58 +1782,36 @@ Statusline stdafx STDAPI stdc -stdcall stdcpp -stderr -stdexcept -stdin -stdio STDMETHODCALLTYPE STDMETHODIMP -stdout -stgm +STGM stl -stoi -stol -stoul stoutapot Stri -strikethrough -stringstream +Stringable STRINGTABLE -strlen strrev strsafe -strtok -structs STUBHEAD STUVWX -STX stylecop SUA subcompartment -subfolder +subfolders subkey SUBLANG -sublicensable -submenu subresource -subspan -substr subsystemconsole subsystemwindows suiteless -svg swapchain swapchainpanel swappable SWMR SWP -swprintf SYMED -symlink SYNCPAINT -sys syscalls SYSCHAR SYSCOMMAND @@ -2341,8 +1831,6 @@ TARG targetentrypoint TARGETLIBS TARGETNAME -targetnametoken -targetsize targetver taskbar tbar @@ -2357,23 +1845,20 @@ TCI tcome tcommandline tcommands +Tdd TDelegated TDP TEAMPROJECT tearoff Teb -techcommunity -technet tellp -telnet -telnetd -templated teraflop terminalcore +terminalinput +terminalrenderdata TERMINALSCROLLING terminfo TEs -testapp testbuildplatform testcon testd @@ -2382,7 +1867,6 @@ testenv testlab testlist testmd -testmddefinition testmode testname testnameprefix @@ -2397,7 +1881,6 @@ texel TExpected textattribute TEXTATTRIBUTEID -textbox textboxes textbuffer TEXTINCLUDE @@ -2405,59 +1888,48 @@ textinfo TEXTMETRIC TEXTMETRICW textmode +texttests TFCAT tfoo TFunction tga -threadpool THUMBPOSITION THUMBTRACK TIcon -tif tilunittests -Timeline -timelines titlebar TITLEISLINKNAME TJson TLambda +TLDP TLEN Tlgdata TMAE TMPF TMult tmultiple -tmux -todo +TODOs tofrom tokenhelpers -tokenized -tokenizing -toolbar toolbars TOOLINFO -Toolset -tooltip TOOLWINDOW TOPDOWNDIB TOPLEFT -toplevel TOPRIGHT TOpt tosign touchpad -towlower -towupper Tpp Tpqrst tprivapi tracelog tracelogging traceloggingprovider +traceviewpp trackbar TRACKCOMPOSITION trackpad -transcoder transitioning Trd TREX @@ -2466,43 +1938,32 @@ triaging TRIANGLESTRIP Tribool TRIMZEROHEADINGS -truetype trx tsattrs tsf +tsgr TStr TSTRFORMAT TSub TTBITMAP -ttf TTFONT TTFONTLIST tthe tthis TTM TTo -TVPP +tvpp Txtev typechecked -typechecking -typedef -typeid -typeinfo typelib -typename -typeof typeparam TYUI UAC uap uapadmin UAX -ubuntu ucd -ucdxml uch -UCHAR -ucs udk UDM uer @@ -2511,42 +1972,30 @@ uia UIACCESS uiacore uiautomationcore -Uid uielem UIELEMENTENABLEDONLY -uint -uintptr +UINTs ulcch -ulong -umd +umul +umulh Unadvise unattend -uncomment UNCPRIORITY -undef -Unescape unexpand -Unfocus unhighlighting unhosted -unicode -UNICODESTRING UNICODETEXT UNICRT -uninit uninitialize -uninstall -unintense +Unintense Uniscribe -unittest unittesting -universaltest +unittests unk unknwn unmark UNORM unparseable -unpause unregistering untests untextured @@ -2555,11 +2004,6 @@ UPDATEDISPLAY UPDOWN UPKEY UPSS -upvote -uri -url -urlencoded -USASCII usebackq USECALLBACK USECOLOR @@ -2573,44 +2017,29 @@ USEPOSITION userbase USERDATA userdpiapi -username Userp userprivapi -userprofile USERSRV USESHOWWINDOW USESIZE USESTDHANDLES -ushort usp USRDLL -utf -utils utr -uuid -uuidof -uuidv UVWX UVWXY -UWA -UWAs +uwa uwp uxtheme -vals Vanara vararg -vbproj vclib -Vcount vcpkg vcprintf -vcproj vcxitems -vcxproj vec vectorized VERCTRL -versioning VERTBAR VFT vga @@ -2619,30 +2048,26 @@ viewkind viewports Virt VIRTTERM -Virtualizing vkey VKKEYSCAN VMs VPA -VPATH VPR VProc VRaw VREDRAW vsc +vsconfig vscprintf VSCROLL vsdevshell vsinfo -vsnprintf vso vspath -vsprintf VSTAMP vstest VSTS VSTT -vstudio vswhere vtapi vtapp @@ -2661,61 +2086,43 @@ vttest VWX waaay waitable -waivable WANSUNG WANTARROWS WANTTAB wapproj -wav +WAVEFORMATEX wbuilder wch -wchar +wchars WCIA WCIW -WClass -wcout -wcschr -wcscmp -wcscpy WCSHELPER wcsicmp -wcslen wcsnicmp -wcsrchr wcsrev -wcstod -wcstoul wddm wddmcon -wddmconrenderer WDDMCONSOLECONTEXT wdm -wdx -webclient webpage -website -websocket +websites +websockets wekyb -WEOF wex wextest wextestclass -wfdopen WFill wfopen -wfstream WHelper -whitelisting +wic WIDTHSCROLL Widthx -wiki -wikia -wikipedia wil WImpl WINAPI winbase winbasep +wincodec wincon winconp winconpty @@ -2725,15 +2132,12 @@ wincontypes WINCORE windbg WINDEF -windev -WINDIR windll WINDOWALPHA Windowbuffer windowdpiapi WINDOWEDGE windowext -WINDOWFRAME windowime WINDOWINFO windowio @@ -2745,16 +2149,14 @@ WINDOWPOSCHANGING windowproc windowrect windowsapp -windowsdeveloper windowsinternalstring WINDOWSIZE -windowsx +windowsshell windowsterminal -WINDOWTEXT +windowsx windowtheme WINDOWTITLE winevent -winfx wingdi winget WINIDE @@ -2768,16 +2170,12 @@ Winperf WInplace winres winrt -winsdk wintelnet winternl winuser winuserp WINVER wistd -wixproj -wline -wlinestream wmain wmemory WMSZ @@ -2792,9 +2190,6 @@ WNull wnwb workarea workaround -workflow -workitem -wostream WOutside WOWARM WOWx @@ -2804,11 +2199,9 @@ wpf WPR WPrep WPresent -wprintf wprp wprpi wregex -WResult writeback writechar WRITECONSOLE @@ -2822,12 +2215,8 @@ WRunoff WScript wsl WSLENV -wsmatch -WSpace -wss wstr -wstring -wstringstream +wstrings wsz wtd WTest @@ -2842,13 +2231,14 @@ wtypes Wubi WUX WVerify -wwaproj WWith wxh +wyhash +wymix +wyr xact -xaml Xamlmeta -xargs +xamls xaz xbf xbutton @@ -2864,50 +2254,43 @@ xdy XEncoding xes xff -xfg XFile XFORM +xin +xinchaof +xinxinchaof XManifest XMath XMFLOAT -xml -xmlns -xor xorg -XPosition XResource -xsd xsi -xsize xstyler XSubstantial xtended -xterm XTest XTPOPSGR XTPUSHSGR xtr +XTWINOPS xunit xutr -xvalue XVIRTUALSCREEN XWalk -XTWINOPS -Xzn +xwwyzz +xxyyzz yact -YAML YCast YCENTER YCount YDPI -yml YOffset -YPosition -YSize YSubstantial YVIRTUALSCREEN YWalk +Zabcdefghijklmnopqrstuvwxyz ZCmd ZCtrl -zsh zxcvbnm +ZYXWVU +ZYXWVUTd diff --git a/.github/actions/spelling/expect/web.txt b/.github/actions/spelling/expect/web.txt index 60ae118cb48..52c1cfd1f0f 100644 --- a/.github/actions/spelling/expect/web.txt +++ b/.github/actions/spelling/expect/web.txt @@ -1,29 +1,6 @@ -http -www -easyrgb -php -ecma -rapidtables WCAG -freedesktop -ycombinator -robertelder -kovidgoyal -leonerd -fixterms winui appshellintegration mdtauk -cppreference gfycat Guake -azurewebsites -askubuntu -dostips -viewtopic -rosettacode -Rexx -tldp -HOWTO -uwspace -uwaterloo diff --git a/.github/actions/spelling/line_forbidden.patterns b/.github/actions/spelling/line_forbidden.patterns new file mode 100644 index 00000000000..31ad2ddcd26 --- /dev/null +++ b/.github/actions/spelling/line_forbidden.patterns @@ -0,0 +1,62 @@ +# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere +# \bm_data\b + +# If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test, +# you might not want to check in code where you were debugging w/ `fit()`, in which case, you might want +# to use this: +#\bfit\( + +# s.b. GitHub +\bGithub\b + +# s.b. GitLab +\bGitlab\b + +# s.b. JavaScript +\bJavascript\b + +# s.b. Microsoft +\bMicroSoft\b + +# s.b. another +\ban[- ]other\b + +# s.b. greater than +\bgreater then\b + +# s.b. into +#\sin to\s + +# s.b. opt-in +\sopt in\s + +# s.b. less than +\bless then\b + +# s.b. otherwise +\bother[- ]wise\b + +# s.b. nonexistent +\bnon existing\b +\b[Nn]o[nt][- ]existent\b + +# s.b. preexisting +[Pp]re[- ]existing + +# s.b. preempt +[Pp]re[- ]empt\b + +# s.b. preemptively +[Pp]re[- ]emptively + +# s.b. reentrancy +[Rr]e[- ]entrancy + +# s.b. reentrant +[Rr]e[- ]entrant + +# s.b. workaround(s) +#\bwork[- ]arounds?\b + +# Reject duplicate words +\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s diff --git a/.github/actions/spelling/patterns/patterns.txt b/.github/actions/spelling/patterns/patterns.txt index 2fc6e0b708c..a0e1931f36f 100644 --- a/.github/actions/spelling/patterns/patterns.txt +++ b/.github/actions/spelling/patterns/patterns.txt @@ -1,11 +1,6 @@ -https://(?:(?:[-a-zA-Z0-9?&=]*\.|)microsoft\.com)/[-a-zA-Z0-9?&=_#\/.]* -https://aka\.ms/[-a-zA-Z0-9?&=\/_]* -https://www\.itscj\.ipsj\.or\.jp/iso-ir/[-0-9]+\.pdf -https://www\.vt100\.net/docs/[-a-zA-Z0-9#_\/.]* -https://www.w3.org/[-a-zA-Z0-9?&=\/_#]* -https://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]* -https://(?:[a-z-]+\.|)github(?:usercontent|)\.com/[-a-zA-Z0-9?%&=_\/.+]* -https://www.xfree86.org/[-a-zA-Z0-9?&=\/_#]* +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns + +https?://\S+ [Pp]ublicKeyToken="?[0-9a-fA-F]{16}"? (?:[{"]|UniqueIdentifier>)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?:[}"]|v# +(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) + +# hit-count: 20 file-count: 9 +# hex runs +\b[0-9a-fA-F]{16,}\b + +# hit-count: 10 file-count: 7 +# uuid: +\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b + +# hit-count: 4 file-count: 4 +# mailto urls +mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,} + +# hit-count: 4 file-count: 1 +# ANSI color codes +(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m + +# hit-count: 2 file-count: 1 +# latex +\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+) + +# hit-count: 1 file-count: 1 +# hex digits including css/html color classes: +(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b + +# hit-count: 1 file-count: 1 +# Non-English +[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]* + +# hit-count: 1 file-count: 1 +# French +# This corpus only had capital letters, but you probably want lowercase ones as well. +\b[LN]'+[a-z]{2,}\b + +# acceptable duplicates +# ls directory listings +[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+ +# C/idl types + English ... +\s(Guid|long|LONG|that) \g{-1}\s + +# javadoc / .net +(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s + +# Commit message -- Signed-off-by and friends +^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$ + +# Autogenerated revert commit message +^This reverts commit [0-9a-f]{40}\.$ + +# vtmode +--vtmode\s+(\w+)\s+\g{-1}\s + +# ignore long runs of a single character: +\b([A-Za-z])\g{-1}{3,}\b diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt index e2763f35a82..301719de47e 100644 --- a/.github/actions/spelling/reject.txt +++ b/.github/actions/spelling/reject.txt @@ -1,22 +1,12 @@ ^attache$ ^attacher$ ^attachers$ -^spae$ -^spaebook$ -^spaecraft$ -^spaed$ -^spaedom$ -^spaeing$ -^spaeings$ -^spae-man$ -^spaeman$ -^spaer$ -^Spaerobee$ -^spaes$ -^spaewife$ -^spaewoman$ -^spaework$ -^spaewright$ -^wether$ -^wethers$ -^wetherteg$ +benefitting +occurences? +^dependan.* +^oer$ +Sorce +^[Ss]pae.* +^untill$ +^untilling$ +^wether.* diff --git a/.github/workflows/spelling2.yml b/.github/workflows/spelling2.yml index a44931267ee..446b24343ed 100644 --- a/.github/workflows/spelling2.yml +++ b/.github/workflows/spelling2.yml @@ -1,20 +1,134 @@ # spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p name: Spell checking + +# Comment management is handled through a secondary job, for details see: +# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions +# +# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment +# (in odd cases, it might actually run just to collapse a commment, but that's fairly rare) +# it needs `contents: write` in order to add a comment. +# +# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment +# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment) +# it needs `pull-requests: write` in order to manipulate those comments. + +# Updating pull request branches is managed via comment handling. +# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list +# +# These elements work together to make it happen: +# +# `on.issue_comment` +# This event listens to comments by users asking to update the metadata. +# +# `jobs.update` +# This job runs in response to an issue_comment and will push a new commit +# to update the spelling metadata. +# +# `with.experimental_apply_changes_via_bot` +# Tells the action to support and generate messages that enable it +# to make a commit to update the spelling metadata. +# +# `with.ssh_key` +# In order to trigger workflows when the commit is made, you can provide a +# secret (typically, a write-enabled github deploy key). +# +# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key + on: - pull_request_target: push: + branches: + - "**" + tags-ignore: + - "**" + pull_request_target: + branches: + - "**" + tags-ignore: + - "**" + types: + - 'opened' + - 'reopened' + - 'synchronize' + issue_comment: + types: + - 'created' jobs: spelling: name: Spell checking + permissions: + contents: read + pull-requests: read + actions: read + outputs: + followup: ${{ steps.spelling.outputs.followup }} + runs-on: ubuntu-latest + if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'" + concurrency: + group: spelling-${{ github.event.pull_request.number || github.ref }} + # note: If you use only_check_changed_files, you do not want cancel-in-progress + cancel-in-progress: true + steps: + - name: check-spelling + id: spelling + uses: check-spelling/check-spelling@v0.0.21 + with: + suppress_push_for_open_pull_request: 1 + checkout: true + check_file_names: 1 + spell_check_this: check-spelling/spell-check-this@prerelease + post_comment: 0 + use_magic_file: 1 + extra_dictionary_limit: 10 + extra_dictionaries: + cspell:software-terms/src/software-terms.txt + cspell:python/src/python/python-lib.txt + cspell:node/node.txt + cspell:cpp/src/stdlib-c.txt + cspell:cpp/src/stdlib-cpp.txt + cspell:fullstack/fullstack.txt + cspell:filetypes/filetypes.txt + cspell:html/html.txt + cspell:cpp/src/compiler-msvc.txt + cspell:python/src/common/extra.txt + cspell:powershell/powershell.txt + cspell:aws/aws.txt + cspell:cpp/src/lang-keywords.txt + cspell:npm/npm.txt + cspell:dotnet/dotnet.txt + cspell:python/src/python/python.txt + cspell:css/css.txt + cspell:cpp/src/stdlib-cmath.txt + check_extra_dictionaries: '' + + comment-push: + name: Report (Push) + # If your workflow isn't running on push, you can remove this job + runs-on: ubuntu-latest + needs: spelling + permissions: + contents: write + if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' + steps: + - name: comment + uses: check-spelling/check-spelling@v0.0.21 + with: + checkout: true + spell_check_this: check-spelling/spell-check-this@prerelease + task: ${{ needs.spelling.outputs.followup }} + + comment-pr: + name: Report (PR) + # If you workflow isn't running on pull_request*, you can remove this job runs-on: ubuntu-latest + needs: spelling + permissions: + pull-requests: write + if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') steps: - - name: checkout-merge - if: "contains(github.event_name, 'pull_request')" - uses: actions/checkout@v2 + - name: comment + uses: check-spelling/check-spelling@v0.0.21 with: - ref: refs/pull/${{github.event.pull_request.number}}/merge - - name: checkout - if: "!contains(github.event_name, 'pull_request')" - uses: actions/checkout@v2 - - uses: check-spelling/check-spelling@v0.0.19 + checkout: true + spell_check_this: check-spelling/spell-check-this@prerelease + task: ${{ needs.spelling.outputs.followup }} From c97ac66d5df89e046bd46c7838269867c9dbb3c1 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 9 Feb 2023 06:31:44 -0600 Subject: [PATCH 06/49] resart with fresh plumbing --- src/cascadia/TerminalApp/TerminalPage.cpp | 52 +++++++++++++++++++ src/cascadia/TerminalApp/TerminalPage.h | 2 + src/cascadia/TerminalControl/ControlCore.cpp | 12 +++++ src/cascadia/TerminalControl/ControlCore.h | 5 ++ src/cascadia/TerminalControl/ControlCore.idl | 2 + src/cascadia/TerminalControl/EventArgs.cpp | 1 + src/cascadia/TerminalControl/EventArgs.h | 14 +++++ src/cascadia/TerminalControl/EventArgs.idl | 6 +++ src/cascadia/TerminalControl/TermControl.cpp | 25 +++++++++ src/cascadia/TerminalControl/TermControl.h | 3 ++ src/cascadia/TerminalControl/TermControl.idl | 4 ++ src/cascadia/TerminalCore/Terminal.cpp | 5 ++ src/cascadia/TerminalCore/Terminal.hpp | 5 ++ src/cascadia/TerminalCore/TerminalApi.cpp | 7 +++ .../TerminalSettingsModel/ActionArgs.h | 1 + .../TerminalSettingsModel/ActionArgs.idl | 2 + .../TerminalSettingsModel/Command.cpp | 36 +++++++++++++ src/cascadia/TerminalSettingsModel/Command.h | 2 + .../TerminalSettingsModel/Command.idl | 3 ++ src/host/outputStream.cpp | 4 ++ src/host/outputStream.hpp | 2 + src/terminal/adapter/ITermDispatch.hpp | 2 + src/terminal/adapter/ITerminalApi.hpp | 2 + src/terminal/adapter/adaptDispatch.cpp | 44 ++++++++++++++++ src/terminal/adapter/adaptDispatch.hpp | 2 + .../parser/OutputStateMachineEngine.cpp | 5 ++ .../parser/OutputStateMachineEngine.hpp | 1 + 27 files changed, 249 insertions(+) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index cf4f0140a27..ad018490f88 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -1653,6 +1653,8 @@ namespace winrt::TerminalApp::implementation }); term.ShowWindowChanged({ get_weak(), &TerminalPage::_ShowWindowChangedHandler }); + + term.MenuChanged({ get_weak(), &TerminalPage::_ControlMenuChangedHandler }); } // Method Description: @@ -4445,4 +4447,54 @@ namespace winrt::TerminalApp::implementation _activated = activated; _updateThemeColors(); } + + winrt::fire_and_forget TerminalPage::_ControlMenuChangedHandler(const IInspectable /*sender*/, + const winrt::Microsoft::Terminal::Control::MenuChangedEventArgs /*args*/) + { + co_await wil::resume_foreground(Dispatcher(), CoreDispatcherPriority::Normal); + co_return; + // TODO! reimplement this part. + + // // co_await winrt::resume_background(); + + // // May be able to fake this by not creating whole Commands for these + // // actions, instead just binding them at the cmdpal layer (like tab item + // // vs action item) + // // auto entries = control.MenuEntries(); + + // // parse json + // auto commandsCollection = Command::ParsePowerShellMenuComplete(args.MenuJson(), args.ReplacementLength()); + + // co_await wil::resume_foreground(Dispatcher(), CoreDispatcherPriority::Normal); + // auto control{ _GetActiveControl() }; + // if (!control) + // { + // co_return; + // } + + // if (commandsCollection.Size() == 0) + // { + // AutoCompletePopup().IsOpen(false); + // AutoCompleteMenu().Visibility(Visibility::Collapsed); + // co_return; + // } + // // CommandPalette has an internal margin of 8, so set to -4,-4 to position closer to the actual line + // AutoCompleteMenu().PositionManually(Windows::Foundation::Point{ -4, -4 }, Windows::Foundation::Size{ 300, 300 }); + + // // CommandPalette().EnableCommandPaletteMode(CommandPaletteLaunchMode::Action); + + // const til::point cursorPos{ control.CursorPositionInDips() }; + // const auto characterSize{ control.CharacterDimensions() }; + + // // Position relative to the actual term control + // AutoCompletePopup().HorizontalOffset(cursorPos.x); + // AutoCompletePopup().VerticalOffset(cursorPos.y + characterSize.Height); + + // AutoCompletePopup().IsOpen(true); + // // ~Make visible first, then set commands. Other way around and the list + // // doesn't actually update the first time (weird)~ + // AutoCompleteMenu().SetCommands(commandsCollection); + // AutoCompleteMenu().Visibility(commandsCollection.Size() > 0 ? Visibility::Visible : Visibility::Collapsed); + } + } diff --git a/src/cascadia/TerminalApp/TerminalPage.h b/src/cascadia/TerminalApp/TerminalPage.h index 9c1705706a0..900c41683eb 100644 --- a/src/cascadia/TerminalApp/TerminalPage.h +++ b/src/cascadia/TerminalApp/TerminalPage.h @@ -460,6 +460,8 @@ namespace winrt::TerminalApp::implementation void _updateThemeColors(); void _updateTabCloseButton(const winrt::Microsoft::UI::Xaml::Controls::TabViewItem& tabViewItem); + winrt::fire_and_forget _ControlMenuChangedHandler(const winrt::Windows::Foundation::IInspectable sender, const winrt::Microsoft::Terminal::Control::MenuChangedEventArgs args); + winrt::fire_and_forget _ShowWindowChangedHandler(const IInspectable sender, const winrt::Microsoft::Terminal::Control::ShowWindowArgs args); #pragma region ActionHandlers diff --git a/src/cascadia/TerminalControl/ControlCore.cpp b/src/cascadia/TerminalControl/ControlCore.cpp index 5bf00b07982..41b4d98e495 100644 --- a/src/cascadia/TerminalControl/ControlCore.cpp +++ b/src/cascadia/TerminalControl/ControlCore.cpp @@ -125,6 +125,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation auto pfnPlayMidiNote = std::bind(&ControlCore::_terminalPlayMidiNote, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); _terminal->SetPlayMidiNoteCallback(pfnPlayMidiNote); + auto pfnMenuChanged = std::bind(&ControlCore::_terminalMenuChanged, this, std::placeholders::_1, std::placeholders::_2); + _terminal->MenuChangedCallback(pfnMenuChanged); + // MSFT 33353327: Initialize the renderer in the ctor instead of Initialize(). // We need the renderer to be ready to accept new engines before the SwapChainPanel is ready to go. // If we wait, a screen reader may try to get the AutomationPeer (aka the UIA Engine), and we won't be able to attach @@ -2093,6 +2096,15 @@ namespace winrt::Microsoft::Terminal::Control::implementation } } + void ControlCore::_terminalMenuChanged(std::wstring_view menuJson, int32_t replaceLength) + { + // _updateMenu->Run(winrt::hstring{ menuJson }, replaceLength); + // _MenuChangedHandlers(*this, nullptr); + + auto args = winrt::make_self(winrt::hstring{ menuJson }, replaceLength); + _MenuChangedHandlers(*this, *args); + } + void ControlCore::ColorSelection(const Control::SelectionColor& fg, const Control::SelectionColor& bg, Core::MatchMode matchMode) { if (HasSelection()) diff --git a/src/cascadia/TerminalControl/ControlCore.h b/src/cascadia/TerminalControl/ControlCore.h index 890e9ec3d51..daab96a3ccb 100644 --- a/src/cascadia/TerminalControl/ControlCore.h +++ b/src/cascadia/TerminalControl/ControlCore.h @@ -232,6 +232,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation TYPED_EVENT(ShowWindowChanged, IInspectable, Control::ShowWindowArgs); TYPED_EVENT(UpdateSelectionMarkers, IInspectable, Control::UpdateSelectionMarkersEventArgs); TYPED_EVENT(OpenHyperlink, IInspectable, Control::OpenHyperlinkEventArgs); + TYPED_EVENT(MenuChanged, IInspectable, Control::MenuChangedEventArgs); + TYPED_EVENT(CloseTerminalRequested, IInspectable, IInspectable); // clang-format on @@ -305,6 +307,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation void _terminalPlayMidiNote(const int noteNumber, const int velocity, const std::chrono::microseconds duration); + + void _terminalMenuChanged(std::wstring_view menuJson, int32_t replaceLength); + #pragma endregion MidiAudio _midiAudio; diff --git a/src/cascadia/TerminalControl/ControlCore.idl b/src/cascadia/TerminalControl/ControlCore.idl index a8df501469b..7bbc3cfcc3f 100644 --- a/src/cascadia/TerminalControl/ControlCore.idl +++ b/src/cascadia/TerminalControl/ControlCore.idl @@ -162,5 +162,7 @@ namespace Microsoft.Terminal.Control event Windows.Foundation.TypedEventHandler UpdateSelectionMarkers; event Windows.Foundation.TypedEventHandler OpenHyperlink; event Windows.Foundation.TypedEventHandler CloseTerminalRequested; + event Windows.Foundation.TypedEventHandler MenuChanged; + }; } diff --git a/src/cascadia/TerminalControl/EventArgs.cpp b/src/cascadia/TerminalControl/EventArgs.cpp index 9f9b41ac1f7..4c63eb6f16a 100644 --- a/src/cascadia/TerminalControl/EventArgs.cpp +++ b/src/cascadia/TerminalControl/EventArgs.cpp @@ -14,3 +14,4 @@ #include "FoundResultsArgs.g.cpp" #include "ShowWindowArgs.g.cpp" #include "UpdateSelectionMarkersEventArgs.g.cpp" +#include "MenuChangedEventArgs.g.cpp" diff --git a/src/cascadia/TerminalControl/EventArgs.h b/src/cascadia/TerminalControl/EventArgs.h index a542e391f63..a409c32b375 100644 --- a/src/cascadia/TerminalControl/EventArgs.h +++ b/src/cascadia/TerminalControl/EventArgs.h @@ -14,6 +14,7 @@ #include "FoundResultsArgs.g.h" #include "ShowWindowArgs.g.h" #include "UpdateSelectionMarkersEventArgs.g.h" +#include "MenuChangedEventArgs.g.h" namespace winrt::Microsoft::Terminal::Control::implementation { @@ -169,4 +170,17 @@ namespace winrt::Microsoft::Terminal::Control::implementation WINRT_PROPERTY(bool, ClearMarkers, false); }; + + struct MenuChangedEventArgs : public MenuChangedEventArgsT + { + public: + MenuChangedEventArgs(const winrt::hstring menuJson, const int32_t replaceLength) : + _MenuJson(menuJson), + _ReplacementLength(replaceLength) + { + } + + WINRT_PROPERTY(winrt::hstring, MenuJson, L""); + WINRT_PROPERTY(int32_t, ReplacementLength, 0); + }; } diff --git a/src/cascadia/TerminalControl/EventArgs.idl b/src/cascadia/TerminalControl/EventArgs.idl index 941384c5b05..92e50529b31 100644 --- a/src/cascadia/TerminalControl/EventArgs.idl +++ b/src/cascadia/TerminalControl/EventArgs.idl @@ -83,4 +83,10 @@ namespace Microsoft.Terminal.Control { Boolean ClearMarkers { get; }; } + + runtimeclass MenuChangedEventArgs + { + String MenuJson { get; }; + Int32 ReplacementLength { get; }; + } } diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index 7cfe8cbdc4b..e6b290a6c1a 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -3174,4 +3174,29 @@ namespace winrt::Microsoft::Terminal::Control::implementation { _core.ColorSelection(fg, bg, matchMode); } + + Microsoft::Terminal::Core::Point TermControl::CursorPositionInDips() + { + // const auto cursorPosition{ _core.CursorPosition() }; + + const til::point cursorPos{ _core.CursorPosition() }; + + const til::size fontSize{ til::math::flooring, CharacterDimensions() }; + + // Convert text buffer cursor position to client coordinate position + // within the window. This point is in _pixels_ + const til::point clientCursorPos{ cursorPos * fontSize }; + + // Get scale factor for view + const double scaleFactor = DisplayInformation::GetForCurrentView().RawPixelsPerViewPixel(); + + const til::point clientCursorInDips{ til::math::flooring, clientCursorPos.x / scaleFactor, clientCursorPos.y / scaleFactor }; + + // + SwapChainPanel().Margin().Top + auto padding{ GetPadding() }; + til::point relativeToOrigin{ til::math::flooring, + clientCursorInDips.x + padding.Left, + clientCursorInDips.y + padding.Top }; + return relativeToOrigin.to_core_point(); + } } diff --git a/src/cascadia/TerminalControl/TermControl.h b/src/cascadia/TerminalControl/TermControl.h index 590780e7524..a28524d32ad 100644 --- a/src/cascadia/TerminalControl/TermControl.h +++ b/src/cascadia/TerminalControl/TermControl.h @@ -46,6 +46,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation Windows::Foundation::Size CharacterDimensions() const; Windows::Foundation::Size MinimumSize(); float SnapDimensionToGrid(const bool widthOrHeight, const float dimension); + Microsoft::Terminal::Core::Point CursorPositionInDips(); void WindowVisibilityChanged(const bool showOrHide); @@ -150,6 +151,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation PROJECTED_FORWARDED_TYPED_EVENT(ShowWindowChanged, IInspectable, Control::ShowWindowArgs, _core, ShowWindowChanged); PROJECTED_FORWARDED_TYPED_EVENT(CloseTerminalRequested, IInspectable, IInspectable, _core, CloseTerminalRequested); + PROJECTED_FORWARDED_TYPED_EVENT(MenuChanged , IInspectable, Control::MenuChangedEventArgs, _core, MenuChanged); + PROJECTED_FORWARDED_TYPED_EVENT(PasteFromClipboard, IInspectable, Control::PasteFromClipboardEventArgs, _interactivity, PasteFromClipboard); TYPED_EVENT(OpenHyperlink, IInspectable, Control::OpenHyperlinkEventArgs); diff --git a/src/cascadia/TerminalControl/TermControl.idl b/src/cascadia/TerminalControl/TermControl.idl index 044bfb0a6b1..8c9af88b78b 100644 --- a/src/cascadia/TerminalControl/TermControl.idl +++ b/src/cascadia/TerminalControl/TermControl.idl @@ -44,6 +44,7 @@ namespace Microsoft.Terminal.Control event Windows.Foundation.TypedEventHandler TabColorChanged; event Windows.Foundation.TypedEventHandler ReadOnlyChanged; event Windows.Foundation.TypedEventHandler FocusFollowMouseRequested; + event Windows.Foundation.TypedEventHandler MenuChanged; event Windows.Foundation.TypedEventHandler Initialized; // This is an event handler forwarder for the underlying connection. @@ -100,5 +101,8 @@ namespace Microsoft.Terminal.Control Windows.UI.Xaml.Media.Brush BackgroundBrush { get; }; void ColorSelection(SelectionColor fg, SelectionColor bg, Microsoft.Terminal.Core.MatchMode matchMode); + + Microsoft.Terminal.Core.Point CursorPositionInDips { get; }; + } } diff --git a/src/cascadia/TerminalCore/Terminal.cpp b/src/cascadia/TerminalCore/Terminal.cpp index 7677910354d..d5057528cb8 100644 --- a/src/cascadia/TerminalCore/Terminal.cpp +++ b/src/cascadia/TerminalCore/Terminal.cpp @@ -1411,6 +1411,11 @@ const size_t Microsoft::Terminal::Core::Terminal::GetTaskbarProgress() const noe return _taskbarProgress; } +void Microsoft::Terminal::Core::Terminal::MenuChangedCallback(std::function pfn) noexcept +{ + _pfnMenuChanged.swap(pfn); +} + Scheme Terminal::GetColorScheme() const { Scheme s; diff --git a/src/cascadia/TerminalCore/Terminal.hpp b/src/cascadia/TerminalCore/Terminal.hpp index ec95bf8caf6..8e806713071 100644 --- a/src/cascadia/TerminalCore/Terminal.hpp +++ b/src/cascadia/TerminalCore/Terminal.hpp @@ -140,6 +140,9 @@ class Microsoft::Terminal::Core::Terminal final : bool IsConsolePty() const noexcept override; bool IsVtInputEnabled() const noexcept override; void NotifyAccessibilityChange(const til::rect& changedRect) noexcept override; + + void InvokeMenu(std::wstring_view menuJson, int32_t replaceLength) override; + #pragma endregion void ClearMark(); @@ -213,6 +216,7 @@ class Microsoft::Terminal::Core::Terminal final : void TaskbarProgressChangedCallback(std::function pfn) noexcept; void SetShowWindowCallback(std::function pfn) noexcept; void SetPlayMidiNoteCallback(std::function pfn) noexcept; + void MenuChangedCallback(std::function pfn) noexcept; void SetCursorOn(const bool isOn); bool IsCursorBlinkingAllowed() const noexcept; @@ -310,6 +314,7 @@ class Microsoft::Terminal::Core::Terminal final : std::function _pfnTaskbarProgressChanged; std::function _pfnShowWindowChanged; std::function _pfnPlayMidiNote; + std::function _pfnMenuChanged; RenderSettings _renderSettings; std::unique_ptr<::Microsoft::Console::VirtualTerminal::StateMachine> _stateMachine; diff --git a/src/cascadia/TerminalCore/TerminalApi.cpp b/src/cascadia/TerminalCore/TerminalApi.cpp index c4ec65d62e5..eb476a1933f 100644 --- a/src/cascadia/TerminalCore/TerminalApi.cpp +++ b/src/cascadia/TerminalCore/TerminalApi.cpp @@ -467,3 +467,10 @@ void Terminal::NotifyAccessibilityChange(const til::rect& /*changedRect*/) noexc { // This is only needed in conhost. Terminal handles accessibility in another way. } +void Terminal::InvokeMenu(std::wstring_view menuJson, int32_t replaceLength) +{ + if (_pfnMenuChanged) + { + _pfnMenuChanged(menuJson, replaceLength); + } +} diff --git a/src/cascadia/TerminalSettingsModel/ActionArgs.h b/src/cascadia/TerminalSettingsModel/ActionArgs.h index 62fd9f9a085..b84167fd535 100644 --- a/src/cascadia/TerminalSettingsModel/ActionArgs.h +++ b/src/cascadia/TerminalSettingsModel/ActionArgs.h @@ -750,6 +750,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::factory_implementation BASIC_FACTORY(RenameTabArgs); BASIC_FACTORY(SwapPaneArgs); BASIC_FACTORY(SplitPaneArgs); + BASIC_FACTORY(SendInputArgs); BASIC_FACTORY(SetFocusModeArgs); BASIC_FACTORY(SetFullScreenArgs); BASIC_FACTORY(SetMaximizedArgs); diff --git a/src/cascadia/TerminalSettingsModel/ActionArgs.idl b/src/cascadia/TerminalSettingsModel/ActionArgs.idl index d24322072b6..da0beed3e14 100644 --- a/src/cascadia/TerminalSettingsModel/ActionArgs.idl +++ b/src/cascadia/TerminalSettingsModel/ActionArgs.idl @@ -192,6 +192,8 @@ namespace Microsoft.Terminal.Settings.Model [default_interface] runtimeclass SendInputArgs : IActionArgs { + SendInputArgs(String input); + String Input { get; }; }; diff --git a/src/cascadia/TerminalSettingsModel/Command.cpp b/src/cascadia/TerminalSettingsModel/Command.cpp index 8387413ee77..f6a64ccdd3f 100644 --- a/src/cascadia/TerminalSettingsModel/Command.cpp +++ b/src/cascadia/TerminalSettingsModel/Command.cpp @@ -635,4 +635,40 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation return newCommands; } + + winrt::Windows::Foundation::Collections::IVector Command::ParsePowerShellMenuComplete(winrt::hstring json, int32_t replaceLength) + { + auto data = winrt::to_string(json); + + std::string errs; + static std::unique_ptr reader{ Json::CharReaderBuilder::CharReaderBuilder().newCharReader() }; + Json::Value root; + if (!reader->parse(data.data(), data.data() + data.size(), &root, &errs)) + { + throw winrt::hresult_error(WEB_E_INVALID_JSON_STRING, winrt::to_hstring(errs)); + } + + auto result = winrt::single_threaded_vector(); + + auto backspaces = std::wstring(::base::saturated_cast(replaceLength), L'\x7f'); + for (const auto& element : root) + { + winrt::hstring completionText; + winrt::hstring listText; + JsonUtils::GetValueForKey(element, "CompletionText", completionText); + JsonUtils::GetValueForKey(element, "ListItemText", listText); + + Model::SendInputArgs args{ winrt::hstring{ fmt::format(L"{}{}", backspaces, completionText.c_str()) } }; + Model::ActionAndArgs actionAndArgs{ ShortcutAction::SendInput, args }; + // Model::Command command{}; + auto c = winrt::make_self(); + c->_name = listText; + c->_ActionAndArgs = actionAndArgs; + // command.ActionAndArgs(actionAndArgs); + // command.Name(listText); + + result.Append(*c); + } + return result; + } } diff --git a/src/cascadia/TerminalSettingsModel/Command.h b/src/cascadia/TerminalSettingsModel/Command.h index 4f4dcbe2048..67dc08d147d 100644 --- a/src/cascadia/TerminalSettingsModel/Command.h +++ b/src/cascadia/TerminalSettingsModel/Command.h @@ -67,6 +67,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation hstring IconPath() const noexcept; void IconPath(const hstring& val); + static Windows::Foundation::Collections::IVector ParsePowerShellMenuComplete(winrt::hstring json, int32_t replaceLength); + winrt::Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker propertyChangedRevoker; WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler); diff --git a/src/cascadia/TerminalSettingsModel/Command.idl b/src/cascadia/TerminalSettingsModel/Command.idl index b749a79fb0a..bb90adfb3ea 100644 --- a/src/cascadia/TerminalSettingsModel/Command.idl +++ b/src/cascadia/TerminalSettingsModel/Command.idl @@ -47,5 +47,8 @@ namespace Microsoft.Terminal.Settings.Model Windows.Foundation.Collections.IVectorView profiles, Windows.Foundation.Collections.IVectorView schemes, Windows.Foundation.Collections.IVector warnings); + + static IVector ParsePowerShellMenuComplete(String json, Int32 replaceLength); + } } diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp index dbe8f16857e..f8f78d26848 100644 --- a/src/host/outputStream.cpp +++ b/src/host/outputStream.cpp @@ -493,3 +493,7 @@ void ConhostInternalGetSet::MarkCommandFinish(std::optional /*erro { // Not implemented for conhost. } +void ConhostInternalGetSet::InvokeMenu(std::wstring_view /*menuJson*/, int32_t /*replaceLength*/) +{ + // Not implemented for conhost. +} diff --git a/src/host/outputStream.hpp b/src/host/outputStream.hpp index f673e9110ba..1a56b3591ff 100644 --- a/src/host/outputStream.hpp +++ b/src/host/outputStream.hpp @@ -80,6 +80,8 @@ class ConhostInternalGetSet final : public Microsoft::Console::VirtualTerminal:: void MarkOutputStart() override; void MarkCommandFinish(std::optional error) override; + void InvokeMenu(std::wstring_view menuJson, int32_t replaceLength) override; + private: Microsoft::Console::IIoProvider& _io; bool _bracketedPasteMode{ false }; diff --git a/src/terminal/adapter/ITermDispatch.hpp b/src/terminal/adapter/ITermDispatch.hpp index 4898a3cd942..84df2be8261 100644 --- a/src/terminal/adapter/ITermDispatch.hpp +++ b/src/terminal/adapter/ITermDispatch.hpp @@ -131,6 +131,8 @@ class Microsoft::Console::VirtualTerminal::ITermDispatch virtual bool DoFinalTermAction(const std::wstring_view string) = 0; + virtual bool DoXtermJsAction(const std::wstring_view string) = 0; + virtual StringHandler DownloadDRCS(const VTInt fontNumber, const VTParameter startChar, const DispatchTypes::DrcsEraseControl eraseControl, diff --git a/src/terminal/adapter/ITerminalApi.hpp b/src/terminal/adapter/ITerminalApi.hpp index 4705f382817..456bd1188d9 100644 --- a/src/terminal/adapter/ITerminalApi.hpp +++ b/src/terminal/adapter/ITerminalApi.hpp @@ -82,5 +82,7 @@ namespace Microsoft::Console::VirtualTerminal virtual void MarkCommandStart() = 0; virtual void MarkOutputStart() = 0; virtual void MarkCommandFinish(std::optional error) = 0; + + virtual void InvokeMenu(std::wstring_view menuJson, int32_t replaceLength) = 0; }; } diff --git a/src/terminal/adapter/adaptDispatch.cpp b/src/terminal/adapter/adaptDispatch.cpp index 3990fbdccaa..c2179cc4542 100644 --- a/src/terminal/adapter/adaptDispatch.cpp +++ b/src/terminal/adapter/adaptDispatch.cpp @@ -3083,6 +3083,50 @@ bool AdaptDispatch::DoFinalTermAction(const std::wstring_view string) // modify the state of that mark as we go. return false; } +// Method Description: +// - Performs a XtermJs action +// - Ascribes to the ITermDispatch interface +// - Currently, the actions we support are: +// * TODO! +// - Not actually used in conhost +// Arguments: +// - string: contains the parameters that define which action we do +// Return Value: +// - false in conhost, true for the SetMark action, otherwise false. +bool AdaptDispatch::DoXtermJsAction(const std::wstring_view string) +{ + // This is not implemented in conhost. + if (_api.IsConsolePty()) + { + // Flush the frame manually, to make sure marks end up on the right line, like the alt buffer sequence. + _renderer.TriggerFlush(false); + return false; + } + + const auto parts = Utils::SplitString(string, L';'); + + if (parts.size() < 1) + { + return false; + } + + const auto action = til::at(parts, 0); + + if (action == L"Completions") + { + unsigned int replacementChars = 0; + bool succeeded = (parts.size() >= 3) && + (Utils::StringToUint(til::at(parts, 2), replacementChars)); + if (succeeded) + { + _api.InvokeMenu(parts.size() < 4 ? L"" : til::at(parts, 3), + static_cast(replacementChars)); + } + + return true; + } + return false; +} // Method Description: // - DECDLD - Downloads one or more characters of a dynamically redefinable diff --git a/src/terminal/adapter/adaptDispatch.hpp b/src/terminal/adapter/adaptDispatch.hpp index 1a283a1c987..ae92bcd0d84 100644 --- a/src/terminal/adapter/adaptDispatch.hpp +++ b/src/terminal/adapter/adaptDispatch.hpp @@ -132,6 +132,8 @@ namespace Microsoft::Console::VirtualTerminal bool DoFinalTermAction(const std::wstring_view string) override; + bool DoXtermJsAction(const std::wstring_view string) override; + StringHandler DownloadDRCS(const VTInt fontNumber, const VTParameter startChar, const DispatchTypes::DrcsEraseControl eraseControl, diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 55c4a0d080d..af7ac73e9f5 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -922,6 +922,11 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, success = _dispatch->DoFinalTermAction(string); break; } + case OscActionCodes::XtermJsAction: + { + success = _dispatch->DoXtermJsAction(string); + break; + } default: // If no functions to call, overall dispatch was a failure. success = false; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 83088e9a160..b8e5980bc0c 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -208,6 +208,7 @@ namespace Microsoft::Console::VirtualTerminal ResetBackgroundColor = 111, // Not implemented ResetCursorColor = 112, FinalTermAction = 133, + XtermJsAction = 633, ITerm2Action = 1337, }; From 7404dc3d35fa2fe8e73df27caa9fa910b4b86738 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 10 Feb 2023 06:02:03 -0600 Subject: [PATCH 07/49] zhu li, do the thing --- .../TerminalApp/SuggestionsControl.cpp | 1223 +++++++++++++++++ src/cascadia/TerminalApp/SuggestionsControl.h | 147 ++ .../TerminalApp/SuggestionsControl.idl | 44 + .../TerminalApp/SuggestionsControl.xaml | 412 ++++++ .../TerminalApp/TerminalAppLib.vcxproj | 13 + src/cascadia/TerminalApp/TerminalPage.cpp | 114 +- src/cascadia/TerminalApp/TerminalPage.h | 1 + src/cascadia/TerminalApp/TerminalPage.xaml | 19 + 8 files changed, 1927 insertions(+), 46 deletions(-) create mode 100644 src/cascadia/TerminalApp/SuggestionsControl.cpp create mode 100644 src/cascadia/TerminalApp/SuggestionsControl.h create mode 100644 src/cascadia/TerminalApp/SuggestionsControl.idl create mode 100644 src/cascadia/TerminalApp/SuggestionsControl.xaml diff --git a/src/cascadia/TerminalApp/SuggestionsControl.cpp b/src/cascadia/TerminalApp/SuggestionsControl.cpp new file mode 100644 index 00000000000..140a1ff250d --- /dev/null +++ b/src/cascadia/TerminalApp/SuggestionsControl.cpp @@ -0,0 +1,1223 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +#include "pch.h" +#include "ActionPaletteItem.h" +#include "TabPaletteItem.h" +#include "CommandLinePaletteItem.h" +#include "SuggestionsControl.h" +#include + +#include "SuggestionsControl.g.cpp" + +using namespace winrt; +using namespace winrt::TerminalApp; +using namespace winrt::Windows::UI::Core; +using namespace winrt::Windows::UI::Xaml; +using namespace winrt::Windows::UI::Xaml::Controls; +using namespace winrt::Windows::System; +using namespace winrt::Windows::Foundation; +using namespace winrt::Windows::Foundation::Collections; +using namespace winrt::Microsoft::Terminal::Settings::Model; + +namespace winrt::TerminalApp::implementation +{ + SuggestionsControl::SuggestionsControl() : + _switcherStartIdx{ 0 } + { + InitializeComponent(); + + _itemTemplateSelector = Resources().Lookup(winrt::box_value(L"PaletteItemTemplateSelector")).try_as(); + _listItemTemplate = Resources().Lookup(winrt::box_value(L"ListItemTemplate")).try_as(); + + _filteredActions = winrt::single_threaded_observable_vector(); + _nestedActionStack = winrt::single_threaded_vector(); + _currentNestedCommands = winrt::single_threaded_vector(); + _allCommands = winrt::single_threaded_vector(); + _tabActions = winrt::single_threaded_vector(); + _mruTabActions = winrt::single_threaded_vector(); + + _switchToMode(); + + // Whatever is hosting us will enable us by setting our visibility to + // "Visible". When that happens, set focus to our search box. + RegisterPropertyChangedCallback(UIElement::VisibilityProperty(), [this](auto&&, auto&&) { + if (Visibility() == Visibility::Visible) + { + // Force immediate binding update so we can select an item + Bindings->Update(); + + _filteredActionsView().SelectedIndex(0); + _searchBox().Focus(FocusState::Programmatic); + + TraceLoggingWrite( + g_hTerminalAppProvider, // handle to TerminalApp tracelogging provider + "SuggestionsControlOpened", + TraceLoggingDescription("Event emitted when the Command Palette is opened"), + TraceLoggingWideString(L"Action", "Mode", "which mode the palette was opened in"), + TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES), + TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage)); + } + else + { + // Raise an event to return control to the Terminal. + _dismissPalette(); + } + }); + + // Focusing the ListView when the Command Palette control is set to Visible + // for the first time fails because the ListView hasn't finished loading by + // the time Focus is called. Luckily, We can listen to SizeChanged to know + // when the ListView has been measured out and is ready, and we'll immediately + // revoke the handler because we only needed to handle it once on initialization. + _sizeChangedRevoker = _filteredActionsView().SizeChanged(winrt::auto_revoke, [this](auto /*s*/, auto /*e*/) { + /*if (_currentMode == SuggestionsControlMode::TabSwitchMode) + { + _filteredActionsView().Focus(FocusState::Keyboard); + }*/ + _sizeChangedRevoker.revoke(); + }); + + _filteredActionsView().SelectionChanged({ this, &SuggestionsControl::_selectedCommandChanged }); + + _appArgs.DisableHelpInExitMessage(); + } + + // Method Description: + // - Moves the focus up or down the list of commands. If we're at the top, + // we'll loop around to the bottom, and vice-versa. + // Arguments: + // - moveDown: if true, we're attempting to move to the next item in the + // list. Otherwise, we're attempting to move to the previous. + // Return Value: + // - + void SuggestionsControl::SelectNextItem(const bool moveDown) + { + auto selected = _filteredActionsView().SelectedIndex(); + const auto numItems = ::base::saturated_cast(_filteredActionsView().Items().Size()); + + // Do not try to select an item if + // - the list is empty + // - if no item is selected and "up" is pressed + if (numItems != 0 && (selected != -1 || moveDown)) + { + // Wraparound math. By adding numItems and then calculating modulo numItems, + // we clamp the values to the range [0, numItems) while still supporting moving + // upward from 0 to numItems - 1. + const auto newIndex = ((numItems + selected + (moveDown ? 1 : -1)) % numItems); + _filteredActionsView().SelectedIndex(newIndex); + _filteredActionsView().ScrollIntoView(_filteredActionsView().SelectedItem()); + } + } + + // Method Description: + // - Scroll the command palette to the specified index + // Arguments: + // - index within a list view of commands + // Return Value: + // - + void SuggestionsControl::_scrollToIndex(uint32_t index) + { + auto numItems = _filteredActionsView().Items().Size(); + + if (numItems == 0) + { + // if the list is empty no need to scroll + return; + } + + auto clampedIndex = std::clamp(index, 0, numItems - 1); + _filteredActionsView().SelectedIndex(clampedIndex); + _filteredActionsView().ScrollIntoView(_filteredActionsView().SelectedItem()); + } + + // Method Description: + // - Computes the number of visible commands + // Arguments: + // - + // Return Value: + // - the approximate number of items visible in the list (in other words the size of the page) + uint32_t SuggestionsControl::_getNumVisibleItems() + { + if (const auto container = _filteredActionsView().ContainerFromIndex(0)) + { + if (const auto item = container.try_as()) + { + const auto itemHeight = ::base::saturated_cast(item.ActualHeight()); + const auto listHeight = ::base::saturated_cast(_filteredActionsView().ActualHeight()); + return listHeight / itemHeight; + } + } + return 0; + } + + // Method Description: + // - Scrolls the focus one page up the list of commands. + // Arguments: + // - + // Return Value: + // - + void SuggestionsControl::ScrollPageUp() + { + auto selected = _filteredActionsView().SelectedIndex(); + auto numVisibleItems = _getNumVisibleItems(); + _scrollToIndex(selected - numVisibleItems); + } + + // Method Description: + // - Scrolls the focus one page down the list of commands. + // Arguments: + // - + // Return Value: + // - + void SuggestionsControl::ScrollPageDown() + { + auto selected = _filteredActionsView().SelectedIndex(); + auto numVisibleItems = _getNumVisibleItems(); + _scrollToIndex(selected + numVisibleItems); + } + + // Method Description: + // - Moves the focus to the top item in the list of commands. + // Arguments: + // - + // Return Value: + // - + void SuggestionsControl::ScrollToTop() + { + _scrollToIndex(0); + } + + // Method Description: + // - Moves the focus to the bottom item in the list of commands. + // Arguments: + // - + // Return Value: + // - + void SuggestionsControl::ScrollToBottom() + { + _scrollToIndex(_filteredActionsView().Items().Size() - 1); + } + + Windows::UI::Xaml::FrameworkElement SuggestionsControl::SelectedItem() + { + auto index = _filteredActionsView().SelectedIndex(); + const auto container = _filteredActionsView().ContainerFromIndex(index); + const auto item = container.try_as(); + return item; + } + + // Method Description: + // - Called when the command selection changes. We'll use this in the tab + // switcher to "preview" tabs as the user navigates the list of tabs. To + // do that, we'll dispatch the switch to tab command for this tab, but not + // dismiss the switcher. + // Arguments: + // - + // Return Value: + // - + void SuggestionsControl::_selectedCommandChanged(const IInspectable& /*sender*/, + const Windows::UI::Xaml::RoutedEventArgs& /*args*/) + { + // const auto currentlyVisible{ Visibility() == Visibility::Visible }; + + const auto selectedCommand = _filteredActionsView().SelectedItem(); + const auto filteredCommand{ selectedCommand.try_as() }; + + _PropertyChangedHandlers(*this, Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"SelectedItem" }); + + if (filteredCommand != nullptr) + { + if (const auto actionPaletteItem{ filteredCommand.Item().try_as() }) + { + _PreviewActionHandlers(*this, actionPaletteItem.Command()); + } + } + } + + void SuggestionsControl::_previewKeyDownHandler(const IInspectable& /*sender*/, + const Windows::UI::Xaml::Input::KeyRoutedEventArgs& e) + { + const auto key = e.OriginalKey(); + // const auto scanCode = e.KeyStatus().ScanCode; + const auto coreWindow = CoreWindow::GetForCurrentThread(); + const auto ctrlDown = WI_IsFlagSet(coreWindow.GetKeyState(winrt::Windows::System::VirtualKey::Control), CoreVirtualKeyStates::Down); + // const auto altDown = WI_IsFlagSet(coreWindow.GetKeyState(winrt::Windows::System::VirtualKey::Menu), CoreVirtualKeyStates::Down); + // const auto shiftDown = WI_IsFlagSet(coreWindow.GetKeyState(winrt::Windows::System::VirtualKey::Shift), CoreVirtualKeyStates::Down); + + if (key == VirtualKey::Home && ctrlDown) + { + ScrollToTop(); + e.Handled(true); + } + else if (key == VirtualKey::End && ctrlDown) + { + ScrollToBottom(); + e.Handled(true); + } + else if (key == VirtualKey::Up) + { + // Action Mode: Move focus to the next item in the list. + SelectNextItem(false); + e.Handled(true); + } + else if (key == VirtualKey::Down) + { + // Action Mode: Move focus to the previous item in the list. + SelectNextItem(true); + e.Handled(true); + } + else if (key == VirtualKey::PageUp) + { + // Action Mode: Move focus to the first visible item in the list. + ScrollPageUp(); + e.Handled(true); + } + else if (key == VirtualKey::PageDown) + { + // Action Mode: Move focus to the last visible item in the list. + ScrollPageDown(); + e.Handled(true); + } + else if (key == VirtualKey::Enter) + { + if (const auto& button = e.OriginalSource().try_as