Fix a bunch of spelling errors across the project (#4295)
Generated by https://github.com/jsoref/spelling `f`; to maintain your repo, please consider `fchurn` I generally try to ignore upstream bits. I've accidentally included some items from the `deps/` directory. I expect someone will give me a list of items to drop, I'm happy to drop whole files/directories, or to split the PR into multiple items (E.g. comments/locals/public). Closes #4294
This commit is contained in:
parent
0a62de8b39
commit
a13ccfd0f5
|
@ -162,7 +162,7 @@ PublishScripts/
|
|||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ Also, I'm happy to discuss this with you until you're utterly sick of reading it
|
|||
|
||||
If I had to take an educated guess as to what is making us faster than pretty much any other application on Windows at putting your text on the screen... I would say it is because that is literally our only job! Also probably because we are using darn near the oldest and lowest level APIs that Windows has to accomplish this work.
|
||||
|
||||
Pretty much everything else you've listed has some sort of layer or framework involved, or many, many layers and frameworks, when you start talking about Electron and Javascript. We don't.
|
||||
Pretty much everything else you've listed has some sort of layer or framework involved, or many, many layers and frameworks, when you start talking about Electron and JavaScript. We don't.
|
||||
|
||||
We have one bare, super un-special window with no additional controls attached to it. We get our keys fed into us from just barely above the kernel given that we're processing them from window messages and not from some sort of eventing framework common to pretty much any other more complicated UI framework than ours (WPF, WinForms, UWP, Electron). And we dump our text straight onto the window surface using GDI's [PolyTextOut](https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-polytextoutw) with no frills.
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
* `/src/cascadia/TerminalConnection` - This DLL is responsible for the various different ways a terminal instance can communicate with different terminal backends. Examples include the `ConptyConnection` (for communicating with Windows Console processes), or the `AzureCloudShellConnection` for communicating with Azure.
|
||||
* `/src/cascadia/TerminalSettings` - This is the DLL responsible for abstracting the settings for both the TerminalCore and the TerminalControl. This provides consumers of the TerminalControl a common interface for supplying settings to the Terminal.
|
||||
* `/src/cascadia/TerminalCore` - This LIB is responsible for the core implementation of a terminal instance. This defines one important class `Terminal` which is a complete terminal instance, with buffer, colors table, VT parsing, input handling, etc. It does _not_ prescribe any sort of UI implementation - it should be connected to code that can handle rendering its contents, and provide input to it.
|
||||
* `/src/cascadia/TerminalControl` - This DLL provides the UWP-XAML implementation of a `TermControl`, which can be embedded within an application to provide a terminal instance within the application. It contains a DX renderer for drawing text to the screen, and translates input to send to the core Terminal. It also recieves settings to apply to both itself and the core Terminal.
|
||||
* `/src/cascadia/TerminalControl` - This DLL provides the UWP-XAML implementation of a `TermControl`, which can be embedded within an application to provide a terminal instance within the application. It contains a DX renderer for drawing text to the screen, and translates input to send to the core Terminal. It also receives settings to apply to both itself and the core Terminal.
|
||||
* `/src/cascadia/TerminalApp` - This DLL represents the implementation of the Windows Terminal application. This includes parsing settings, hosting tabs & panes with Terminals in them, and displaying other UI elements. This DLL is almost entirely UWP-like code, and shouldn't be doing any Win32-like UI work.
|
||||
* `/src/cascadia/WindowsTerminal` - This EXE provides Win32 hosting for the TerminalApp. It will set up XAML islands, and is responsible for drawing the window, either as a standard window or with content in the titlebar (non-client area).
|
||||
* `/src/cascadia/CasadiaPackage` - This is a project for packaging the Windows Terminal and its dependencies into an .appx/.msix for deploying to the machine.
|
||||
* `/src/cascadia/CascadiaPackage` - This is a project for packaging the Windows Terminal and its dependencies into an .appx/.msix for deploying to the machine.
|
||||
* `/src/cascadia/PublicTerminalCore` - This is a DLL wrapper for the TerminalCore and Renderer, similar to `TermControl`, which exposes some exported functions that so the Terminal can be used from C#.
|
||||
* `/src/cascadia/WpfTerminalControl` - A DLL implementing a WPF version of the Terminal Control.
|
||||
* `/src/host` – The meat of the windows console host. This includes buffer, input, output, windowing, server management, clipboard, and most interactions with the console host window that aren’t stated anywhere else. We’re trying to pull things out that are reusable into other libraries, but it’s a work in progress
|
||||
|
|
|
@ -27,7 +27,7 @@ Properties listed below are specific to each unique profile.
|
|||
| Property | Necessity | Type | Default | Description |
|
||||
| -------- | --------- | ---- | ------- | ----------- |
|
||||
| `guid` | _Required_ | String | | Unique identifier of the profile. Written in registry format: `"{00000000-0000-0000-0000-000000000000}"`. |
|
||||
| `name` | _Required_ | String | | Name of the profile. Displays in the dropdown menu. <br>Additionally, this value will be used as the "title" to pass to the shell on startup. Some shells (like `bash`) may choose to ignore this initial value, while others (`cmd`, `powershell`) may use this value over the lifetime of the application. This "title" behavior can be overriden by using `tabTitle`. |
|
||||
| `name` | _Required_ | String | | Name of the profile. Displays in the dropdown menu. <br>Additionally, this value will be used as the "title" to pass to the shell on startup. Some shells (like `bash`) may choose to ignore this initial value, while others (`cmd`, `powershell`) may use this value over the lifetime of the application. This "title" behavior can be overridden by using `tabTitle`. |
|
||||
| `acrylicOpacity` | Optional | Number | `0.5` | When `useAcrylic` is set to `true`, it sets the transparency of the window for the profile. Accepts floating point values from 0-1. |
|
||||
| `background` | Optional | String | | Sets the background color of the profile. Overrides `background` set in color scheme if `colorscheme` is set. Uses hex color format: `"#rrggbb"`. |
|
||||
| `backgroundImage` | Optional | String | | Sets the file location of the Image to draw over the window background. |
|
||||
|
@ -44,7 +44,7 @@ Properties listed below are specific to each unique profile.
|
|||
| `fontFace` | Optional | String | `Consolas` | Name of the font face used in the profile. We will try to fallback to Consolas if this can't be found or is invalid. |
|
||||
| `fontSize` | Optional | Integer | `12` | Sets the font size. |
|
||||
| `foreground` | Optional | String | | Sets the foreground color of the profile. Overrides `foreground` set in color scheme if `colorscheme` is set. Uses hex color format: `#rgb` or `"#rrggbb"`. |
|
||||
| `hidden` | Optional | Boolean | `false` | If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamicially generated profiles, while leaving them in your settings file. |
|
||||
| `hidden` | Optional | Boolean | `false` | If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamically generated profiles, while leaving them in your settings file. |
|
||||
| `historySize` | Optional | Integer | `9001` | The number of lines above the ones displayed in the window you can scroll back to. |
|
||||
| `icon` | Optional | String | | Image file location of the icon used in the profile. Displays within the tab and the dropdown menu. |
|
||||
| `padding` | Optional | String | `8, 8, 8, 8` | Sets the padding around the text within the window. Can have three different formats: `"#"` sets the same padding for all sides, `"#, #"` sets the same padding for left-right and top-bottom, and `"#, #, #, #"` sets the padding individually for left, top, right, and bottom. |
|
||||
|
|
|
@ -68,7 +68,7 @@ original files. You could alternatively put all the source in one directory, and
|
|||
have separate `dll/` and `lib/` subdirectories from the source that are solely
|
||||
responsible for building their binary.
|
||||
|
||||
At this point, you might face some difficulty including the right wimnd
|
||||
At this point, you might face some difficulty including the right winmd
|
||||
references, especially from other C++/WinRT dependencies for this project that
|
||||
exist in your solution. I don't know why, but I had a fair amount of difficulty
|
||||
using a `ProjectReference` from a C++/WinRT StaticLibrary to another C++/WinRT
|
||||
|
|
|
@ -582,7 +582,7 @@
|
|||
},
|
||||
"hidden": {
|
||||
"default": false,
|
||||
"description": "If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamicially generated profiles, while leaving them in your settings file.",
|
||||
"description": "If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamically generated profiles, while leaving them in your settings file.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"historySize": {
|
||||
|
|
|
@ -80,11 +80,11 @@ More data reading and calculation will be included in Terminal Launch process, w
|
|||
|
||||
## Potential Issues
|
||||
|
||||
We need to consider multi-monitor scenario. If the user has multiple monitors, we must guarantee that the Terminal could be iniitalized as expected. We can keep an eye on the feedbacks of this feature from the community.
|
||||
We need to consider multi-monitor scenario. If the user has multiple monitors, we must guarantee that the Terminal could be initialized as expected. We can keep an eye on the feedbacks of this feature from the community.
|
||||
|
||||
## Future considerations
|
||||
|
||||
For now, this feature only allows the user to set initial positon and choose whether to maximize the window when launch. In the future, we may consider follow-up features like:
|
||||
For now, this feature only allows the user to set initial position and choose whether to maximize the window when launch. In the future, we may consider follow-up features like:
|
||||
|
||||
1. Save the position of the Terminal on exit, and restore the position on the next launch. This could be a true/false feature that users could choose to set.
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ N/A
|
|||
For example, by default, <kbd>Alt+<N></kbd> to focuses the
|
||||
Nth tab. Currently, those are 8 separate entries in the keybindings. Should we
|
||||
enable some way for them be combined into a single binding entry, where the
|
||||
binding automatically recieves the number pressed as an arg? I couldn't find
|
||||
binding automatically receives the number pressed as an arg? I couldn't find
|
||||
any prior art of this, so it doesn't seem worth it to try and invent
|
||||
currently. This might be something that we want to loop back on, but for the
|
||||
time being, it remains out of scope of this PR.
|
||||
|
|
|
@ -53,7 +53,7 @@ This feature will not impact reliability of Windows Terminal.
|
|||
|
||||
### Compatibility
|
||||
|
||||
With the implementation being mostly decoupled from the Windows Terminal app itself, no existing code/behaviours should break due to this feature.
|
||||
With the implementation being mostly decoupled from the Windows Terminal app itself, no existing code/behaviors should break due to this feature.
|
||||
|
||||
### Performance, Power, and Efficiency
|
||||
|
||||
|
|
|
@ -281,8 +281,8 @@ of the file.
|
|||
`inheritFrom` is very unique relative to other keys we already have.
|
||||
|
||||
##### Powerful
|
||||
This lets the user have potentially many layers of settings grouping. hese
|
||||
layers would let the user seperate out common settings however they like,
|
||||
This lets the user have potentially many layers of settings grouping. These
|
||||
layers would let the user separate out common settings however they like,
|
||||
without forcing them to a single "default" profile. They could potentially have
|
||||
many "default" profiles, e.g.
|
||||
* one that's used for all their WSL profiles, with `startingDirectory` set to
|
||||
|
|
|
@ -28,7 +28,7 @@ Other terminal emulators like ConEmu have a similar feature.
|
|||
* This enum attempts to encompass all potential connection states, even those which do not make sense for a local terminal.
|
||||
* The wide variety of values will be useful to indicate state changes in a user interface.
|
||||
* `NotConnected`: All new connections will start out in this state
|
||||
* `Connecting`: The connection has been initated, but has not yet completed connecting.
|
||||
* `Connecting`: The connection has been initiated, but has not yet completed connecting.
|
||||
* `Connected`: The connection is active.
|
||||
* `Closing`: The connection is being closed (usually by request).
|
||||
* `Closed`: The connection has been closed, either by request or from the remote end terminating successfully.
|
||||
|
@ -48,7 +48,7 @@ Other terminal emulators like ConEmu have a similar feature.
|
|||
|
||||
### Application and Settings
|
||||
|
||||
1. The existing `closeOnExit` profile key will be replaced with an enumerated string key supporting the following values (behaviours):
|
||||
1. The existing `closeOnExit` profile key will be replaced with an enumerated string key supporting the following values (behaviors):
|
||||
* `always` - a tab or pane hosting this profile will always be closed when the launched connection reaches a terminal state.
|
||||
* `graceful` - a tab or pane hosting this profile will be closed if and only if the launched connection reaches the `Closed` terminal state.
|
||||
* `never` - a tab or pane hosting this profile will not automatically close.
|
||||
|
|
|
@ -53,7 +53,7 @@ When a pane is a parent, its two children are either split vertically or
|
|||
horizontally. Parent nodes don't have a terminal of their own, they merely
|
||||
display the terminals of their children.
|
||||
|
||||
* If a Pane is split vertically, the two panes are seperated by a vertical
|
||||
* If a Pane is split vertically, the two panes are separated by a vertical
|
||||
split, as to appear side-by-side. Think `[|]`
|
||||
* If a Pane is split horizontally, the two panes are split by a horizontal
|
||||
separator, and appear above/below one another. Think `[-]`.
|
||||
|
@ -228,7 +228,7 @@ pane. This could be solved a number of ways. There could be keyboard shortcuts
|
|||
for swapping the positions of tabs, or a shortcut for both "zooming" a tab
|
||||
(temporarily making it the full size) or even popping a pane out to it's own
|
||||
tab. Additionally, a right-click menu option could be added to do the
|
||||
aformentioned actions. Discoverability of these two actions is not as high as
|
||||
aforementioned actions. Discoverability of these two actions is not as high as
|
||||
just dragging a tab from one pane to another; however, it's believed that panes
|
||||
are more of a power-user scenario, and power users will not necessarily be
|
||||
turned off by the feature's discoverability.
|
||||
|
|
|
@ -50,7 +50,7 @@ We will create a `SearchBoxControl` Xaml `UserControl` element. When a search pr
|
|||
|
||||
Above is the `SearchBoxControl` in dark theme and light theme.
|
||||
- The two buttons with up/down arrows controls the search direction, Each button will be styled to indicate which search direction is currently selected.
|
||||
- The button with a "Aa" icon, if pressed, means that we are searching case-sensitivily.
|
||||
- The button with a "Aa" icon, if pressed, means that we are searching case-sensitivity.
|
||||
- The current style puts all elements - the `X` button, the text box and the search pattern control buttons on one single line. This ensures that the `SearchBoxControl` won't be too high and block terminal text. This is similar with VSCode. Another possible layout style is to put elements in multiple layers. This will occupy more lines, but the search dialog will narrower. Considering that there is not many elements, we do not need multiple layers.
|
||||
|
||||
![SearchBox mockup, arrow button clicked](images/SearchBoxUpSelected.png)
|
||||
|
@ -92,7 +92,7 @@ This feature should not introduce any new security issues.
|
|||
### Reliability
|
||||
|
||||
1. The key input of Terminal command line and the search box should be separated. Search box should not block interaction with the command line when it is open.
|
||||
2. The search box should not block too much text. The search box only occupies one line, so it won't have big impact on the readibility of the terminal output.
|
||||
2. The search box should not block too much text. The search box only occupies one line, so it won't have big impact on the readability of the terminal output.
|
||||
|
||||
### Compatibility
|
||||
|
||||
|
@ -106,7 +106,7 @@ This feature only launches in need. It does not impact the performance of Termin
|
|||
|
||||
1. If the terminal window is not wide enough for the search box to be visible, the buttons on the right of the `TextBox` will become invisible, but the `TextBox` is still visible and the window could not be narrower than the `TextBox`. This is similar to the behavior of other editors. Please see the image below:
|
||||
![SearchBox width not enough](images/SearchBoxControlNoEnoughWidth.png)
|
||||
2. If the terminal window is not high enough for the search box to be visible, the whole terminal screen, inlcuding the `SearchBoxControl` can disappear. This is similar to the behavior of other editors.
|
||||
2. If the terminal window is not high enough for the search box to be visible, the whole terminal screen, including the `SearchBoxControl` can disappear. This is similar to the behavior of other editors.
|
||||
|
||||
## Future considerations
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ developed, to make the initialization of many commands as seamless as possible.
|
|||
As this is a very complex feature, there will need to be a number of steps taken
|
||||
in the codebase to enable this functionality in a way that users are expecting.
|
||||
The following is a suggestion of the individual changelists that could be made
|
||||
to iteratively work towards fulling implementing this funcionality.
|
||||
to iteratively work towards fulling implementing this functionality.
|
||||
|
||||
* [x] Refactor `ShortcutAction` dispatching into its own class
|
||||
- Right now, the `AppKeyBindings` is responsible for triggering all
|
||||
|
@ -507,7 +507,7 @@ runtimeclass TerminalParameters {
|
|||
* [ ] Add a `ShortcutAction` for `FocusPane`, which accepts a single parameter
|
||||
`index`.
|
||||
- We'll need to track each `Pane`'s ID as `Pane`s are created, so that we can
|
||||
quicky switch to the i'th `Pane`.
|
||||
quickly switch to the i'th `Pane`.
|
||||
- This is in order to support the `-t,--target` parameter of `split-pane`.
|
||||
|
||||
## Capabilities
|
||||
|
@ -537,7 +537,7 @@ This change should not regress any existing behaviors.
|
|||
|
||||
### Performance, Power, and Efficiency
|
||||
|
||||
This change should not particularily impact startup time or any of these other categories.
|
||||
This change should not particularly impact startup time or any of these other categories.
|
||||
|
||||
## Potential Issues
|
||||
|
||||
|
@ -549,7 +549,7 @@ itself, we'll use `\;` as an escaped `;` within the commandline. This is an area
|
|||
we've been caught in before, so extensive testing will be necessary to make sure
|
||||
this works as expected.
|
||||
|
||||
Painfully, powershell uses `;` as a seperator between commands as well. So, if
|
||||
Painfully, powershell uses `;` as a separator between commands as well. So, if
|
||||
someone wanted to call a `wt` commandline in powershell with multiple commands,
|
||||
the user would need to also escape those semicolons for powershell first. That
|
||||
means a command like ```wt new-tab ; split-pane``` would need to be ```wt new-tab
|
||||
|
|
|
@ -520,7 +520,7 @@ would `openDefaultSettings`, and we could bind that to
|
|||
### How does this work with the settings UI?
|
||||
|
||||
If we only have one version of the settings models (Globals, Profiles,
|
||||
ColorShemes, Keybindings) at runtime, and the user changes one of the settings
|
||||
ColorSchemes, Keybindings) at runtime, and the user changes one of the settings
|
||||
with the settings UI, how can we tell that settings changed?
|
||||
|
||||
Fortunately, this should be handled cleanly by the algorithm proposed above, in
|
||||
|
@ -678,7 +678,7 @@ generators _must_ be enabled to use the dynamic profiles.
|
|||
a WinRT interface that extensions could implement, and be triggered just like
|
||||
other dynamic profile generators.
|
||||
* **Multiple settings files** - This could enable us to place color schemes into
|
||||
a seperate file (like `colorschemes.json`) and put keybindings into their own
|
||||
a separate file (like `colorschemes.json`) and put keybindings into their own
|
||||
file as well, and reduce the number of settings in the user's `profiles.json`.
|
||||
It's unclear if this is something that we need quite yet, but the same
|
||||
layering functionality that enables this scenario could also enable more than
|
||||
|
|
|
@ -229,7 +229,7 @@ This should not introduce any new reliability issues.
|
|||
|
||||
### Compatibility
|
||||
|
||||
This could be a breaking change for code that relies on the few existing VT52 commands being available without a mode change. However, that functionality is non-standard, and has not been around for that long. There is almost certainly more benefit in being able to implement the missing VT100 functionality than there is in retaining that non-standard behaviour.
|
||||
This could be a breaking change for code that relies on the few existing VT52 commands being available without a mode change. However, that functionality is non-standard, and has not been around for that long. There is almost certainly more benefit in being able to implement the missing VT100 functionality than there is in retaining that non-standard behavior.
|
||||
|
||||
### Performance, Power, and Efficiency
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ issue id: <github issue id>
|
|||
|
||||
### Reliability
|
||||
|
||||
[comment]: # Will the proposed change improve reliabilty? If not, why make the change?
|
||||
[comment]: # Will the proposed change improve reliability? If not, why make the change?
|
||||
|
||||
### Compatibility
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ profile is identified by a GUID and contains a number of other fields.
|
|||
* Which color scheme to use (see Schemes below)
|
||||
* Font face and size
|
||||
* Various settings to control appearance. E.g. Opacity, icon, cursor appearance, display name etc.
|
||||
* Other behavioural settings. E.g. Close on exit, snap on input, .....
|
||||
* Other behavioral settings. E.g. Close on exit, snap on input, .....
|
||||
|
||||
Example settings include
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ You may ask yourself, why is the destructor deleted, then later defined to the
|
|||
this, then sometimes on object destruction, the interface's dtor will be
|
||||
called instead of the destructor for the base class. There is other
|
||||
strangeness that can occur as well, the details of which escape my memory from
|
||||
when @austdi and I first investigaved this early 2018.
|
||||
when @austdi and I first investigated this early 2018.
|
||||
|
||||
The end result of not defining your interfaces exactly like this will be that
|
||||
occasionally, when destructing objects, you'll get a segfault.
|
||||
|
|
|
@ -283,7 +283,7 @@ void ATTR_ROW::ReplaceAttrs(const TextAttribute& toBeReplacedAttr, const TextAtt
|
|||
else if (iStart > 0 && iStart == iEnd)
|
||||
{
|
||||
// First we try to find the run where the insertion happens, using lowerBound and upperBound to track
|
||||
// where we are curretly at.
|
||||
// where we are currently at.
|
||||
size_t lowerBound = 0;
|
||||
size_t upperBound = 0;
|
||||
for (size_t i = 0; i < _list.size(); i++)
|
||||
|
@ -503,7 +503,7 @@ void ATTR_ROW::ReplaceAttrs(const TextAttribute& toBeReplacedAttr, const TextAtt
|
|||
else
|
||||
{
|
||||
// If the color didn't match, then we just need to copy the piece we skipped and adjust
|
||||
// its length for the discrepency in columns not yet covered by the final/new run.
|
||||
// its length for the discrepancy in columns not yet covered by the final/new run.
|
||||
|
||||
// Move forward to a blank spot in the new run
|
||||
pNewRunPos++;
|
||||
|
@ -565,7 +565,7 @@ void ATTR_ROW::ReplaceAttrs(const TextAttribute& toBeReplacedAttr, const TextAtt
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - packs a vector of TextAttribute into a vector of TextAttrbuteRun
|
||||
// - packs a vector of TextAttribute into a vector of TextAttributeRun
|
||||
// Arguments:
|
||||
// - attrs - text attributes to pack
|
||||
// Return Value:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "CharRowCell.hpp"
|
||||
#include "unicode.hpp"
|
||||
|
||||
// default glyph value, used for reseting the character data portion of a cell
|
||||
// default glyph value, used for resetting the character data portion of a cell
|
||||
static constexpr wchar_t DefaultValue = UNICODE_SPACE;
|
||||
|
||||
CharRowCell::CharRowCell() noexcept :
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "OutputCellRect.hpp"
|
||||
|
||||
// Routine Description:
|
||||
// - Constucts an empty in-memory region for holding output buffer cell data.
|
||||
// - Constructs an empty in-memory region for holding output buffer cell data.
|
||||
OutputCellRect::OutputCellRect() noexcept :
|
||||
_rows(0),
|
||||
_cols(0)
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
// Arguments:
|
||||
// - defaultFgIndex: the BYTE to use as the index for the foreground, should
|
||||
// the foreground not be a legacy style attribute.
|
||||
// - defaultBgIndex: the BYTE to use as the index for the backgound, should
|
||||
// - defaultBgIndex: the BYTE to use as the index for the background, should
|
||||
// the background not be a legacy style attribute.
|
||||
// Return Value:
|
||||
// - a WORD with legacy-style attributes for this textattribute.
|
||||
|
|
|
@ -49,8 +49,8 @@ void TextColor::SetDefault() noexcept
|
|||
// * If we're an indexed color table value, we'll use that index to look up
|
||||
// our value in the provided color table.
|
||||
// - If brighten is true, and the index is in the "dark" portion of the
|
||||
// color table (indicies [0,7]), then we'll look up the bright version of
|
||||
// this color (from indicies [8,15]). This should be true for
|
||||
// color table (indices [0,7]), then we'll look up the bright version of
|
||||
// this color (from indices [8,15]). This should be true for
|
||||
// TextAttributes that are "Bold" and we're treating bold as bright
|
||||
// (which is the default behavior of most terminals.)
|
||||
// * If we're a default color, we'll return the default color provided.
|
||||
|
|
|
@ -28,7 +28,7 @@ Revision History:
|
|||
- From components of output.h/.c
|
||||
by Therese Stowell (ThereseS) 1990-1991
|
||||
- Pulled into its own file from textBuffer.hpp/cpp (AustDi, 2017)
|
||||
- Moved the colors into their own seperate abstraction. (migrie Nov 2018)
|
||||
- Moved the colors into their own separate abstraction. (migrie Nov 2018)
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -282,7 +282,7 @@ void Cursor::CopyProperties(const Cursor& OtherCursor) noexcept
|
|||
_fDeferCursorRedraw = OtherCursor._fDeferCursorRedraw;
|
||||
_fHaveDeferredCursorRedraw = OtherCursor._fHaveDeferredCursorRedraw;
|
||||
|
||||
// Size will be handled seperately in the resize operation.
|
||||
// Size will be handled separately in the resize operation.
|
||||
//_ulSize = OtherCursor._ulSize;
|
||||
_cursorType = OtherCursor._cursorType;
|
||||
_color = OtherCursor._color;
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
private:
|
||||
TextBuffer& _parentBuffer;
|
||||
|
||||
//TODO: seperate the rendering and text placement
|
||||
//TODO: separate the rendering and text placement
|
||||
|
||||
// NOTE: If you are adding a property here, go add it to CopyProperties.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ using namespace Microsoft::Console::Types;
|
|||
// Routine Description:
|
||||
// - Constructs a Search object.
|
||||
// - Make a Search object then call .FindNext() to locate items.
|
||||
// - Once you've found something, you can perfom actions like .Select() or .Color()
|
||||
// - Once you've found something, you can perform actions like .Select() or .Color()
|
||||
// Arguments:
|
||||
// - textBuffer - The screen text buffer to search through (the "haystack")
|
||||
// - uiaData - The IUiaData type reference, it is for providing selection methods
|
||||
|
@ -38,7 +38,7 @@ Search::Search(IUiaData& uiaData,
|
|||
// Routine Description:
|
||||
// - Constructs a Search object.
|
||||
// - Make a Search object then call .FindNext() to locate items.
|
||||
// - Once you've found something, you can perfom actions like .Select() or .Color()
|
||||
// - Once you've found something, you can perform actions like .Select() or .Color()
|
||||
// Arguments:
|
||||
// - textBuffer - The screen text buffer to search through (the "haystack")
|
||||
// - uiaData - The IUiaData type reference, it is for providing selection methods
|
||||
|
|
|
@ -1633,10 +1633,10 @@ std::string TextBuffer::GenRTF(const TextAndColor& rows, const int fontHeightPoi
|
|||
rtfBuilder << "{";
|
||||
|
||||
// Standard RTF header.
|
||||
// This is similar to the header gnerated by WordPad.
|
||||
// This is similar to the header generated by WordPad.
|
||||
// \ansi - specifies that the ANSI char set is used in the current doc
|
||||
// \ansicpg1252 - represents the ANSI code page which is used to perform the Unicode to ANSI conversion when writing RTF text
|
||||
// \deff0 - specifes that the default font for the document is the one at index 0 in the font table
|
||||
// \deff0 - specifies that the default font for the document is the one at index 0 in the font table
|
||||
// \nouicompat - ?
|
||||
rtfBuilder << "\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat";
|
||||
|
||||
|
@ -1663,7 +1663,7 @@ std::string TextBuffer::GenRTF(const TextAndColor& rows, const int fontHeightPoi
|
|||
contentBuilder << "\\viewkind4\\uc4";
|
||||
|
||||
// paragraph styles
|
||||
// \fs specificies font size in half-points i.e. \fs20 results in a font size
|
||||
// \fs specifies font size in half-points i.e. \fs20 results in a font size
|
||||
// of 10 pts. That's why, font size is multiplied by 2 here.
|
||||
contentBuilder << "\\pard\\slmult1\\f0\\fs" << std::to_string(2 * fontHeightPoints)
|
||||
<< "\\highlight1"
|
||||
|
@ -1763,7 +1763,7 @@ std::string TextBuffer::GenRTF(const TextAndColor& rows, const int fontHeightPoi
|
|||
fgColorIndex = nextColorIndex++;
|
||||
}
|
||||
|
||||
contentBuilder << "\\highglight" << bkColorIndex
|
||||
contentBuilder << "\\highlight" << bkColorIndex
|
||||
<< "\\cf" << fgColorIndex
|
||||
<< " ";
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Microsoft::Console::Types;
|
|||
// Routine Description:
|
||||
// - Creates a new read-only iterator to seek through cell data stored within a screen buffer
|
||||
// Arguments:
|
||||
// - buffer - Text buffer to seek throught
|
||||
// - buffer - Text buffer to seek through
|
||||
// - pos - Starting position to retrieve text data from (within screen buffer bounds)
|
||||
TextBufferCellIterator::TextBufferCellIterator(const TextBuffer& buffer, COORD pos) :
|
||||
TextBufferCellIterator(buffer, pos, buffer.GetSize())
|
||||
|
|
|
@ -146,7 +146,7 @@ void TextAttributeTests::TestTextAttributeColorGetters()
|
|||
VERIFY_ARE_EQUAL(green, attr._GetRgbBackground(view, _defaultBg));
|
||||
VERIFY_ARE_EQUAL(green, attr.CalculateRgbBackground(view, _defaultFg, _defaultBg));
|
||||
|
||||
// with reverse video set, calucated foreground/background values should be
|
||||
// with reverse video set, calculated foreground/background values should be
|
||||
// switched while getters stay the same
|
||||
attr.SetMetaAttributes(COMMON_LVB_REVERSE_VIDEO);
|
||||
|
||||
|
@ -174,7 +174,7 @@ void TextAttributeTests::TestReverseDefaultColors()
|
|||
VERIFY_ARE_EQUAL(_defaultBg, attr._GetRgbBackground(view, _defaultBg));
|
||||
VERIFY_ARE_EQUAL(_defaultBg, attr.CalculateRgbBackground(view, _defaultFg, _defaultBg));
|
||||
|
||||
// with reverse video set, calucated foreground/background values should be
|
||||
// with reverse video set, calculated foreground/background values should be
|
||||
// switched while getters stay the same
|
||||
attr.SetMetaAttributes(COMMON_LVB_REVERSE_VIDEO);
|
||||
VERIFY_IS_TRUE(attr._IsReverseVideo());
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace details
|
|||
|
||||
// Function Description:
|
||||
// - This is a helper function for running a bit of test code on the UI thread.
|
||||
// It will synchonously dispatch the provided function to the UI thread, and
|
||||
// It will synchronously dispatch the provided function to the UI thread, and
|
||||
// wait for that function to complete, before returning to the caller. Callers
|
||||
// should make sure to VERIFY_SUCCEEDED the result of this function, to ensure
|
||||
// the code executed successfully.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<!-- This file is used as the Appxmanifest for tests that _need_ to run in a
|
||||
packaged environment. It will be copied to the test's OutDir as part of the
|
||||
PostBuid step. It's highly similar to the "SUA" manifest that
|
||||
PostBuild step. It's highly similar to the "SUA" manifest that
|
||||
TAEF ships with, with the following modifications:
|
||||
|
||||
1. All of our winrt types are included in this manifest, including types from
|
||||
|
|
|
@ -458,7 +458,7 @@ void winrt::TerminalApp::implementation::AppKeyBindings::LayerJson(const Json::V
|
|||
// Json::Value::null to the parse function.
|
||||
// 2. In the second case, the "command" is an object. We'll use the
|
||||
// "action" in that object as the action name. We'll then pass
|
||||
// the "command" object to the arg parser, for furhter parsing.
|
||||
// the "command" object to the arg parser, for further parsing.
|
||||
|
||||
auto argsVal = Json::Value::null;
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace winrt::TerminalApp::implementation
|
|||
_root = winrt::make_self<TerminalPage>();
|
||||
}
|
||||
|
||||
// Method Decscription:
|
||||
// Method Description:
|
||||
// - Called around the codebase to discover if this is a UWP where we need to turn off specific settings.
|
||||
// Arguments:
|
||||
// - <none> - reports internal state
|
||||
|
@ -172,7 +172,7 @@ namespace winrt::TerminalApp::implementation
|
|||
_root->ShowDialog({ this, &AppLogic::_ShowDialog });
|
||||
|
||||
// In UWP mode, we cannot handle taking over the title bar for tabs,
|
||||
// so this setting is overriden to false no matter what the preference is.
|
||||
// so this setting is overridden to false no matter what the preference is.
|
||||
if (_isUwp)
|
||||
{
|
||||
_settings->GlobalSettings().SetShowTabsInTitlebar(false);
|
||||
|
@ -197,8 +197,8 @@ namespace winrt::TerminalApp::implementation
|
|||
// - Show a ContentDialog with buttons to take further action. Uses the
|
||||
// FrameworkElements provided as the title and content of this dialog, and
|
||||
// displays buttons (or a single button). Two buttons (primary and secondary)
|
||||
// will be displayed if this is an warning dialog for closing the termimal,
|
||||
// this allows the users to abondon the closing action. Otherwise, a single
|
||||
// will be displayed if this is an warning dialog for closing the terminal,
|
||||
// this allows the users to abandon the closing action. Otherwise, a single
|
||||
// close button will be displayed.
|
||||
// - Only one dialog can be visible at a time. If another dialog is visible
|
||||
// when this is called, nothing happens.
|
||||
|
@ -322,7 +322,7 @@ namespace winrt::TerminalApp::implementation
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Triggered when the application is fiished loading. If we failed to load
|
||||
// - Triggered when the application is finished loading. If we failed to load
|
||||
// the settings, then this will display the error dialog. This is done
|
||||
// here instead of when loading the settings, because we need our UI to be
|
||||
// visible to display the dialog, and when we're loading the settings,
|
||||
|
@ -398,7 +398,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// default size, which is provided in IslandWindow::MakeWindow.
|
||||
// Arguments:
|
||||
// - defaultInitialX: the system default x coordinate value
|
||||
// - defaultInitialY: the system defualt y coordinate value
|
||||
// - defaultInitialY: the system default y coordinate value
|
||||
// Return Value:
|
||||
// - a point containing the requested initial position in pixels.
|
||||
winrt::Windows::Foundation::Point AppLogic::GetLaunchInitialPositions(int32_t defaultInitialX, int32_t defaultInitialY)
|
||||
|
@ -689,7 +689,7 @@ namespace winrt::TerminalApp::implementation
|
|||
|
||||
// Method Description:
|
||||
// - Used to tell the app that the titlebar has been clicked. The App won't
|
||||
// actually recieve any clicks in the titlebar area, so this is a helper
|
||||
// actually receive any clicks in the titlebar area, so this is a helper
|
||||
// to clue the app in that a click has happened. The App will use this as
|
||||
// a indicator that it needs to dismiss any open flyouts.
|
||||
// Arguments:
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// the ctor, you're going to have a bad time. It'll mysteriously fail to
|
||||
// activate the AppLogic.
|
||||
// ALSO: If you add any UIElements as roots here, make sure they're
|
||||
// updated in _AppLogiclyTheme. The root currently is _root.
|
||||
// updated in _ApplyTheme. The root currently is _root.
|
||||
winrt::com_ptr<TerminalPage> _root{ nullptr };
|
||||
|
||||
std::shared_ptr<::TerminalApp::CascadiaSettings> _settings{ nullptr };
|
||||
|
|
|
@ -232,7 +232,7 @@ void CascadiaSettings::_ValidateProfilesExist()
|
|||
// Method Description:
|
||||
// - Walks through each profile, and ensures that they had a GUID set at some
|
||||
// point. If the profile did _not_ have a GUID ever set for it, generate a
|
||||
// temporary runtime GUID for it. This valitation does not add any warnnings.
|
||||
// temporary runtime GUID for it. This validation does not add any warnings.
|
||||
void CascadiaSettings::_ValidateProfilesHaveGuid()
|
||||
{
|
||||
for (auto& profile : _profiles)
|
||||
|
@ -283,7 +283,7 @@ void CascadiaSettings::_ValidateNoDuplicateProfiles()
|
|||
{
|
||||
bool foundDupe = false;
|
||||
|
||||
std::vector<size_t> indiciesToDelete;
|
||||
std::vector<size_t> indicesToDelete;
|
||||
|
||||
std::set<GUID> uniqueGuids;
|
||||
|
||||
|
@ -294,13 +294,13 @@ void CascadiaSettings::_ValidateNoDuplicateProfiles()
|
|||
if (!uniqueGuids.insert(_profiles.at(i).GetGuid()).second)
|
||||
{
|
||||
foundDupe = true;
|
||||
indiciesToDelete.push_back(i);
|
||||
indicesToDelete.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all the duplicates we've marked
|
||||
// Walk backwards, so we don't accidentally shift any of the elements
|
||||
for (auto iter = indiciesToDelete.rbegin(); iter != indiciesToDelete.rend(); iter++)
|
||||
for (auto iter = indicesToDelete.rbegin(); iter != indicesToDelete.rend(); iter++)
|
||||
{
|
||||
_profiles.erase(_profiles.begin() + *iter);
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ void CascadiaSettings::_ParseJsonString(std::string_view fileData, const bool is
|
|||
actualDataStart += Utf8Bom.size();
|
||||
}
|
||||
|
||||
std::string errs; // This string will recieve any error text from failing to parse.
|
||||
std::string errs; // This string will receive any error text from failing to parse.
|
||||
std::unique_ptr<Json::CharReader> reader{ Json::CharReaderBuilder::CharReaderBuilder().newCharReader() };
|
||||
|
||||
// Parse the json data into either our defaults or user settings. We'll keep
|
||||
|
@ -722,7 +722,7 @@ std::optional<std::string> CascadiaSettings::_ReadUserSettings()
|
|||
// that two instances of the app will try and move the settings file
|
||||
// simultaneously. We don't know what might happen in that scenario,
|
||||
// but we're also not sure how to safely lock the file to prevent
|
||||
// that from ocurring.
|
||||
// that from occurring.
|
||||
THROW_LAST_ERROR_IF(!MoveFile(pathToRoamingSettingsFile.c_str(),
|
||||
pathToSettingsFile.c_str()));
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
not try to read it.
|
||||
|
||||
Upstream problem report:
|
||||
https://developercommunity.visualstudio.com/content/problem/629524/static-library-reference-causes-there-was-a-proble.html
|
||||
https://developercommunity.visualstudio.com/content/problem/629524/static-library-reference-causes-there-was-a-problem.html
|
||||
-->
|
||||
<Target Name="_RemoveTerminalAppLibImplementationFromReference" BeforeTargets="ResolveAssemblyReferences">
|
||||
<ItemGroup>
|
||||
|
|
|
@ -383,7 +383,7 @@ std::wstring_view GlobalAppSettings::_SerializeTheme(const ElementTheme theme) n
|
|||
// Method Description:
|
||||
// - Helper function for converting the initial position string into
|
||||
// 2 coordinate values. We allow users to only provide one coordinate,
|
||||
// thus, we use comma as the separater:
|
||||
// thus, we use comma as the separator:
|
||||
// (100, 100): standard input string
|
||||
// (, 100), (100, ): if a value is missing, we set this value as a default
|
||||
// (,): both x and y are set to default
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace TerminalApp::JsonUtils
|
|||
// Arguments:
|
||||
// - json: The json object to search for the given key
|
||||
// - key: The key to look for in the json object
|
||||
// - target: the optional object to recieve the value from json
|
||||
// - target: the optional object to receive the value from json
|
||||
// - conversion: a std::function<T(const Json::Value&)> which can be used to
|
||||
// convert the Json::Value to the appropriate type.
|
||||
// Return Value:
|
||||
|
|
|
@ -205,7 +205,7 @@ winrt::Microsoft::Terminal::Settings::KeyChord KeyChordSerialization::FromString
|
|||
}
|
||||
|
||||
// Function Description:
|
||||
// - Serialize this keychord into a string represenation.
|
||||
// - Serialize this keychord into a string representation.
|
||||
// - The string will fit the format "[ctrl+][alt+][shift+]<keyName>",
|
||||
// where each modifier is optional, and keyName is either one of the
|
||||
// names listed in the vkeyNamePairs vector above, or is one of 0-9a-z.
|
||||
|
|
|
@ -786,7 +786,7 @@ void Pane::_SetupChildCloseHandlers()
|
|||
// - Sets up row/column definitions for this pane. There are three total
|
||||
// row/cols. The middle one is for the separator. The first and third are for
|
||||
// each of the child panes, and are given a size in pixels, based off the
|
||||
// availiable space, and the percent of the space they respectively consume,
|
||||
// available space, and the percent of the space they respectively consume,
|
||||
// which is stored in _desiredSplitPosition
|
||||
// - Does nothing if our split state is currently set to SplitState::None
|
||||
// Arguments:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// - Pane.h
|
||||
//
|
||||
// Abstract:
|
||||
// - Panes are an abstraction by which the terminal can dislay multiple terminal
|
||||
// - Panes are an abstraction by which the terminal can display multiple terminal
|
||||
// instances simultaneously in a single terminal window. While tabs allow for
|
||||
// a single terminal window to have many terminal sessions running
|
||||
// simultaneously within a single window, only one tab can be visible at a
|
||||
|
@ -191,7 +191,7 @@ private:
|
|||
std::unique_ptr<LayoutSizeNode> secondChild;
|
||||
|
||||
// These two fields hold next possible snapped values of firstChild and
|
||||
// secondChild. Although that could be calculated from these fields themself,
|
||||
// secondChild. Although that could be calculated from these fields themselves,
|
||||
// it would be wasteful as we have to know these values more often than for
|
||||
// simple increment. Hence we cache that here.
|
||||
std::unique_ptr<LayoutSizeNode> nextFirstChild;
|
||||
|
|
|
@ -936,7 +936,7 @@ CloseOnExitMode Profile::GetCloseOnExitMode() const noexcept
|
|||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - true iff the profile chould be hidden from the list of profiles.
|
||||
// - true iff the profile should be hidden from the list of profiles.
|
||||
bool Profile::IsHidden() const noexcept
|
||||
{
|
||||
return _hidden;
|
||||
|
@ -1309,7 +1309,7 @@ bool Profile::IsDynamicProfileObject(const Json::Value& json)
|
|||
GUID Profile::_GenerateGuidForProfile(const std::wstring& name, const std::optional<std::wstring>& source) noexcept
|
||||
{
|
||||
// If we have a _source, then we can from a dynamic profile generator. Use
|
||||
// our source to build the naespace guid, instead of using the default GUID.
|
||||
// our source to build the namespace guid, instead of using the default GUID.
|
||||
|
||||
const GUID namespaceGuid = source.has_value() ?
|
||||
Utils::CreateV5Uuid(RUNTIME_GENERATED_PROFILE_NAMESPACE_GUID, gsl::as_bytes(gsl::make_span(source.value()))) :
|
||||
|
|
|
@ -295,7 +295,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// - <none>
|
||||
void Tab::ResizeContent(const winrt::Windows::Foundation::Size& newSize)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propogate
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
_rootPane->ResizeContent(newSize);
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// - <none>
|
||||
void Tab::ResizePane(const winrt::TerminalApp::Direction& direction)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propogate
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
_rootPane->ResizePane(direction);
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// - <none>
|
||||
void Tab::NavigateFocus(const winrt::TerminalApp::Direction& direction)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propogate
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
_rootPane->NavigateFocus(direction);
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ namespace winrt::TerminalApp::implementation
|
|||
// Method Description:
|
||||
// - Displays a dialog for warnings found while closing the terminal app using
|
||||
// key binding with multiple tabs opened. Display messages to warn user
|
||||
// that more than 1 tab is opend, and once the user clicks the OK button, remove
|
||||
// that more than 1 tab is opened, and once the user clicks the OK button, remove
|
||||
// all the tabs and shut down and app. If cancel is clicked, the dialog will close
|
||||
// - Only one dialog can be visible at a time. If another dialog is visible
|
||||
// when this is called, nothing happens. See _ShowDialog for details
|
||||
|
@ -480,7 +480,7 @@ namespace winrt::TerminalApp::implementation
|
|||
g_hTerminalAppProvider, // handle to TerminalApp tracelogging provider
|
||||
"TabInformation",
|
||||
TraceLoggingDescription("Event emitted upon new tab creation in TerminalApp"),
|
||||
TraceLoggingUInt32(tabCount, "TabCount", "Count of tabs curently opened in TerminalApp"),
|
||||
TraceLoggingUInt32(tabCount, "TabCount", "Count of tabs currently opened in TerminalApp"),
|
||||
TraceLoggingBool(usedManualProfile, "ProfileSpecified", "Whether the new tab specified a profile explicitly"),
|
||||
TraceLoggingGuid(profileGuid, "ProfileGuid", "The GUID of the profile spawned in the new tab"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
|
@ -521,7 +521,7 @@ namespace winrt::TerminalApp::implementation
|
|||
auto weakTab = make_weak(newTabImpl);
|
||||
|
||||
// When the tab's active pane changes, we'll want to lookup a new icon
|
||||
// for it, and possibly propogate the title up to the window.
|
||||
// for it, and possibly propagate the title up to the window.
|
||||
newTabImpl->ActivePaneChanged([weakTab, weakThis{ get_weak() }]() {
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
@ -1236,7 +1236,7 @@ namespace winrt::TerminalApp::implementation
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Calculates the appropriate size to snap to in the gived direction, for
|
||||
// - Calculates the appropriate size to snap to in the given direction, for
|
||||
// the given dimension. If the global setting `snapToGridOnResize` is set
|
||||
// to `false`, this will just immediately return the provided dimension,
|
||||
// effectively disabling snapping.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "Utils.h"
|
||||
|
||||
// Method Description:
|
||||
// - Contstructs a wstring from a given Json::Value object. Reads the object as
|
||||
// - Constructs a wstring from a given Json::Value object. Reads the object as
|
||||
// a std::string using asString, then builds an hstring from that std::string,
|
||||
// then converts that hstring into a std::wstring.
|
||||
// Arguments:
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
<ItemGroup>
|
||||
<!-- Manually add references to each of our dependent winmds. Mark them as
|
||||
private=false and CopyLocalSatelliteAssemblies=false, so that we don't
|
||||
propogate them upwards (which can make referencing this project result in
|
||||
propagate them upwards (which can make referencing this project result in
|
||||
duplicate type definitions)-->
|
||||
<Reference Include="Microsoft.Terminal.Settings">
|
||||
<HintPath>$(_BinRoot)TerminalSettings\Microsoft.Terminal.Settings.winmd</HintPath>
|
||||
|
@ -285,7 +285,7 @@
|
|||
to reference its winmd, but very specifically with the
|
||||
CopyLocalSatelliteAssemblies and Private properties set to false, as to not
|
||||
have projects including us double-including MUX's .winmd. The following blob
|
||||
is taken straight from the MUX build targets, with the afformentioned
|
||||
is taken straight from the MUX build targets, with the aforementioned
|
||||
changes.-->
|
||||
<PropertyGroup>
|
||||
<Native-Platform Condition="'$(Platform)' == 'Win32'">x86</Native-Platform>
|
||||
|
|
|
@ -385,20 +385,20 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!_recievedFirstByte)
|
||||
if (!_receivedFirstByte)
|
||||
{
|
||||
const auto now = std::chrono::high_resolution_clock::now();
|
||||
const std::chrono::duration<double> delta = now - _startTime;
|
||||
|
||||
#pragma warning(suppress : 26477 26485 26494 26482 26446) // We don't control TraceLoggingWrite
|
||||
TraceLoggingWrite(g_hTerminalConnectionProvider,
|
||||
"RecievedFirstByte",
|
||||
TraceLoggingDescription("An event emitted when the connection recieves the first byte"),
|
||||
"ReceivedFirstByte",
|
||||
TraceLoggingDescription("An event emitted when the connection receives the first byte"),
|
||||
TraceLoggingGuid(_guid, "SessionGuid", "The WT_SESSION's GUID"),
|
||||
TraceLoggingFloat64(delta.count(), "Duration"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance));
|
||||
_recievedFirstByte = true;
|
||||
_receivedFirstByte = true;
|
||||
}
|
||||
|
||||
// Pass the output to our registered event handlers
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
|||
hstring _startingTitle;
|
||||
guid _guid{}; // A unique session identifier for connected client
|
||||
|
||||
bool _recievedFirstByte{ false };
|
||||
bool _receivedFirstByte{ false };
|
||||
std::chrono::high_resolution_clock::time_point _startTime{};
|
||||
|
||||
wil::unique_hfile _inPipe; // The pipe for writing input to
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.Terminal.TerminalControl
|
||||
{
|
||||
delegate void SearchHandler(String query, Boolean goFarward, Boolean isCaseSensitive);
|
||||
delegate void SearchHandler(String query, Boolean goForward, Boolean isCaseSensitive);
|
||||
|
||||
[default_interface] runtimeclass SearchBoxControl : Windows.UI.Xaml.Controls.UserControl
|
||||
{
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
|
||||
// Method Description:
|
||||
// - Handler for CompositionStarted event by CoreEditContext responsible
|
||||
// for making internal TSFInputControl controls visisble.
|
||||
// for making internal TSFInputControl controls visible.
|
||||
// Arguments:
|
||||
// - sender: CoreTextEditContext sending the request. Not used in method.
|
||||
// - args: CoreTextCompositionStartedEventArgs. Not used in method.
|
||||
|
@ -207,7 +207,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
|
||||
// Method Description:
|
||||
// - Handler for CompositionCompleted event by CoreEditContext responsible
|
||||
// for making internal TSFInputControl controls visisble.
|
||||
// for making internal TSFInputControl controls visible.
|
||||
// Arguments:
|
||||
// - sender: CoreTextEditContext sending the request. Not used in method.
|
||||
// - args: CoreTextCompositionCompletedEventArgs. Not used in method.
|
||||
|
@ -238,7 +238,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
// Method Description:
|
||||
// - Handler for FocusRemoved event by CoreEditContext responsible
|
||||
// for removing focus for the TSFInputControl control accordingly
|
||||
// when focus was forecibly removed from text input control. (TODO GitHub #3644)
|
||||
// when focus was forcibly removed from text input control. (TODO GitHub #3644)
|
||||
// NOTE: Documentation says application should handle this event
|
||||
// Arguments:
|
||||
// - sender: CoreTextEditContext sending the request. Not used in method.
|
||||
|
|
|
@ -647,17 +647,17 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
dxEngine->SetCallback(std::bind(&TermControl::SwapChainChanged, this));
|
||||
|
||||
// TODO:GH#3927 - Make it possible to hot-reload this setting. Right
|
||||
// here, the setting will only be used when the Temrinal is initialized.
|
||||
// here, the setting will only be used when the Terminal is initialized.
|
||||
dxEngine->SetRetroTerminalEffects(_settings.RetroTerminalEffect());
|
||||
|
||||
THROW_IF_FAILED(dxEngine->Enable());
|
||||
_renderEngine = std::move(dxEngine);
|
||||
|
||||
// This event is explicitly revoked in the destructor: does not need weak_ref
|
||||
auto onRecieveOutputFn = [this](const hstring str) {
|
||||
auto onReceiveOutputFn = [this](const hstring str) {
|
||||
_terminal->Write(str);
|
||||
};
|
||||
_connectionOutputEventToken = _connection.TerminalOutput(onRecieveOutputFn);
|
||||
_connectionOutputEventToken = _connection.TerminalOutput(onReceiveOutputFn);
|
||||
|
||||
auto inputFn = std::bind(&TermControl::_SendInputToConnection, this, std::placeholders::_1);
|
||||
_terminal->SetWriteInputCallback(inputFn);
|
||||
|
@ -711,13 +711,13 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
localPointerToThread->EnablePainting();
|
||||
|
||||
// No matter what order these guys are in, The KeyDown's will fire
|
||||
// before the CharacterRecieved, so we can't easily get characters
|
||||
// before the CharacterReceived, so we can't easily get characters
|
||||
// first, then fallback to getting keys from vkeys.
|
||||
// TODO: This apparently handles keys and characters correctly, though
|
||||
// I'd keep an eye on it, and test more.
|
||||
// I presume that the characters that aren't translated by terminalInput
|
||||
// just end up getting ignored, and the rest of the input comes
|
||||
// through CharacterRecieved.
|
||||
// through CharacterReceived.
|
||||
// I don't believe there's a difference between KeyDown and
|
||||
// PreviewKeyDown for our purposes
|
||||
// These two handlers _must_ be on this, not _root.
|
||||
|
@ -873,7 +873,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
|
||||
// If the terminal translated the key, mark the event as handled.
|
||||
// This will prevent the system from trying to get the character out
|
||||
// of it and sending us a CharacterRecieved event.
|
||||
// of it and sending us a CharacterReceived event.
|
||||
const auto handled = vkey ? _terminal->SendKeyEvent(vkey, scanCode, modifiers) : true;
|
||||
|
||||
if (_cursorTimer.has_value())
|
||||
|
@ -1231,7 +1231,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
}
|
||||
else
|
||||
{
|
||||
// This is a scroll event that wasn't initiated by the termnial
|
||||
// This is a scroll event that wasn't initiated by the terminal
|
||||
// itself - it was initiated by the mouse wheel, or the scrollbar.
|
||||
this->ScrollViewport(static_cast<int>(newValue));
|
||||
}
|
||||
|
@ -1438,7 +1438,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
// performance guarantees aren't exactly stellar)
|
||||
// - The STL doesn't have a simple string search/replace method.
|
||||
// This fact is lamentable.
|
||||
// - This line-ending converstion is intentionally fairly
|
||||
// - This line-ending conversion is intentionally fairly
|
||||
// conservative, to avoid stripping out lone \n characters
|
||||
// where they could conceivably be intentional.
|
||||
|
||||
|
@ -1620,7 +1620,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Update the postion and size of the scrollbar to match the given
|
||||
// - Update the position and size of the scrollbar to match the given
|
||||
// viewport top, viewport height, and buffer size.
|
||||
// The change will be actually handled in _ScrollbarChangeHandler.
|
||||
// This should be done on the UI thread. Make sure the caller is calling
|
||||
|
@ -1644,7 +1644,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Update the postion and size of the scrollbar to match the given
|
||||
// - Update the position and size of the scrollbar to match the given
|
||||
// viewport top, viewport height, and buffer size.
|
||||
// Additionally fires a ScrollPositionChanged event for anyone who's
|
||||
// registered an event handler for us.
|
||||
|
@ -1992,13 +1992,13 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
// or we hit max number of allowable values (= 4) for the bounding rectangle
|
||||
// Non-numeral values detected will default to 0
|
||||
// std::getline will not throw exception unless flags are set on the wstringstream
|
||||
// std::stod will throw invalid_argument expection if the input is an invalid double value
|
||||
// std::stod will throw out_of_range expection if the input value is more than DBL_MAX
|
||||
// std::stod will throw invalid_argument exception if the input is an invalid double value
|
||||
// std::stod will throw out_of_range exception if the input value is more than DBL_MAX
|
||||
try
|
||||
{
|
||||
for (; std::getline(tokenStream, token, singleCharDelim) && (paddingPropIndex < thicknessArr.size()); paddingPropIndex++)
|
||||
{
|
||||
// std::stod internall calls wcstod which handles whitespace prefix (which is ignored)
|
||||
// std::stod internally calls wcstod which handles whitespace prefix (which is ignored)
|
||||
// & stops the scan when first char outside the range of radix is encountered
|
||||
// We'll be permissive till the extent that stod function allows us to be by default
|
||||
// Ex. a value like 100.3#535w2 will be read as 100.3, but ;df25 will fail
|
||||
|
@ -2256,7 +2256,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
void TermControl::_DragOverHandler(Windows::Foundation::IInspectable const& /*sender*/,
|
||||
DragEventArgs const& e)
|
||||
{
|
||||
// Make sure to set the AcceptedOperation, so that we can later recieve the path in the Drop event
|
||||
// Make sure to set the AcceptedOperation, so that we can later receive the path in the Drop event
|
||||
e.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Copy);
|
||||
|
||||
// Sets custom UI text
|
||||
|
|
|
@ -245,7 +245,7 @@ bool Terminal::SendKeyEvent(const WORD vkey, const WORD scanCode, const ControlK
|
|||
// pressed, manually get the character that's being typed, and put it in the
|
||||
// KeyEvent.
|
||||
// DON'T manually handle Alt+Space - the system will use this to bring up
|
||||
// the system menu for restore, min/maximimize, size, move, close
|
||||
// the system menu for restore, min/maximize, size, move, close
|
||||
wchar_t ch = UNICODE_NULL;
|
||||
if (states.IsAltPressed() && vkey != VK_SPACE)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ catch (...)
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Aquire a read lock on the terminal.
|
||||
// - Acquire a read lock on the terminal.
|
||||
// Return Value:
|
||||
// - a shared_lock which can be used to unlock the terminal. The shared_lock
|
||||
// will release this lock when it's destructed.
|
||||
|
@ -355,7 +355,7 @@ catch (...)
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Aquire a write lock on the terminal.
|
||||
// - Acquire a write lock on the terminal.
|
||||
// Return Value:
|
||||
// - a unique_lock which can be used to unlock the terminal. The unique_lock
|
||||
// will release this lock when it's destructed.
|
||||
|
|
|
@ -225,7 +225,7 @@ private:
|
|||
// _visibleTop as well.
|
||||
// Additionally, maybe some people want to scroll into the history, then have that scroll out from
|
||||
// underneath them, while others would prefer to anchor it in place.
|
||||
// Either way, we sohould make this behavior controlled by a setting.
|
||||
// Either way, we should make this behavior controlled by a setting.
|
||||
|
||||
static WORD _ScanCodeFromVirtualKey(const WORD vkey) noexcept;
|
||||
static wchar_t _CharacterFromKeyEvent(const WORD vkey, const WORD scanCode, const ControlKeyStates states) noexcept;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Licensed under the MIT license.
|
||||
//
|
||||
// This test class creates an in-proc conpty host as well as a Terminal, to
|
||||
// validate that strings written to the conpty create the same resopnse on the
|
||||
// validate that strings written to the conpty create the same response on the
|
||||
// terminal end. Tests can be written that validate both the contents of the
|
||||
// host buffer as well as the terminal buffer. Everytime that
|
||||
// `renderer.PaintFrame()` is called, the tests will validate the expected
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace TerminalCoreUnitTests
|
|||
void InputTest::AltSpace()
|
||||
{
|
||||
// Make sure we don't handle Alt+Space. The system will use this to
|
||||
// bring up the system menu for restore, min/maximimize, size, move,
|
||||
// bring up the system menu for restore, min/maximize, size, move,
|
||||
// close
|
||||
VERIFY_IS_FALSE(term.SendKeyEvent(L' ', 0, ControlKeyStates::LeftAltPressed));
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ void AppHost::Initialize()
|
|||
|
||||
if (_useNonClientArea)
|
||||
{
|
||||
// Register our callbar for when the app's non-client content changes.
|
||||
// Register our callback for when the app's non-client content changes.
|
||||
// This has to be done _before_ App::Create, as the app might set the
|
||||
// content in Create.
|
||||
_logic.SetTitleBarContent({ this, &AppHost::_UpdateTitleBarContent });
|
||||
|
@ -202,7 +202,7 @@ void AppHost::_HandleCreateWindow(const HWND hwnd, RECT proposedRect, winrt::Ter
|
|||
{
|
||||
launchMode = _logic.GetLaunchMode();
|
||||
|
||||
// Acquire the actual intial position
|
||||
// Acquire the actual initial position
|
||||
winrt::Windows::Foundation::Point initialPosition = _logic.GetLaunchInitialPositions(proposedRect.left, proposedRect.top);
|
||||
proposedRect.left = gsl::narrow_cast<long>(initialPosition.X);
|
||||
proposedRect.top = gsl::narrow_cast<long>(initialPosition.Y);
|
||||
|
@ -211,7 +211,7 @@ void AppHost::_HandleCreateWindow(const HWND hwnd, RECT proposedRect, winrt::Ter
|
|||
long adjustedWidth = 0;
|
||||
if (launchMode == winrt::TerminalApp::LaunchMode::DefaultMode)
|
||||
{
|
||||
// Find nearest montitor.
|
||||
// Find nearest monitor.
|
||||
HMONITOR hmon = MonitorFromRect(&proposedRect, MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
// Get nearest monitor information
|
||||
|
@ -279,7 +279,7 @@ void AppHost::_HandleCreateWindow(const HWND hwnd, RECT proposedRect, winrt::Ter
|
|||
newPos.Height(),
|
||||
SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
|
||||
// Refresh the dpi of HWND becuase the dpi where the window will launch may be different
|
||||
// Refresh the dpi of HWND because the dpi where the window will launch may be different
|
||||
// at this time
|
||||
_window->RefreshCurrentDPI();
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ public:
|
|||
|
||||
//// Gets the logical (in DIPs) size of a physical size specified by the parameter physicalSize
|
||||
//// Remarks:
|
||||
//// XAML coordinate system is always in Display Indepenent Pixels (a.k.a DIPs or Logical). However Win32 GDI (because of legacy reasons)
|
||||
//// XAML coordinate system is always in Display Independent Pixels (a.k.a DIPs or Logical). However Win32 GDI (because of legacy reasons)
|
||||
//// in DPI mode "Per-Monitor and Per-Monitor (V2) DPI Awareness" is always in physical pixels.
|
||||
//// The formula to transform is:
|
||||
//// logical = (physical / dpi) + 0.5 // 0.5 is to ensure that we pixel snap correctly at the edges, this is necessary with odd DPIs like 1.25, 1.5, 1, .75
|
||||
|
@ -203,8 +203,8 @@ public:
|
|||
const auto scale = GetCurrentDpiScale();
|
||||
// 0.5 is to ensure that we pixel snap correctly at the edges, this is necessary with odd DPIs like 1.25, 1.5, 1, .75
|
||||
const auto logicalWidth = (physicalSize.cx / scale) + 0.5f;
|
||||
const auto logicalHeigth = (physicalSize.cy / scale) + 0.5f;
|
||||
return winrt::Windows::Foundation::Size(logicalWidth, logicalHeigth);
|
||||
const auto logicalHeight = (physicalSize.cy / scale) + 0.5f;
|
||||
return winrt::Windows::Foundation::Size(logicalWidth, logicalHeight);
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Size GetLogicalSize() const noexcept
|
||||
|
|
|
@ -79,7 +79,7 @@ void IslandWindow::Close()
|
|||
|
||||
// Method Description:
|
||||
// - Set a callback to be called when we process a WM_CREATE message. This gives
|
||||
// the AppHost a chance to resize the window to the propoer size.
|
||||
// the AppHost a chance to resize the window to the proper size.
|
||||
// Arguments:
|
||||
// - pfn: a function to be called during the handling of WM_CREATE. It takes two
|
||||
// parameters:
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
TerminalApp to have TerminalApp handle the ChangeViewport call.
|
||||
(See IslandWindow::SetCreateCallback as an example of a similar
|
||||
pattern we're using today.) That way, if someone else were trying
|
||||
to resuse this, they could have their own AppHost (or TerminalApp
|
||||
to reuse this, they could have their own AppHost (or TerminalApp
|
||||
equivalent) handle the ChangeViewport call their own way.
|
||||
*/
|
||||
return;
|
||||
|
|
|
@ -108,7 +108,7 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
|
|||
AppHost host;
|
||||
|
||||
// Initialize the xaml content. This must be called AFTER the
|
||||
// WindowsXamlManager is initalized.
|
||||
// WindowsXamlManager is initialized.
|
||||
host.Initialize();
|
||||
|
||||
MSG message;
|
||||
|
|
|
@ -549,7 +549,7 @@ namespace TerminalAppUnitTests
|
|||
VERIFY_ARE_EQUAL(L"Windows.Terminal.Wsl", settings._profiles.at(1)._source.value());
|
||||
VERIFY_ARE_EQUAL(L"Windows.Terminal.Wsl", settings._profiles.at(2)._source.value());
|
||||
VERIFY_ARE_EQUAL(L"Windows.Terminal.Azure", settings._profiles.at(3)._source.value());
|
||||
// settings._profiles.at(4) does not have a soruce
|
||||
// settings._profiles.at(4) does not have a source
|
||||
VERIFY_ARE_EQUAL(L"profile0FromUserSettings", settings._profiles.at(0)._name);
|
||||
VERIFY_ARE_EQUAL(L"profile1FromUserSettings", settings._profiles.at(1)._name);
|
||||
VERIFY_ARE_EQUAL(L"profile2FromUserSettings", settings._profiles.at(2)._name);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<!-- This file is used as the Appxmanifest for tests that _need_ to run in a
|
||||
packaged environment. It will be copied to the test's OutDir as part of the
|
||||
PostBuid step. It's highly similar to the "PackagedCwaFullTrust" manifest that
|
||||
PostBuild step. It's highly similar to the "PackagedCwaFullTrust" manifest that
|
||||
TAEF ships with, with the following modifications:
|
||||
|
||||
1. All of our winrt types are included in this manifest, including types from
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<!-- These settings tell MsBuild to treat the project as a "Universal Windows"
|
||||
application. This includes doing things like creating a seperate
|
||||
application. This includes doing things like creating a separate
|
||||
subdirectory for our binary output, and making sure that a wapproj looks
|
||||
at the winmd we build to generate type info.
|
||||
In general, cppwinrt projects all want this.
|
||||
|
|
|
@ -100,7 +100,7 @@ ConsoleArguments::ConsoleArguments(const std::wstring& commandline,
|
|||
_commandline(commandline),
|
||||
_vtInHandle(hStdIn),
|
||||
_vtOutHandle(hStdOut),
|
||||
_recievedEarlySizeChange{ false },
|
||||
_receivedEarlySizeChange{ false },
|
||||
_originalWidth{ -1 },
|
||||
_originalHeight{ -1 }
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ ConsoleArguments& ConsoleArguments::operator=(const ConsoleArguments& other)
|
|||
_width = other._width;
|
||||
_height = other._height;
|
||||
_inheritCursor = other._inheritCursor;
|
||||
_recievedEarlySizeChange = other._recievedEarlySizeChange;
|
||||
_receivedEarlySizeChange = other._receivedEarlySizeChange;
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
@ -630,12 +630,12 @@ void ConsoleArguments::SetExpectedSize(COORD dimensions) noexcept
|
|||
// Stash away the original values we parsed when this is called.
|
||||
// This is to help debugging - if the signal thread DOES change these values,
|
||||
// we can still recover what was given to us on the commandline.
|
||||
if (!_recievedEarlySizeChange)
|
||||
if (!_receivedEarlySizeChange)
|
||||
{
|
||||
_originalWidth = _width;
|
||||
_originalHeight = _height;
|
||||
// Mark that we've changed size from what our commandline values were
|
||||
_recievedEarlySizeChange = true;
|
||||
_receivedEarlySizeChange = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
_serverHandle(serverHandle),
|
||||
_signalHandle(signalHandle),
|
||||
_inheritCursor(inheritCursor),
|
||||
_recievedEarlySizeChange{ false },
|
||||
_receivedEarlySizeChange{ false },
|
||||
_originalWidth{ -1 },
|
||||
_originalHeight{ -1 }
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ private:
|
|||
DWORD _signalHandle;
|
||||
bool _inheritCursor;
|
||||
|
||||
bool _recievedEarlySizeChange;
|
||||
bool _receivedEarlySizeChange;
|
||||
short _originalWidth;
|
||||
short _originalHeight;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Module Name:
|
|||
- IIoProvider.hpp
|
||||
|
||||
Abstract:
|
||||
- Provides an abstraction for aquiring the active input and output objects of
|
||||
- Provides an abstraction for acquiring the active input and output objects of
|
||||
the console.
|
||||
|
||||
Author(s):
|
||||
|
|
|
@ -60,7 +60,7 @@ DWORD WINAPI PtySignalInputThread::StaticThreadProc(_In_ LPVOID lpParameter)
|
|||
|
||||
// Method Description:
|
||||
// - Tell us that there's a client attached to the console, so we can actually
|
||||
// do something with the messages we recieve now. Before this is set, there
|
||||
// do something with the messages we receive now. Before this is set, there
|
||||
// is no guarantee that a client has attached, so most parts of the console
|
||||
// (in and screen buffers) haven't yet been initialized.
|
||||
// Arguments:
|
||||
|
|
|
@ -35,7 +35,7 @@ VtIo::VtIo() :
|
|||
// Arguments:
|
||||
// VtIoMode: A string containing the console's requested VT mode. This can be
|
||||
// any of the strings in VtIoModes.hpp
|
||||
// pIoMode: recieves the VtIoMode that the string prepresents if it's a valid
|
||||
// pIoMode: receives the VtIoMode that the string represents if it's a valid
|
||||
// IO mode string
|
||||
// Return Value:
|
||||
// S_OK if we parsed the string successfully, otherwise E_INVALIDARG indicating failure.
|
||||
|
@ -374,7 +374,7 @@ void VtIo::CloseOutput()
|
|||
|
||||
void VtIo::_ShutdownIfNeeded()
|
||||
{
|
||||
// The callers should have both accquired the _shutdownLock at this point -
|
||||
// The callers should have both acquired the _shutdownLock at this point -
|
||||
// we dont want a race on who is actually responsible for closing it.
|
||||
if (_objectsCreated && _pVtInputThread == nullptr && _pVtRenderEngine == nullptr)
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ void WriteToScreen(SCREEN_INFORMATION& screenInfo, const Viewport& region)
|
|||
std::wstring_view writtenView(wideChars);
|
||||
writtenView = writtenView.substr(0, wideCharsWritten);
|
||||
|
||||
// Look over written wide chars to find equilalent count of ascii chars so we can properly report back
|
||||
// Look over written wide chars to find equivalent count of ascii chars so we can properly report back
|
||||
// how many elements were actually written
|
||||
used = GetALengthFromW(codepage, writtenView);
|
||||
}
|
||||
|
|
|
@ -590,7 +590,7 @@ constexpr unsigned int LOCAL_BUFFER_SIZE = 100;
|
|||
i < bufferSize;
|
||||
i++, Tmp++)
|
||||
{
|
||||
// see 18120085, these two need to be seperate if statements
|
||||
// see 18120085, these two need to be separate if statements
|
||||
if (*Tmp == UNICODE_BACKSPACE)
|
||||
{
|
||||
//it is important we do nothing in the else case for
|
||||
|
|
|
@ -325,11 +325,11 @@ static std::wstring aliasesSeparator(L"=");
|
|||
// Each of the aliases will be made up of the source, a separator, the target, then a null character.
|
||||
// They are of the form "Source=Target" when returned.
|
||||
size_t const cchNull = 1;
|
||||
size_t cchSeperator = aliasesSeparator.size();
|
||||
size_t cchSeparator = aliasesSeparator.size();
|
||||
// If we're counting how much multibyte space will be needed, trial convert the separator before we add.
|
||||
if (!countInUnicode)
|
||||
{
|
||||
cchSeperator = GetALengthFromW(codepage, aliasesSeparator);
|
||||
cchSeparator = GetALengthFromW(codepage, aliasesSeparator);
|
||||
}
|
||||
|
||||
// Find without creating.
|
||||
|
@ -352,7 +352,7 @@ static std::wstring aliasesSeparator(L"=");
|
|||
|
||||
// Accumulate all sizes to the final string count.
|
||||
RETURN_IF_FAILED(SizeTAdd(cchNeeded, cchSource, &cchNeeded));
|
||||
RETURN_IF_FAILED(SizeTAdd(cchNeeded, cchSeperator, &cchNeeded));
|
||||
RETURN_IF_FAILED(SizeTAdd(cchNeeded, cchSeparator, &cchNeeded));
|
||||
RETURN_IF_FAILED(SizeTAdd(cchNeeded, cchTarget, &cchNeeded));
|
||||
RETURN_IF_FAILED(SizeTAdd(cchNeeded, cchNull, &cchNeeded));
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ void Alias::s_ClearCmdExeAliases()
|
|||
LPWSTR AliasesBufferPtrW = aliasBuffer.has_value() ? aliasBuffer.value().data() : nullptr;
|
||||
size_t cchTotalLength = 0; // accumulate the characters we need/have copied as we walk the list
|
||||
|
||||
// Each of the alises will be made up of the source, a separator, the target, then a null character.
|
||||
// Each of the aliases will be made up of the source, a separator, the target, then a null character.
|
||||
// They are of the form "Source=Target" when returned.
|
||||
size_t const cchNull = 1;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class SCREEN_INFORMATION;
|
|||
class ConsoleImeInfo final
|
||||
{
|
||||
public:
|
||||
// IME compositon string information
|
||||
// IME composition string information
|
||||
// There is one "composition string" per line that must be rendered on the screen
|
||||
std::vector<ConversionAreaInfo> ConvAreaCompStr;
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ void TestGetConsoleAliasHelper(TCH* ptszSourceGiven,
|
|||
|
||||
// For some reason, the console API *ALWAYS* says it needs enough space as if we were copying Unicode,
|
||||
// even if the final result will be ANSI.
|
||||
// Therefore, if we're mathing based on a char size buffer, multiple the expected result by 2.
|
||||
// Therefore, if we're matching based on a char size buffer, multiply the expected result by 2.
|
||||
#pragma warning(suppress : 4127) // This is a constant, but conditionally compiled twice so we need the check.
|
||||
if (1 == sizeof(TCH))
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ void BufferTests::TestCookedReadOnNonShareableScreenBuffer()
|
|||
|
||||
Log::Comment(L"Create alternate buffer that is read/writeable but not shareable.");
|
||||
const auto otherBuffer = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
|
||||
0, // This says non-sharable
|
||||
0, // This says non-shareable
|
||||
nullptr,
|
||||
CONSOLE_TEXTMODE_BUFFER,
|
||||
nullptr);
|
||||
|
|
|
@ -154,6 +154,6 @@ void CursorTests::TestSetConsoleCursorPosition()
|
|||
// Try several cases
|
||||
TestSetConsoleCursorPositionImpl(0, 0, TRUE); // Top left corner of buffer
|
||||
TestSetConsoleCursorPositionImpl(sbiInitial.dwSize.X - 1, sbiInitial.dwSize.Y - 1, TRUE); // Bottom right corner of buffer
|
||||
TestSetConsoleCursorPositionImpl(sbiInitial.dwSize.X, sbiInitial.dwSize.Y, FALSE); // 1 beyond bottom right corner (the size is 1 larger than the array indicies)
|
||||
TestSetConsoleCursorPositionImpl(sbiInitial.dwSize.X, sbiInitial.dwSize.Y, FALSE); // 1 beyond bottom right corner (the size is 1 larger than the array indices)
|
||||
TestSetConsoleCursorPositionImpl(MAXWORD, MAXWORD, FALSE); // Max values
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ void InputTests::TestReadConsolePasswordScenario()
|
|||
// Scenario inspired by net use's password capture code.
|
||||
HANDLE const hIn = GetStdHandle(STD_INPUT_HANDLE);
|
||||
|
||||
// 1. Set up our mode to be raw input (mimicing method used by "net use")
|
||||
// 1. Set up our mode to be raw input (mimicking method used by "net use")
|
||||
DWORD mode = ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT;
|
||||
GetConsoleMode(hIn, &mode);
|
||||
|
||||
|
@ -347,7 +347,7 @@ void InputTests::TestReadConsolePasswordScenario()
|
|||
|
||||
VERIFY_WIN32_BOOL_SUCCEEDED_RETURN(PostMessageW(GetConsoleWindow(), WM_KEYDOWN, VK_RETURN, 0));
|
||||
|
||||
// 3. Set up our read loop (mimicing password capture methodology from "net use" command.)
|
||||
// 3. Set up our read loop (mimicking password capture methodology from "net use" command.)
|
||||
size_t const buflen = (cBuffer / 2) + 1; // key down and key up will be coalesced into one.
|
||||
wistd::unique_ptr<wchar_t[]> buf = wil::make_unique_nothrow<wchar_t[]>(buflen);
|
||||
size_t len = 0;
|
||||
|
|
|
@ -491,7 +491,7 @@ void OutputTests::WriteBackspaceTest()
|
|||
// Get output buffer information.
|
||||
const auto hOut = GetStdOutputHandle();
|
||||
Log::Comment(NoThrowString().Format(
|
||||
L"Outputing \"\\b \\b\" should behave the same as \"\b\", \" \", \"\b\" in seperate WriteConsoleW calls."));
|
||||
L"Outputting \"\\b \\b\" should behave the same as \"\b\", \" \", \"\b\" in separate WriteConsoleW calls."));
|
||||
|
||||
DWORD n = 0;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi = { 0 };
|
||||
|
|
|
@ -461,7 +461,7 @@ void DbcsWriteRead::SendOutput(const HANDLE hOut,
|
|||
}
|
||||
|
||||
// This is the stated size of the buffer we're passing.
|
||||
// This console API can treat the buffer as a 2D array. We're only doing 1 dimension so the Y is 1 and the X is the number of CHAR_INFO charcters.
|
||||
// This console API can treat the buffer as a 2D array. We're only doing 1 dimension so the Y is 1 and the X is the number of CHAR_INFO characters.
|
||||
COORD coordBufferSize = { 0 };
|
||||
coordBufferSize.Y = 1;
|
||||
coordBufferSize.X = cChars;
|
||||
|
|
|
@ -13,7 +13,7 @@ static PCWSTR c_pwszLowIntegrity = L"Low Integrity";
|
|||
static PCWSTR c_pwszMedIntegrity = L"Medium Integrity";
|
||||
static PCWSTR c_pwszHighIntegrity = L"High Integrity";
|
||||
static PCWSTR c_pwszSysIntegrity = L"System Integrity";
|
||||
static PCWSTR c_pwszUnkIntegrity = L"UNKNOWN INTEGIRTY";
|
||||
static PCWSTR c_pwszUnkIntegrity = L"UNKNOWN INTEGRITY";
|
||||
|
||||
static void s_ExpandAnyEnvStrings(_Inout_ std::unique_ptr<wchar_t[]>& cmdline)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Conhost.UIA.Tests
|
|||
IntPtr handle = app.GetStdOutHandle();
|
||||
Verify.IsNotNull(handle, "Ensure we have the output handle.");
|
||||
|
||||
Log.Comment("Set up the window so the buffer is larger than the window. Retreive existing properties then set the viewport to smaller than the buffer.");
|
||||
Log.Comment("Set up the window so the buffer is larger than the window. Retrieve existing properties then set the viewport to smaller than the buffer.");
|
||||
|
||||
WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX info = app.GetScreenBufferInfo(handle);
|
||||
|
||||
|
@ -125,7 +125,7 @@ namespace Conhost.UIA.Tests
|
|||
case ScrollDir.Horizontal:
|
||||
// Scrolling "negative" horizontally is pushing the wheel left which makes lines move left.
|
||||
// This means that if you scroll left, before = 3 and after = 0. 0 - 3 = -3.
|
||||
// The - sign of the detal here then alighs with the left = negative rule.
|
||||
// The - sign of the delta here then aligns with the left = negative rule.
|
||||
deltaActual = afterScroll.srWindow.Left - beforeScroll.srWindow.Left;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -300,7 +300,7 @@ namespace Conhost.UIA.Tests
|
|||
|
||||
Globals.WaitForTimeout(); // must wait after mouse operation. No good waiters since we have no UI objects
|
||||
|
||||
flagsExpected |= WinCon.CONSOLE_SELECTION_INFO_FLAGS.CONSOLE_SELECTION_IN_PROGRESS; // a selection is occuring
|
||||
flagsExpected |= WinCon.CONSOLE_SELECTION_INFO_FLAGS.CONSOLE_SELECTION_IN_PROGRESS; // a selection is occurring
|
||||
flagsExpected |= WinCon.CONSOLE_SELECTION_INFO_FLAGS.CONSOLE_MOUSE_SELECTION; // it's a "Select" mode not "Mark" mode selection
|
||||
flagsExpected |= WinCon.CONSOLE_SELECTION_INFO_FLAGS.CONSOLE_MOUSE_DOWN; // the mouse is still down
|
||||
flagsExpected |= WinCon.CONSOLE_SELECTION_INFO_FLAGS.CONSOLE_SELECTION_NOT_EMPTY; // mouse selections are never empty. minimum 1x1
|
||||
|
|
|
@ -1502,7 +1502,7 @@ void DoSrvPrivateAllowCursorBlinking(SCREEN_INFORMATION& screenInfo, const bool
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - A private API call for swaping to the main screen buffer. From the
|
||||
// - A private API call for swapping to the main screen buffer. From the
|
||||
// alternate buffer, returns to the main screen buffer. From the main
|
||||
// screen buffer, does nothing. The alternate is discarded.
|
||||
// Parameters:
|
||||
|
@ -2081,7 +2081,7 @@ void DoSrvPrivateSetDefaultTabStops()
|
|||
|
||||
// Routine Description:
|
||||
// - internal logic for adding or removing lines in the active screen buffer
|
||||
// this also moves the cursor to the left margin, which is expected behaviour for IL and DL
|
||||
// this also moves the cursor to the left margin, which is expected behavior for IL and DL
|
||||
// Parameters:
|
||||
// - count - the number of lines to modify
|
||||
// - insert - true if inserting lines, false if deleting lines
|
||||
|
|
|
@ -716,7 +716,7 @@ bool InputBuffer::_CoalesceMouseMovedEvents(_Inout_ std::deque<std::unique_ptr<I
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - checks two KeyEvents to see if they're similiar enough to be coalesced
|
||||
// - checks two KeyEvents to see if they're similar enough to be coalesced
|
||||
// Arguments:
|
||||
// - a - the first KeyEvent
|
||||
// - b - the other KeyEvent
|
||||
|
|
|
@ -506,7 +506,7 @@ void CloseConsoleProcessState()
|
|||
// Jiggle the handle: (see MSFT:19419231)
|
||||
// When we call this function, we'll only actually close the console once
|
||||
// we're totally unlocked. If our caller has the console locked, great,
|
||||
// we'll displatch the ctrl event once they unlock. However, if they're
|
||||
// we'll dispatch the ctrl event once they unlock. However, if they're
|
||||
// not running under lock (eg PtySignalInputThread::_GetData), then the
|
||||
// ctrl event will never actually get dispatched.
|
||||
// So, lock and unlock here, to make sure the ctrl event gets handled.
|
||||
|
|
|
@ -241,7 +241,7 @@ bool ConhostInternalGetSet::PrivateBoldText(const bool bolded)
|
|||
// - Retrieves the currently active ExtendedAttributes. See also
|
||||
// DoSrvPrivateGetExtendedTextAttributes
|
||||
// Arguments:
|
||||
// - attrs: Recieves the ExtendedAttributes value.
|
||||
// - attrs: Receives the ExtendedAttributes value.
|
||||
// Return Value:
|
||||
// - true if successful (see DoSrvPrivateGetExtendedTextAttributes). false otherwise.
|
||||
bool ConhostInternalGetSet::PrivateGetExtendedTextAttributes(ExtendedAttributes& attrs)
|
||||
|
@ -731,7 +731,7 @@ bool ConhostInternalGetSet::PrivateWriteConsoleControlInput(const KeyEvent key)
|
|||
// Routine Description:
|
||||
// - Connects the GetConsoleOutputCP API call directly into our Driver Message servicing call inside Conhost.exe
|
||||
// Arguments:
|
||||
// - codepage - recieves the outputCP of the console.
|
||||
// - codepage - receives the outputCP of the console.
|
||||
// Return Value:
|
||||
// - true if successful (see DoSrvPrivateWriteConsoleControlInput). false otherwise.
|
||||
bool ConhostInternalGetSet::GetConsoleOutputCP(unsigned int& codepage)
|
||||
|
@ -770,7 +770,7 @@ bool ConhostInternalGetSet::SetCursorColor(const COLORREF cursorColor)
|
|||
// Routine Description:
|
||||
// - Connects the IsConsolePty call directly into our Driver Message servicing call inside Conhost.exe
|
||||
// Arguments:
|
||||
// - isPty: recieves the bool indicating whether or not we're in pty mode.
|
||||
// - isPty: receives the bool indicating whether or not we're in pty mode.
|
||||
// Return Value:
|
||||
// - true if successful (see DoSrvIsConsolePty). false otherwise.
|
||||
bool ConhostInternalGetSet::IsConsolePty(bool& isPty) const
|
||||
|
|
|
@ -283,7 +283,7 @@ void Registry::LoadFromRegistry(_In_ PCWSTR const pwszConsoleTitle)
|
|||
// then make sure code page value when East Asian environment.
|
||||
// If code page value does not the same to OEMCP and any EA's code page then
|
||||
// we are override code page value to OEMCP on default console property.
|
||||
// Because, East Asian environment has limitation that doesn not switch to
|
||||
// Because, East Asian environment has limitation that does not switch to
|
||||
// another EA's code page by the SetConsoleCP/SetConsoleOutputCP.
|
||||
//
|
||||
// Compare of pwszConsoleTitle and L"" has limit to default property of console.
|
||||
|
|
|
@ -161,7 +161,7 @@ Viewport SCREEN_INFORMATION::GetBufferSize() const
|
|||
// Scrolling mode, this will return our Y dimension as only extending up to
|
||||
// the _virtualBottom. The height of the returned viewport would then be
|
||||
// (number of lines in scrollback) + (number of lines in viewport).
|
||||
// If we're not in teminal scrolling mode, this will return our normal buffer
|
||||
// If we're not in terminal scrolling mode, this will return our normal buffer
|
||||
// size.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
|
@ -1802,9 +1802,9 @@ const SCREEN_INFORMATION& SCREEN_INFORMATION::GetMainBuffer() const
|
|||
// machine with the main buffer it belongs to.
|
||||
// TODO: MSFT:19817348 Don't create alt screenbuffer's via an out SCREEN_INFORMATION**
|
||||
// Parameters:
|
||||
// - ppsiNewScreenBuffer - a pointer to recieve the newly created buffer.
|
||||
// - ppsiNewScreenBuffer - a pointer to receive the newly created buffer.
|
||||
// Return value:
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error.
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error.
|
||||
[[nodiscard]] NTSTATUS SCREEN_INFORMATION::_CreateAltBuffer(_Out_ SCREEN_INFORMATION** const ppsiNewScreenBuffer)
|
||||
{
|
||||
// Create new screen buffer.
|
||||
|
@ -1853,7 +1853,7 @@ const SCREEN_INFORMATION& SCREEN_INFORMATION::GetMainBuffer() const
|
|||
// Parameters:
|
||||
// - None
|
||||
// Return value:
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error.
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error.
|
||||
[[nodiscard]] NTSTATUS SCREEN_INFORMATION::UseAlternateScreenBuffer()
|
||||
{
|
||||
CONSOLE_INFORMATION& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
|
||||
|
@ -1900,7 +1900,7 @@ const SCREEN_INFORMATION& SCREEN_INFORMATION::GetMainBuffer() const
|
|||
// Parameters:
|
||||
// - None
|
||||
// Return value:
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error.
|
||||
// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error.
|
||||
void SCREEN_INFORMATION::UseMainScreenBuffer()
|
||||
{
|
||||
CONSOLE_INFORMATION& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
|
||||
|
@ -2306,7 +2306,7 @@ void SCREEN_INFORMATION::SetViewport(const Viewport& newViewport,
|
|||
// - Sets up the Output state machine to be in pty mode. Sequences it doesn't
|
||||
// understand will be written to the pTtyConnection passed in here.
|
||||
// Arguments:
|
||||
// - pTtyConnection: This is a TerminaOutputConnection that we can write the
|
||||
// - pTtyConnection: This is a TerminalOutputConnection that we can write the
|
||||
// sequence we didn't understand to.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
|
@ -2699,7 +2699,7 @@ const FontInfo& SCREEN_INFORMATION::GetCurrentFont() const noexcept
|
|||
// Method Description:
|
||||
// - Gets the desired font of the screen buffer. If we try loading this font and
|
||||
// have to fallback to another, then GetCurrentFont()!=GetDesiredFont().
|
||||
// We store this seperately, so that if we need to reload the font, we can
|
||||
// We store this separately, so that if we need to reload the font, we can
|
||||
// try again with our prefered font info (in the desired font info) instead
|
||||
// of re-using the looked up value from before.
|
||||
// Arguments:
|
||||
|
|
|
@ -35,7 +35,7 @@ Selection& Selection::Instance()
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Detemines the line-by-line selection rectangles based on global selection state.
|
||||
// - Determines the line-by-line selection rectangles based on global selection state.
|
||||
// Arguments:
|
||||
// - selectionRect - The selection rectangle outlining the region to be selected
|
||||
// - selectionAnchor - The corner of the selection rectangle that selection started from
|
||||
|
@ -140,7 +140,7 @@ std::vector<SMALL_RECT> Selection::s_GetSelectionRects(const SMALL_RECT& selecti
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Detemines the line-by-line selection rectangles based on global selection state.
|
||||
// - Determines the line-by-line selection rectangles based on global selection state.
|
||||
// Arguments:
|
||||
// - <none> - Uses internal state to know what area is selected already.
|
||||
// Return Value:
|
||||
|
|
|
@ -247,17 +247,17 @@ COORD Selection::WordByWordSelection(const bool fReverse,
|
|||
// - Then we want to keep going UNTIL (!) we move from a delimiter (fPrevIsDelim) to a normal character (!fCurrIsDelim)
|
||||
// This will then eat up all delimiters after a word and stop once we reach the first letter of the next word.
|
||||
// If we're going Right to Left (fReverse)...
|
||||
// - Then we want to keep going UNTIL (!) we move from a normal character (!fPrevIsDelim) to a delimeter (fCurrIsDelim)
|
||||
// - Then we want to keep going UNTIL (!) we move from a normal character (!fPrevIsDelim) to a delimiter (fCurrIsDelim)
|
||||
// This will eat up all letters of the word and stop once we see the delimiter before the word.
|
||||
} while (!fReverse ? !(fPrevIsDelim && !fCurrIsDelim) : !(!fPrevIsDelim && fCurrIsDelim));
|
||||
|
||||
// To stop the loop, we had to move the cursor one too far to figure out that the delta occurred from delimeter to not (or vice versa)
|
||||
// To stop the loop, we had to move the cursor one too far to figure out that the delta occurred from delimiter to not (or vice versa)
|
||||
// Therefore move back by one character after proceeding through the loop.
|
||||
// EXCEPT:
|
||||
// 1. If we broke out of the loop by reaching the beginning of the buffer, leave it alone.
|
||||
// 2. If we're un-highlighting a region, also leave it alone.
|
||||
// This is an oddity that occurs because our cursor is on a character, not between two characters like most text editors.
|
||||
// We want the current position to be ON the first letter of the word (or the last delimeter after the word) so it stays highlighted.
|
||||
// We want the current position to be ON the first letter of the word (or the last delimiter after the word) so it stays highlighted.
|
||||
if (fMoveSucceeded && !fUnhighlighting)
|
||||
{
|
||||
if (!fReverse)
|
||||
|
|
|
@ -98,7 +98,7 @@ bool Selection::IsAreaSelected() const
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Determines whether mark mode specifically started this selction.
|
||||
// - Determines whether mark mode specifically started this selection.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
|
@ -211,7 +211,7 @@ SMALL_RECT Selection::GetSelectionRectangle() const noexcept
|
|||
}
|
||||
|
||||
// Routine Description:
|
||||
// - Gets the publically facing set of selection flags.
|
||||
// - Gets the publicly facing set of selection flags.
|
||||
// Strips out any internal flags in use.
|
||||
// Arguments:
|
||||
// - none
|
||||
|
|
|
@ -537,7 +537,7 @@ void Settings::SetPopupFillAttribute(const WORD wPopupFillAttribute)
|
|||
|
||||
// Do not allow the default popup fill attribute to use any attrs other than fg/bg colors.
|
||||
// This prevents us from accidentally inverting everything or suddenly drawing lines
|
||||
// everywhere by defualt.
|
||||
// everywhere by default.
|
||||
WI_ClearAllFlags(_wPopupFillAttribute, ~(FG_ATTRS | BG_ATTRS));
|
||||
}
|
||||
|
||||
|
@ -943,7 +943,7 @@ COLORREF Settings::CalculateDefaultBackground() const noexcept
|
|||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the foregroud color of a particular text attribute, using our color
|
||||
// - Get the foreground color of a particular text attribute, using our color
|
||||
// table, and our configured default attributes.
|
||||
// Arguments:
|
||||
// - attr: the TextAttribute to retrieve the foreground color of.
|
||||
|
|
|
@ -447,7 +447,7 @@ PWSTR TranslateConsoleTitle(_In_ PCWSTR pwszConsoleTitle, const BOOL fUnexpand,
|
|||
|
||||
// Routine Description:
|
||||
// - This routine reads the connection information from a 'connect' IO, validates it and stores them in an internal format.
|
||||
// - N.B. The internal informat contains information not sent by clients in their connect IOs and intialized by other routines.
|
||||
// - N.B. The internal connection contains information not sent by clients in their connect IOs and initialized by other routines.
|
||||
// Arguments:
|
||||
// - Server - Supplies a handle to the console server.
|
||||
// - Message - Supplies the message representing the connect IO.
|
||||
|
|
|
@ -31,7 +31,7 @@ Telemetry::Telemetry() :
|
|||
// Start at position 1, since the first 2 bytes contain the number of strings.
|
||||
_iProcessFileNamesNext(1),
|
||||
_iProcessConnectedCurrently(SIZE_MAX),
|
||||
_rgiProccessFileNameIndex(),
|
||||
_rgiProcessFileNameIndex(),
|
||||
_rguiProcessFileNamesCount(),
|
||||
_rgiAlphabeticalIndex(),
|
||||
_rguiProcessFileNamesCodesCount(),
|
||||
|
@ -252,7 +252,7 @@ bool Telemetry::FindProcessName(const WCHAR* pszProcessName, _Out_ size_t* iPosi
|
|||
iMid = (iMax + iMin) / 2;
|
||||
// Use a case-insensitive comparison. We do support running Linux binaries now, but we haven't seen them connect
|
||||
// as processes, and even if they did, we don't care about the difference in running emacs vs. Emacs.
|
||||
result = _wcsnicmp(pszProcessName, _wchProcessFileNames + _rgiProccessFileNameIndex[_rgiAlphabeticalIndex[iMid]], MAX_PATH);
|
||||
result = _wcsnicmp(pszProcessName, _wchProcessFileNames + _rgiProcessFileNameIndex[_rgiAlphabeticalIndex[iMid]], MAX_PATH);
|
||||
if (result < 0)
|
||||
{
|
||||
iMax = iMid - 1;
|
||||
|
@ -335,7 +335,7 @@ void Telemetry::LogProcessConnected(const HANDLE hProcess)
|
|||
|
||||
// Now point to the string, and set the count to 1.
|
||||
_rgiAlphabeticalIndex[iFileName] = _uiNumberProcessFileNames;
|
||||
_rgiProccessFileNameIndex[_uiNumberProcessFileNames] = _iProcessFileNamesNext;
|
||||
_rgiProcessFileNameIndex[_uiNumberProcessFileNames] = _iProcessFileNamesNext;
|
||||
_rguiProcessFileNamesCount[_uiNumberProcessFileNames] = 1;
|
||||
_iProcessFileNamesNext += wcslen(pwszFileName) + 1;
|
||||
_iProcessConnectedCurrently = _uiNumberProcessFileNames++;
|
||||
|
|
|
@ -152,7 +152,7 @@ private:
|
|||
// Index for the currently connected process.
|
||||
size_t _iProcessConnectedCurrently;
|
||||
// An array of indexes into the _wchProcessFileNames array, which point to the individual process names.
|
||||
size_t _rgiProccessFileNameIndex[c_iMaxProcessesConnected];
|
||||
size_t _rgiProcessFileNameIndex[c_iMaxProcessesConnected];
|
||||
// Number of times each process has connected to the console.
|
||||
unsigned int _rguiProcessFileNamesCount[c_iMaxProcessesConnected];
|
||||
// To speed up searching the Process Names, create an alphabetically sorted index.
|
||||
|
|
|
@ -117,7 +117,7 @@ class AttrRowTests
|
|||
if (sChainLeftover > 0)
|
||||
{
|
||||
// If we had a leftover, then this chain is one longer than we expected (the default length)
|
||||
// So use it as the index (because indicies start at 0)
|
||||
// So use it as the index (because indices start at 0)
|
||||
TextAttributeRun* pRun = &pChain->_list[_sDefaultChainLength];
|
||||
|
||||
pRun->SetAttributes(_DefaultChainAttr);
|
||||
|
@ -161,7 +161,7 @@ class AttrRowTests
|
|||
// - Packs an array of words representing attributes into the more compact storage form used by the row.
|
||||
// Arguments:
|
||||
// - rgAttrs - Array of words representing the attribute associated with each character position in the row.
|
||||
// - cRowLength - Length of preceeding array.
|
||||
// - cRowLength - Length of preceding array.
|
||||
// - outAttrRun - reference to unique_ptr that will contain packed attr run on success.
|
||||
// Return Value:
|
||||
// - Success if success. Buffer too small if row length is incorrect.
|
||||
|
@ -413,7 +413,7 @@ class AttrRowTests
|
|||
{
|
||||
ch1 = rgch1Options[iCh1Option];
|
||||
|
||||
UINT const uiMaxCh1Length = uiTestRunLength - 1; // leave at least 1 space for the second piece of the inser trun.
|
||||
UINT const uiMaxCh1Length = uiTestRunLength - 1; // leave at least 1 space for the second piece of the insert run.
|
||||
for (UINT iCh1Length = 1; iCh1Length <= uiMaxCh1Length; iCh1Length++)
|
||||
{
|
||||
uiChar1Length = iCh1Length;
|
||||
|
|
|
@ -373,7 +373,7 @@ class CommandLineTests
|
|||
// save current position for later checking
|
||||
const auto endCursorPos = cookedReadData._currentPosition;
|
||||
const auto endBufferPos = cookedReadData._bufPtr;
|
||||
// NOTE: need to initialize the actualy cursor and keep it up to date with the changes here. remove
|
||||
// NOTE: need to initialize the actually cursor and keep it up to date with the changes here. remove
|
||||
once functions are fixed
|
||||
// try to move right, nothing should happen
|
||||
short expectedPos = gsl::narrow<short>(endCursorPos);
|
||||
|
|
|
@ -104,7 +104,7 @@ class CommandNumberPopupTests
|
|||
TEST_METHOD(CanDismissAllPopups)
|
||||
{
|
||||
Log::Comment(L"that that all popups are dismissed when CommandNumberPopup is dismissed");
|
||||
// CommanNumberPopup is the only popup that can act as a 2nd popup. make sure that it dismisses all
|
||||
// CommandNumberPopup is the only popup that can act as a 2nd popup. make sure that it dismisses all
|
||||
// popups when exiting
|
||||
// function to simulate user pressing escape key
|
||||
Popup::UserInputFunction fn = [](COOKED_READ_DATA& /*cookedReadData*/, bool& popupKey, DWORD& modifiers, wchar_t& wch) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue