Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from microsoft:master #2

Open
wants to merge 1,470 commits into
base: master
Choose a base branch
from
Open
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jul 1, 2020

  1. Add settings to warn about large or multiline pastes (#6631)

    Before sending calling the `HandleClipboardData` member function on
    the `PasteFromClipboardEventArgs` object when we receive a request
    from the `TermControl` to send it the clipboard's text content, we
    now display a warning to let the user choose whether to continue or
    not if the text is larger than 5 KiB or contains the _new line_
    character, which can be a security issue if the user is pasting the
    text in a shell.
    
    These warnings can be disabled with the `largePasteWarning` and
    `multiLinePasteWarning` global settings respectively.
    
    Closes #2349
    beviu authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    985f85d View commit details
    Browse the repository at this point in the history
  2. Add tooltip text to Color Buttons (#6498)

    This commit adds tooltip text to every color button in the tab color
    picker.
    garciaolais authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    44e80d4 View commit details
    Browse the repository at this point in the history
  3. fix scheme name resolution, and schema load on WSL (#5327)

    This PR fixes the scheme resolution bug outlined in #5326
    
    The approach is as follows:
    
    * In [SchemeManager.cs], find the first scheme parser that actually
      successfully parses the scheme, as opposed to the existing code, which
      finds the first scheme parser which _says it can parse the scheme_, as
      that logic spuriously returns `true` currently. 
    * In [XmlSchemeParser.cs] and [JsonParser.cs], ensure that the contents
      of the file are read and the contents passed to XmlDocument.LoadXXX,
      as this fails with an UriException on WSL otherwise.
    * Remove `CanParse` as it is superfluous. The check for a valid scheme
      parser should not just check an extension but also if the file exists
      - this is best done by the `ParseScheme` function as it already
      returns null on failure.
    * Add `FileExtension` to the interface because we need it lifted now.
    
    Closes #5326
    johnazariah authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    436fac6 View commit details
    Browse the repository at this point in the history
  4. Add a ShortcutAction for toggling retro terminal effect (#6691)

    Pretty straightforward. `toggleRetroEffect` will work to toggle the
    retro terminal effect on/off. 
    
    * Made possible by contributions from #6551, _and viewers like you_
    zadjii-msft authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    396cbbb View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2020

  1. Don't abort early in VT reset operations if one of the steps fails (#…

    …6763)
    
    The VT reset operations `RIS` and `DECSTR` are implemented as a series
    of steps, each of which could potentially fail. Currently these
    operations abort as soon as an error is detected, which is particularly
    problematic in conpty mode, where some steps deliberately "fail" to
    indicate that they need to be "passed through" to the conpty client. As
    a result, the reset won't be fully executed. This PR changes that
    behaviour, so the error state is recorded for any failures, but the
    subsequent steps are still run.
    
    Originally the structure of these operations was of the form:
    
        bool success = DoSomething();
        if (success)
        {
            success = DoSomethingElse();
        }
    
    But I've now changed the code so it looks more like this:
    
        bool success = DoSomething();
        success = DoSomethingElse() && success;
    
    This means that every one of the steps should execute, regardless of
    whether previous steps were successful, but the final _success_ state
    will only be true if none of the steps has failed.
    
    While this is only really an issue in the conhost code, I've updated
    both the `AdaptDispatch` and `TerminalDispatch` classes, since I thought
    it would be best to have them in sync, and in general this seems like a
    better way to handle multi-step operations anyway.
    
    VALIDATION
    
    I've manually tested the `RIS` escape sequence (`\ec`) in the Windows
    Terminal, and confirmed that it now correctly resets the cursor
    position, which it wasn't doing before.
    
    Closes #6545
    j4james authored Jul 6, 2020
    Configuration menu
    Copy the full SHA
    0651fcf View commit details
    Browse the repository at this point in the history
  2. Add support for the "overline" graphic rendition attribute (#6754)

    ## Summary of the Pull Request
    
    This PR adds support for the `SGR 53` and `SGR 55` escapes sequences,
    which enable and disable the ANSI _overline_ graphic rendition
    attribute, the equivalent of the console character attribute
    `COMMON_LVB_GRID_HORIZONTAL`. When a character is output with this
    attribute set, a horizontal line is rendered at the top of the character
    cell.
    
    ## PR Checklist
    * [x] Closes #6000
    * [x] CLA signed. 
    * [x] Tests added/passed
    * [ ] Documentation updated. 
    * [ ] Schema updated.
    * [x] I've discussed this with core contributors already.
    
    ## Detailed Description of the Pull Request / Additional comments
    
    To start with, I added `SetOverline` and `IsOverlined` methods to the
    `TextAttribute` class, to set and get the legacy
    `COMMON_LVB_GRID_HORIZONTAL` attribute. Technically there was already an
    `IsTopHorizontalDisplayed` method, but I thought it more readable to add
    a separate `IsOverlined` as an alias for that.
    
    Then it was just a matter of adding calls to set and reset the attribute
    in response to the `SGR 53` and `SGR 55` sequences in the
    `SetGraphicsRendition` methods of the two dispatchers. The actual
    rendering was already taken care of by the `PaintBufferGridLines` method
    in the rendering engines.
    
    The only other change required was to update the `_UpdateExtendedAttrs`
    method in the `Xterm256Engine` of the VT renderer, to ensure the
    attribute state would be forwarded to the Windows Terminal over conpty.
    
    ## Validation Steps Performed
    
    I've extended the existing SGR unit tests to cover the new attribute in
    the `AdapterTest`, the `OutputEngineTest`, and the `VtRendererTest`.
    I've also manually tested the `SGR 53` and `SGR 55` sequences to confirm
    that they do actually render (or remove) an overline on the characters
    being output.
    j4james authored Jul 6, 2020
    Configuration menu
    Copy the full SHA
    70a7ccc View commit details
    Browse the repository at this point in the history
  3. Update the shape of our custom NewTab button to match MUX's TabView b…

    …utton (#6766)
    
    The MUX TabView control has a uniquely-shaped [+] button.  TerminalApp
    doesn't use it: instead, it has a SplitView button that is styled to
    look like MUX's official button.  However, it doesn't get the button's
    shape right.  This PR updates TerminalApp's custom button to look more
    like MUX's.
    
    The difference is that MUX only rounds the top two corners, and it uses
    a bigger radius.  Without matching MUX's radius, the upper-left corner
    of the button makes an awkward asymmetric divot with the abutting tab.
    There's also a spot in the lower-left corner that just looks like
    someone accidentally spilled a few pixels on the floor.
    
    Current appearance before this PR:
    ![oldlight](https://user-images.githubusercontent.com/10259764/86410863-74ca5e80-bc70-11ea-8c15-4ae22998b209.png)
    
    New appearance with this PR:
    ![newlight](https://user-images.githubusercontent.com/10259764/86410871-772cb880-bc70-11ea-972c-13332f1a1bdb.png)
    
    Most important deltas highlighted with red circles:
    ![marklight](https://user-images.githubusercontent.com/10259764/86410877-78f67c00-bc70-11ea-8a6d-696cfbd89b1d.png)
    
    
    Note that this PR does *not* attempt to fix the colors.  The colors are
    also just slightly different from what MUX uses.  I'll save that for a
    separate PR, since all those screenshots would clutter this up this PR.
    jtippet authored Jul 6, 2020
    Configuration menu
    Copy the full SHA
    d350a89 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2020

  1. Add some trace logging concerning which schemes are in use (#6803)

    ## Summary of the Pull Request
    
    Let's try and figure out just how many people are actually using Solarized. I emailed @DHowett about this a week ago, but otherwise we don't really have any other tasks for this.
    
    ## PR Checklist
    * [x] I work here
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    ceeaadc View commit details
    Browse the repository at this point in the history
  2. Update colors of our custom NewTab button to match MUX's TabView (#6812)

    Update colors of our custom NewTab button to match MUX's TabView button
    
    MUX has a NewTab button, but Terminal uses a homemade lookalike.  The
    version in Terminal doesn't use the same brush color resources as MUX's
    button, so it looks very slightly different.  This PR updates Terminal's
    button to use the exact same colors that MUX uses.  I literally copied
    these brush names out of MUX source code.
    
    ## References
    This is the color version of the layout fix #6766 
    This is a prerequisite for fixing #5360
    
    ## Detailed Description of the Pull Request / Additional comments
    The real reason that this matters is that once you flip on
    `ApplicationHighContrastAdjustment::None`, the existing colors will not
    work at all.  The existing brushes are themed to black foreground on a
    black background when High Contrast (HC) Black theme is enabled.  The
    only thing that's saving you is
    `ApplicationHighContrastAdjustment::Auto` is automatically backplating
    the glyphs on the buttons, which (by design) hides the fact that the
    colors are poor.  The backplates are those ugly squares inside the
    buttons on the HC themes.
    
    Before I can push a PR that disables automatic backplating (set
    `ApplicationHighContrastAdjustment` to `None`), we'll need to select
    better brushes that work in HC mode.  MUX has already selected brushes
    that work great in all modes, so it just makes sense to use their
    brushes.
    
    The one very subtle difference here is that, for non-HC themes, the
    glyph's foreground has a bit more contrast when the button is in
    hovered/pressed states.  Again this slight difference hardly matters
    now, but using the correct brushes will become critical when we try to
    remove the HC backplating.
    
    Closes #6812
    jtippet authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    4faa104 View commit details
    Browse the repository at this point in the history
  3. Add a spec for output snapping (#2529)

    ## Summary of the Pull Request
    
    This proposes a change to how Terminal will scroll in response to newly
    generated output. The Terminal will scroll upon receiving new output if
    the viewport is at the bottom of the scroll history and no selection is
    active.
    
    This spec also explores the possibility of making this response
    configurable with a `snapOnOutput` profile setting. It also discusses
    the possibility of adding a scroll lock keybinding action.
    
    ## PR Checklist
    * [X] Spec for #980
    carlos-zamora authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    29f0690 View commit details
    Browse the repository at this point in the history
  4. Add actions missing in schema, descriptions for toggleRetroEffect (#…

    …6806)
    
    ## Summary of the Pull Request
    
    In the wake of #6635, a couple things got missed in merges:
    * `toggleRetroEffect` didn't get into the schema, nor did `renameTab` or
      `commandPalette`.
    * `toggleRetroEffect` also didn't get a name
    
    Furthermore, I thought it might be a good idea to start sticking
    commands into `bindings` even without `keys`. So I tried doing that for
    `opentabColorPicker` and `toggleRetroEffect`, and found immediately that
    the labels for the key chord still appear even when the text is empty.
    So I added some XAML magic to hide those when the text is empty.
    
    ## References
    * #6762 
    * #6691
    * #6557 
    * #6635 
    
    ## PR Checklist
    * [x] Closes #6762
    * [x] I work here
    * [x] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    * See also: https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-quickstart#formatting-or-converting-data-values-for-display
      - make sure to switch to C++/WinRT at the top!
    
    ## Validation Steps Performed
    Removed all my manual actions, ran the Terminal:
    ![image](https://user-images.githubusercontent.com/18356694/86652356-f5a79400-bfa9-11ea-9131-5b7d3e835e19.png)
    zadjii-msft authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    5bc31a1 View commit details
    Browse the repository at this point in the history
  5. Update MUX to 2.5.0-prerelease.200609001 (#6819)

    See: https://github.com/microsoft/microsoft-ui-xaml/releases/tag/v2.5.0-prerelease.200609001
    
    > ### Notable Changes:
    > 
    >     Resize tab view items only once the pointer has left the TabViewItem strip (microsoft/microsoft-ui-xaml#2569)
    >     Align TabView visuals with Edge (microsoft/microsoft-ui-xaml#2201)
    >     Fix background of MenuFlyout in white high contrast (microsoft/microsoft-ui-xaml#2446)
    >     TabView: Make TabViewItem consume the TabViewItemHeaderForeground theme resource (microsoft/microsoft-ui-xaml#2348)
    >     TabView: Add tooltips to its scrolling buttons. (microsoft/microsoft-ui-xaml#2369)
    
    
    * [x] Related to #5360 (@jtippet confirms that this alone does not close it.)
    * [x] I work here
    zadjii-msft authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    edd8ac8 View commit details
    Browse the repository at this point in the history
  6. Add some logging regarding command palette usage (#6821)

    ## Summary of the Pull Request
    
    Pretty straightforward. Logs three scenarios:
    * The user opened the command palette (and which mode it was opened in)
    * The user ran a command from the palette
    * The user dismissed the palette without running an action.
    
    We discussed this in team sync yesterday.
    
    ## PR Checklist
    * [x] I work here
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    934ad98 View commit details
    Browse the repository at this point in the history
  7. Allow starting selections from padding area (#6343)

    WinUI's `Margin` and `Padding` work very similarly. `Margin` distances
    ourselves from our parent. Whereas `Padding` distances our children from
    ourselves.
    
    Terminal's `padding` setting is actually implemented by defining
    `Margin` on the SwapChainPanel. This means that the "padding" that is
    created is actually belongs to SwapChainPanel's parent: Grid (not to be
    confused with its parent, "RootGrid").
    
    When a user clicks on the padded area, input goes to Grid. But there's a
    twist: you can't actually hit Grid. To be able to hit Grid, you can't
    just set IsHitTestVisible. You need to set it's Visibility to Visible,
    and it's Background to Transparent (not null) [2].
    
    ## Validation Steps Performed
    
    - [X] Start a selection from the padding area
    - [X] Click on a SearchBox if one is available
       - The SearchBox gets first dibs on the hit test so none gets through
         to the SwapChainPanel
    
    ## References
    [1] https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.ishittestvisible
    [2] https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/events-and-routed-events-overview#hit-testing-and-input-events
    
    Closes #5626
    carlos-zamora authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    63fbd9f View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2020

  1. Make Terminal look great in High Contrast (#6833)

    This PR enables `ApplicationHighContrastAdjustment::None`.  Doing this
    disables a set of mitigations in XAML designed to band-aid apps that
    were never explicitly designed for High Contrast (HC) modes.  Terminal
    now has full control of and responsibility for its appearance in HC
    mode.  This allows Terminal to look a lot better.
    
    On paper, we should be able to set `HighContrastAdjustment="None"` on
    the `<Application>` element.  But that doesn't have any effect.  I don't
    know if this is a bug in `<Toolkit:XamlApplication>` or somewhere else.
    So instead I set the property in codebehind, which is not as ideal, but
    does at least work.  I'd love to a way to move this into App.xaml.
    
    The Find box had a couple stray styles to override the ToggleButton's
    foreground color.  With backplating removed, these styles became
    actively harmful (white foreground on highlight color background), so I
    just removed them.  The built-in style for ToggleButton is perfect
    as-is.
    
    Closes #5360
    jtippet authored Jul 8, 2020
    Configuration menu
    Copy the full SHA
    182a3bb View commit details
    Browse the repository at this point in the history
  2. Avoid copying the bitmap on the way into the tracing function (#6839)

    ## PR Checklist
    * [x] Closes perf itch.
    * [x] I work here.
    * [x] Manual perf test.
    * [x] Documentation irrelevant.
    * [x] Schema irrelevant.
    * [x] Am core contributor.
    
    ## Detailed Description of the Pull Request / Additional comments
    Passes the bitmap by ref into the tracing function instead of making a copy on the way in. It's only read anyway for tracing (if enabled) so the copy was a pointless oversight.
    
    ## Validation Steps Performed
    - Observed WPR trace before and after with `time cat big.txt` in WSL.
    miniksa authored Jul 8, 2020
    Configuration menu
    Copy the full SHA
    99c33e0 View commit details
    Browse the repository at this point in the history
  3. Cache VT buffer line string to avoid (de)alloc on every paint (#6840)

    A lot of time was spent between each individual line in the VT paint
    engine in allocating some scratch space to assemble the clusters then
    deallocating it only to have the next line do that again. Now we just
    hold onto that memory space since it should be approximately the size of
    a single line wide and will be used over and over and over as painting
    continues.
    
    ## Validation Steps Performed
    - Run `time cat big.txt` under WPR. Checked before and after perf
      metrics.
    miniksa authored Jul 8, 2020
    Configuration menu
    Copy the full SHA
    91f9211 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2020

  1. Fix the build in VS 2019 16.7 (#6838)

    The main change in 16.7 is the separation of `AppContainerApplication`
    into `WindowsStoreApp` and `WindowsAppContainer`. There's been a bit of
    interest in splitting packaging away from containment, and this is the
    first step in that direction.
    
    We're a somewhat unique application, but as WinUI3 becomes more
    prevalent we will become _less_ unique.
    
    Some of these things, I've looked at and wondered how they ever worked.
    
    ## PR Checklist
    * [x] Closes nothing
    
    ## Validation Steps Performed
    Built locally and in CI. Tested the generated package with the package tester. Built on 16.6 and seen that it still seems to work.
    DHowett authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    313568d View commit details
    Browse the repository at this point in the history
  2. Cache the size viewport structure inside TextBuffer (#6841)

    Looking up the size of the viewport from the underlying dimensions of
    the structures seemed like a good idea at the time (so it would only be
    in one place), but it turns out to be more of a perf cost than we
    expected. Not necessarily on any one hot path, but if we sort by
    functions in WPR, it was the top consumer on the Terminal side. This
    instead saves the size as a member of the `TextBuffer` and serves that
    out. It only changes when it is constructed or resized traditionally, so
    it's easy to update/keep track of. It impacted conhost/conpty to a
    lesser degree but was still noticeable.
    
    ## Validation Steps Performed
    - Run `time cat big.txt` under WPR. Checked before and after perf
      metrics.
    
    ## PR Checklist
    * [x] Closes perf itch
    * [x] I work here
    * [x] Manual test
    * [x] Documentation irrelevant.
    * [x] Schema irrelevant.
    * [x] Am core contributor.
    miniksa authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    9e44df0 View commit details
    Browse the repository at this point in the history
  3. Implement preventing auto-scroll on new output (#6062)

    ## Summary of the Pull Request
    Updates the Terminal's scroll response to new output. The Terminal will not automatically scroll if...
    - a selection is active, or
    - the viewport is at the bottom of the scroll history
    
    ## References
    #2529 - Spec
    #3863 - Implementation
    
    ## PR Checklist
    * [X] Closes #980
    * [X] Closes #3863
    * [ ] Tests added/passed
    * [ ] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    Updates the `_scrollOffset` value properly in TerminalCore when the cursor moves. We calculate a new `_scrollOffset` based on if we are circling the buffer and how far below the mutable bottom is.
    
    We specifically check for if a selection is active and if the viewport is at the bottom, then use that as a condition for deciding if we should update `_scrollOffset` to the new calculated value or 0 (the bottom of the scroll history).
    
    ## Validation Steps Performed
    Manual testing. Though I should add automated tests.
    - [X] new output
    - [X] new output when circling
    - [X] new output when circling and viewport is at the top
    carlos-zamora authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    9e26c02 View commit details
    Browse the repository at this point in the history
  4. Add support for DECSCNM in Windows Terminal (#6809)

    ## Summary of the Pull Request
    
    This PR adds full support for the `DECSCNM` reverse screen mode in the Windows Terminal to align with the implementation in conhost.
    
    ## References
    
    * The conhost implementation of `DECSCNM` was in PR #3817.
    * WT originally inherited that functionality via the colors being passed through, but that behaviour was lost in PR #6506.
    
    ## PR Checklist
    * [x] Closes #6622
    * [x] CLA signed.
    * [ ] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #6622
    
    ## Detailed Description of the Pull Request / Additional comments
    
    The `AdaptDispatch::SetScreenMode` now checks if it's in conpty mode and simply returns false to force a pass-through of the mode change. And the `TerminalDispatch` now has its own `SetScreenMode` implementation that tracks any changes to the reversed state, and triggers a redraw in the renderer.
    
    To make the renderer work, we just needed to update the `GetForegroundColor` and `GetBackgroundColor` methods of the terminal's `IRenderData` implementation to check the reversed state, and switch the colors being calculated, the same way the `LookupForegroundColor` and `LookupBackgroundColor` methods work in the conhost `Settings` class.
    
    ## Validation Steps Performed
    
    I've manually tested the `DECSCNM` functionality for Windows Terminal in Vttest, and also with some of my own test scripts.
    j4james authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    695ebff View commit details
    Browse the repository at this point in the history
  5. Account for WHEEL_DELTA when dispatching VT mouse wheel events (#6843)

    By storing up the accumulated delta in the mouse input handler, we can
    enlighten both conhost and terminal about wheel events that are less
    than one line in size. Previously, we had a workaround in conhost that
    clamped small scroll deltas to a whole line, which made trackpad
    scrolling unimaginably fast. Terminal didn't make this mistake, but it
    also didn't handle delta accumulation . . . which resulted in the same
    behavior.
    
    MouseInput will now wait until it's received WHEEL_DELTA (well-known
    constant, value 120) worth of scrolling delta before it dispatches a
    single scroll event.
    
    Future considerations may include sending multiple wheel button events
    for every *multiple* of WHEEL_DELTA, but that would be a slightly larger
    refactoring that I'm not yet ready to undertake.
    
    There's a chance that we should be dividing WHEEL_DELTA by the system's
    "number of lines to scroll at once" setting, because on trackpads
    conhost now scrolls a little _slow_. I think the only way to determine
    whether this is palatable is to just ship it.
    
    Fixes #6184.
    DHowett authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    fc08329 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Reintroduce a color compatibility hack, but only for PowerShells (#6810)

    There is going to be a very long tail of applications that will
    explicitly request VT SGR 40/37 when what they really want is to
    SetConsoleTextAttribute() with a black background/white foreground.
    Instead of making those applications look bad (and therefore making us
    look bad, because we're releasing this as an update to something that
    "looks good" already), we're introducing this compatibility quirk.
    Before the color reckoning in #6698 + #6506, *every* color was subject
    to being spontaneously and erroneously turned into the default color.
    Now, only the 16-color palette value that matches the active console
    background/foreground color will be destroyed, and only when received
    from specific applications.
    
    Removal will be tracked by #6807.
    
    Michael and I discussed what layer this quirk really belonged in. I
    originally believed it would be sufficient to detect a background color
    that matched the legacy default background, but @j4james provided an
    example of where that wouldn't work out (powershell setting the
    foreground color to white/gray). In addition, it was too heavyhanded: it
    re-broke black backgrounds for every application.
    
    Michael thought that it should live in the server, as a small VT parser
    that righted the wrongs coming directly out of the application. On
    further investigation, however, I realized that we'd need to push more
    information up into the server (so that it could make the decision about
    which VT was wrong and which was right) than should be strictly
    necessary.
    
    The host knows which colors are right and wrong, and it gets final say
    in what ends up in the buffer.
    
    Because of that, I chose to push the quirk state down through
    WriteConsole to DoWriteConsole and toggle state on the
    SCREEN_INFORMATION that indicates whether the colors coming out of the
    application are to be distrusted. This quirk _only applies to pwsh.exe
    and powershell.exe._
    
    NOTE: This doesn't work for PowerShell the .NET Global tool, because it
    is run as an assembly through dotnet.exe. I have no opinion on how to
    fix this, or whether it is worth fixing.
    
    VALIDATION
    ----------
    I configured my terminals to have an incredibly garish color scheme to
    show exactly what's going to happen as a result of this. The _default
    terminal background_ is purple or red, and the foreground green. I've
    printed out a heap of test colors to see how black interacts with them.
    
    Pull request #6810 contains the images generated from this test.
    
    The only color lines that change are the ones where black as a
    background or white as a foreground is selected out of the 16-color
    palette explicitly. Reverse video still works fine (because black is in
    the foreground!), and it's even possible to represent "black on default"
    and reverse it into "default on black", despite the black in question
    having been `40`.
    
    Fixes #6767.
    DHowett authored Jul 10, 2020
    Configuration menu
    Copy the full SHA
    1bf4c08 View commit details
    Browse the repository at this point in the history
  2. Refactor the renderer color calculations (#6853)

    This is a refactoring of the renderer color calculations to simplify the
    implementation, and to make it easier to support additional
    color-altering rendition attributes in the future (e.g. _faint_ and
    _conceal_).
    
    ## References
    
    * This is a followup to PRs #3817 and #6809, which introduced additional
      complexity in the color calculations, and which suggested the need for
      refactoring. 
    
    ## Detailed Description of the Pull Request / Additional comments
    
    When we added support for `DECSCNM`, that required the foreground and
    background color lookup methods to be able to return the opposite of
    what was requested when the reversed mode was set. That made those
    methods unnecessarily complicated, and I thought we could simplify them
    considerably just by combining the calculations into a single method
    that derived both colors at the same time.
    
    And since both conhost and Windows Terminal needed to perform the same
    calculations, it also made sense to move that functionality into the
    `TextAttribute` class, where it could easily be shared.
    
    In general this way of doing things is a bit more efficient. However, it
    does result in some unnecessary work when only one of the colors is
    required, as is the case for the gridline painter. So to make that less
    of an issue, I've reordered the gridline code a bit so it at least
    avoids looking up the colors when no gridlines are needed.
    
    ## Validation Steps Performed
    
    Because of the API changes, quite a lot of the unit tests had to be
    updated. For example instead of verifying colors with two separate calls
    to `LookupForegroundColor` and `LookupBackgroundColor`, that's now
    achieved with a single `LookupAttributeColors` call, comparing against a
    pair of values. The specifics of the tests haven't changed though, and
    they're all still working as expected.
    
    I've also manually confirmed that the various color sequences and
    rendition attributes are rendering correctly with the new refactoring.
    j4james authored Jul 10, 2020
    Configuration menu
    Copy the full SHA
    3388a48 View commit details
    Browse the repository at this point in the history
  3. Add support for DA2 and DA3 device attributes reports (#6850)

    This PR adds support for the `DA2` (Secondary Device Attributes) and
    `DA3` (Tertiary Device Attributes) escape sequences, which are standard
    VT queries reporting basic information about the terminal.
    
    The _Secondary Device Attributes_ response is made up of a number of
    parameters:
    1. An identification code, for which I've used 0 to indicate that we
       have the capabilities of a VT100 (using code 0 for this is an XTerm
       convention, since technically DA2 would not have been supported by a
       VT100).
    2. A firmware revision level, which some terminal emulators use to
       report their actual version number, but I thought it best we just
       hardcode a value of 10 (the DEC convention for 1.0).
    3. Additional hardware options, which tend to be device specific, but
       I've followed the convention of the later DEC terminals using 1 to
       indicate the presence of a PC keyboard.
    
    The _Tertiary Device Attributes_ response was originally used to provide
    a unique terminal identification code, and which some terminal emulators
    use as a way to identify themselves. However, I think that's information
    we'd probably prefer not to reveal, so I've followed the more common
    practice of returning all zeros for the ID.
    
    In terms of implementation, the only complication was the need to add an
    additional code path in the `OutputStateMachine` to handle the `>` and
    `=` intermediates (technically private parameter prefixes) that these
    sequences require. I've done this as a single method - rather than one
    for each prefix - since I think that makes the code easier to follow.
    
    VALIDATION
    ----------
    
    I've added output engine tests to make sure the sequences are dispatched
    correctly, and adapter tests to confirm that they are returning the
    responses we expect. I've also manually confirmed that they pass the
    _Test of terminal reports_ in Vttest.
    
    Closes #5836
    j4james authored Jul 10, 2020
    Configuration menu
    Copy the full SHA
    53b224b View commit details
    Browse the repository at this point in the history
  4. Build and ship an actual binary named wt that just launches WT (#6860)

    Due to a shell limitation, Ctrl+Shift+Enter will not launch Windows
    Terminal as Administrator. This is caused by the app execution alias and
    the actual targeted executable not having the same name.
    
    In addition, PowerShell has an issue detecting app execution aliases as
    GUI/TUI applications. When you run wt from PowerShell, the shell will
    wait for WT to exit before returning to the prompt. Having a shim that
    immediately re-executes WindowsTerminal and then returns handily knocks
    this issue out (as the process that PS was waiting for exits
    immediately.)
    
    This could cause a regression for anybody who tries to capture the PID
    of wt.exe. Our process tree is not an API, and we have offered no
    consistency guarantee on it.
    
    VALIDATION
    ----------
    
    Tested manual launch in a number of different scenarios:
    
    * [x] start menu "wtd"
    * [x] start menu tile
    * [x] powertoys run
    * [x] powertoys run ctrl+shift (admin)
    * [x] powershell inbox, "core"
    * [x] cmd
    * [x] run dialog
    * [x] run dialog ctrl+shift (admin)
    * [x] run from a lnk with window mode=maximized
    
    Fixes #4645 (PowerShell waits for wt)
    Fixes #6625 (Can't launch as admin using C-S-enter)
    DHowett authored Jul 10, 2020
    Configuration menu
    Copy the full SHA
    592c634 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2020

  1. Update JsonNew for IReference+cleaner optionals, and better Mappers (#…

    …6890)
    
    This commit updates JsonUtilsNew to support winrt
    `Windows::Foundation::IReference<T>` as an option type, and cleans up the
    optional support code by removing the optional overload on
    `GetValue(...)`. Instead of using an overload with a partial
    specialization, we're using a constexpr if with a type trait to
    determine option-type-ness.
    
    In addition, Carlos reported an issue with deriving from `FlagMapper`
    (itself templated) and referring to the base type's members without
    fully qualifying them. To make derivation easier, `EnumMapper` and
    `FlagMapper` now provide `BaseEnumMapper` and `BaseFlagMapper` type
    aliases.
    
    I've taken the opportunity to add a `winrt::hstring` conversion
    trait.
    
    Lastly, in casual use, I found out that I'd written the til::color
    converter wrong: it supports color strings of length 7 (`#rrggbb`) and
    length 4 (`#rgb`). I mistyped (and failed to test) support for 4-length
    color strings by pretending they were only 3 characters long.
    
    ## References
    
    Merged JsonUtils changes from #6004 and #6590.
    
    ## PR Checklist
    * [x] Unblocks aforementioned PRs
    * [x] cla
    * [x] Tests added/passed
    * [x] Documentation N/A
    * [x] Schema N/A
    * [x] Kid tested, mother approved.
    DHowett authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    89c4eba View commit details
    Browse the repository at this point in the history
  2. Add support for focus mode (#6804)

    ## Summary of the Pull Request
    
    Add support for "focus" mode, which only displays the actual terminal content, no tabs or titlebar. The edges of the window are draggable to resize, but the window can't be moved in borderless mode.
    
    The window looks _slightly_ different bewteen different values for `showTabsInTitlebar`, because switching between the `NonClientIslandWindow` and the `IslandWindow` is _hard_.
    
    `showTabsInTitlebar` | Preview
    -- | --
    `true` | ![image](https://user-images.githubusercontent.com/18356694/86639069-f5090080-bf9d-11ea-8b29-fb1e479a078d.png)
    `false` | ![image](https://user-images.githubusercontent.com/18356694/86639094-fafee180-bf9d-11ea-8fc0-6804234a5113.png)
    
    ## PR Checklist
    * [x] Closes #2238 
    * [x] I work here
    * [ ] Tests added/passed
    * [ ] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    * **KNOWN ISSUE**: Upon resizing the NCIW, the top frame margin disappears, making that border disappear entirely. 6356aaf has a bunch of WIP work for me trying to fix that, but I couldn't get it quite right.
    
    ## Validation Steps Performed
    * Toggled between focus and fullscreen a _bunch_ in both modes.
    zadjii-msft authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    1c8e83d View commit details
    Browse the repository at this point in the history
  3. Add support for the "faint" graphic rendition attribute (#6873)

    ## Summary of the Pull Request
    
    This PR adds support for the `SGR 2` escape sequence, which enables the
    ANSI _faint_ graphic rendition attribute. When a character is output
    with this attribute set, it uses a dimmer version of the active
    foreground color.
    
    ## PR Checklist
    * [x] Closes #6703
    * [x] CLA signed. 
    * [x] Tests added/passed
    * [ ] Documentation updated.
    * [ ] Schema updated.
    * [x] I've discussed this with core contributors already. Issue number where discussion took place: #6703
    
    ## Detailed Description of the Pull Request / Additional comments
    
    There was already an `ExtendedAttributes::Faint` flag in the
    `TextAttribute` class, but I needed to add `SetFaint` and `IsFaint`
    methods to access that flag, and update the `SetGraphicsRendition`
    methods of the two dispatchers to set the attribute on receipt of the
    `SGR 2` sequence. I also had to update the existing `SGR 22` handler to
    reset _Faint_ in addition to _Bold_, since they share the same reset
    sequence. For that reason, I thought it a good idea to change the name
    of the `SGR 22` enum to `NotBoldOrFaint`.
    
    For the purpose of rendering, I've updated the
    `TextAttribute::CalculateRgbColors` method to return a dimmer version of
    the foreground color when the _Faint_ attribute is set. This is simply
    achieved by dividing each color component by two, which produces a
    reasonable effect without being too complicated. Note that the _Faint_
    effect is applied before _Reverse Video_, so if the output it reversed,
    it's the background that will be faint.
    
    The only other complication was the update of the `Xterm256Engine` in
    the VT renderer. As mentioned above, _Bold_ and _Faint_ share the same
    reset sequence, so to forward that state over conpty we have to go
    through a slightly more complicated process than with other attributes.
    We first check whether either attribute needs to be turned off to send
    the reset sequence, and then check if the individual attributes need to
    be turned on again.
    
    ## Validation
    
    I've extended the existing SGR unit tests to cover the new attribute in
    the `AdapterTest`, the `ScreenBufferTests`, and the `VtRendererTest`,
    and added a test to confirm the color calculations  when _Faint_ is set
    in the `TextAttributeTests`.
    
    I've also done a bunch of manual testing with all the different VT color
    types and confirmed that our output is comparable to most other
    terminals.
    j4james authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    7d677c5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eda216f View commit details
    Browse the repository at this point in the history
  5. Merged PR 4915574: console: switch to /Zc:wchar_t (native wchar_t)

    console: switch to /Zc:wchar_t (native wchar_t)
    
    This matches what we use in OpenConsole and makes {fmt} play nice.
    
    I've also removed the workaround we introduced into OutputCellIterator
    to work around not using /Zc:wchar_t.
    
    Fixes MSFT:27626309.
    Fixes GH-2673.
    
    Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp 1508f7c232ec58bebc37fedfdec3eb8f9bff5502
    DHowett committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    b124207 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c70c76e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e504bf2 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2020

  1. Remove the rowsToScroll setting and just always use the system setting (

    #6891)
    
    This parameter was added as a workaround for our fast trackpad
    scrolling. Since that was fixed before 1.0 shipped, in #4554, it has
    been largely vestigial. There is no reason for us to keep it around any
    longer.
    
    It was also the only "logic" in TerminalSettings, which is otherwise a
    library that only transits data between two other libraries.
    
    I have not removed it from the schema, as I do not want to mark folks'
    settings files invalid to a strict schema parser.
    
    While I was in the area, I added support for "scroll one screen at a
    time" (which is represented by the API returning WHEEL_PAGESCROLL),
    fixing #5610. We were also storing it in an int (whoops) instead of a
    uint.
    
    Fixes #5610
    DHowett authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    06b50b4 View commit details
    Browse the repository at this point in the history
  2. Add support for the "concealed" graphic rendition attribute (#6907)

    ## Summary of the Pull Request
    
    This PR adds support for the `SGR 8` and `SGR 28` escape sequences,
    which enable and disable the _concealed/invisible_ graphic rendition
    attribute. When a character is output with this attribute set, it is
    rendered with the same foreground and background colors, so the text is
    essentially invisible.
    
    ## PR Checklist
    * [x] Closes #6876
    * [x] CLA signed. 
    * [x] Tests added/passed
    * [ ] Documentation updated.
    * [ ] Schema updated.
    * [x] I've discussed this with core contributors already. Issue number
      where discussion took place: #6876
    
    ## Detailed Description of the Pull Request / Additional comments
    
    Most of the framework for this attribute was already implemented, so it
    was just a matter of updating the `TextAttribute::CalculateRgbColors`
    method to make the foreground the same as the background when the
    _Invisible_ flag was set. Note that this has to happen after the
    _Reverse Video_ attribute is applied, so if you have white-on-black text
    that is reversed and invisible, it should be all white, rather than all
    black.
    
    ## Validation Steps Performed
    
    There were already existing SGR unit tests covering this attribute in
    the `ScreenBufferTests`, and the `VtRendererTest`. But I've added to the
    `AdapterTest` which verifies the SGR sequences for setting and resetting
    the attribute, and I've extended the `TextAttributeTests` to verify that
    the color calculations return the correct values when the attribute is
    set.
    
    I've also manually confirmed that we now render the _concealed text_
    values correctly in the _ISO 6429_ tests in Vttest. And I've manually
    tested the output of _concealed_ when combined with other attributes,
    and made sure that we're matching the behaviour of most other terminals.
    j4james authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    b2973eb View commit details
    Browse the repository at this point in the history
  3. Update {fmt} to 7.0.1 (#6906)

    {fmt} 7.0.1 improves binary size, compile-time format string handling,
    compile time improvements and named arguments.
    
    In a test Windows build, it shrank our binary by ~14kb.
    
    Closes #6905.
    
    ## PR Checklist
    * [x] Closes #6905
    * [x] CLA
    DHowett authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    ddb3614 View commit details
    Browse the repository at this point in the history
  4. Tweak the Palette's KeyChord for High Contrast mode (#6910)

    <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
    ## Summary of the Pull Request
    Update the Palette to be readable under High Contrast mode
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    Regressed in #6833
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [X] Closes #6892
    * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [ ] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [X] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #6892
    
    <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
    ## Detailed Description of the Pull Request / Additional comments
    I pulled the styling of the KeyChord text into a Style, so we can give it a different style under High Contrast.  Under HC, I just left all the colors at their default, so ListView can do its thing.  (IMHO, the HC style now looks better than the non-HC mode, but maybe I'm biased ;) )
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    | | Old | New |
    |---|:---:|:---:|
    | Light | ![light](https://user-images.githubusercontent.com/10259764/87398203-6b8f9a80-c56a-11ea-99d0-2eeefcfea269.png) | ![newlight](https://user-images.githubusercontent.com/10259764/87399212-e3aa9000-c56b-11ea-9e94-c8fae8825cd1.png) |
    | Dark | ![dark](https://user-images.githubusercontent.com/10259764/87398269-819d5b00-c56a-11ea-9180-5c6ec1071b95.png) | ![newdark](https://user-images.githubusercontent.com/10259764/87399227-ead19e00-c56b-11ea-996d-ad52bc2dcbf3.png) |
    | HC White | ![oldwhite](https://user-images.githubusercontent.com/10259764/87398320-92e66780-c56a-11ea-9d52-e2f6e31ae487.png) | ![newwhite](https://user-images.githubusercontent.com/10259764/87398340-98dc4880-c56a-11ea-87e2-ed257ad89c4a.png) |
    | HC Black | ![oldblack](https://user-images.githubusercontent.com/10259764/87398357-9f6ac000-c56a-11ea-848c-1ccef6a65442.png) | ![newblack](https://user-images.githubusercontent.com/10259764/87398370-a396dd80-c56a-11ea-9540-8aa9bb934791.png) |
    jtippet authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    ff27fdf View commit details
    Browse the repository at this point in the history
  5. Move to GSL 3.1.0 (#6908)

    GSL 3, the next major version of GSL after the one we're using, replaced
    their local implementation of `span` with one that more closely mimics
    C++20's span. Unfortunately, that is a breaking change for all of GSL's
    consumers.
    
    This commit updates our use of span to comply with the new changes in
    GSL 3.
    
    Chief among those breaking changes is:
    
    * `span::at` no longer exists; I replaced many instances of `span::at`
      with `gsl::at(x)`
    * `span::size_type` has finally given up on `ptrdiff_t` and become
      `size_t` like all other containers
    
    While I was here, I also made the following mechanical replacements:
    
    * In some of our "early standardized" code, we used std::optional's
      `has_value` and `value` back-to-back. Each `value` incurs an
      additional presence test.
      * Change: `x.value().member` -> `x->member` (`optional::operator->`
        skips the presence test)
      * Change: `x.value()` -> `*x` (as above)
    * GSL 3 uses `size_t` for `size_type`.
      * Change: `gsl::narrow<size_t>(x.size())` -> `x.size()`
      * Change: `gsl::narrow<ptrdiff_t>(nonSpan.size())` -> `nonSpan.size()`
        during span construction
    
    I also replaced two instances of `x[x.size() - 1]` with `x.back()` and
    one instance of a manual array walk (for comparison) with a direct
    comparison.
    
    NOTE: Span comparison and `make_span` are not part of the C++20 span
    library.
    
    Fixes #6251
    DHowett authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    54a7fce View commit details
    Browse the repository at this point in the history
  6. wt.exe: Add support for "short" sub-commands (#6576)

    This adds `nt`, `sp`, and `ft` as aliases for `new-tab`, `split-pane`,
    and `focus-tab`, respectively. These do exactly the same thing as their
    long for counterparts, but are just shorter, for those of us who type
    slower than a fifth grader 👀 
    
    Now you can do
    ```
    wt nt cmd.exe /k #work 15 ; sp cmd.exe /k #work 15 ; sp cmd.exe /k
    media-commandline ; nt powershell dev\\symbols.ps1 ; nt -p \"Ubuntu\" ;
    nt -p \"Ubuntu\" ; ft -t 0
    ``` 
    
    instead of 
    
    ```
    new-tab cmd.exe /k #work 15 ; split-pane cmd.exe /k #work 15 ;
    split-pane cmd.exe /k media-commandline ; new-tab powershell
    dev\\symbols.ps1 ; new-tab -p \"Ubuntu\" ; new-tab -p \"Ubuntu\" ;
    focus-tab -t 0
    ```
    
    The pattern I'm using here is that each of these subcommands now has a
    little helper lambda that actually sets up the subcommand with the
    required arguments, and we just call that lambda twice, once for the
    long-form of the command, and again for the short.
    
    I imagine that in the future, we won't necessarily have short-forms for
    every subcommands, so if there are future conflicts we'd have to figure
    that out pre-emptively, but these all seem like they'll need a short
    form. 
    
    Closes #5466
    zadjii-msft authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    445da4b View commit details
    Browse the repository at this point in the history
  7. Add support for "Always on top" mode (#6903)

    This PR adds support for always on top mode, via two mechanisms:
    * The global setting `alwaysOnTop`. When set to true, the window will be
      created in the "topmost" group of windows.  Changing this value will
      hot-reload whether the window is in the topmost group.
    * The action `toggleAlwaysOnTop`, which will toggle the `alwaysOnTop`
      property at runtime.
    
    ## Detailed Description of the Pull Request / Additional comments
    
    All "topmost" windows maintain an internal z-ordering relative to one
    another, but they're all always above all other "non-topmost" windows.
    So multiple Windows Terminal windows which are both `alwaysOnTop` will
    maintain a z-order relative to one another, but they'll all be on top of
    all other windows.
    
    ## Validation Steps Performed
    
    Toggled always on top mode, both in the settings and also at runtime,
    and verified that it largely did what I expected.
    
    Closes #3038
    zadjii-msft authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    3b2ee44 View commit details
    Browse the repository at this point in the history
  8. Add High Contrast image assets (#6915)

    This commit adds image assets for High Contrast mode
    
    Tagging this issue so it contains a nice list of all the recent HC
    fixes: #5360
    
    I made several changes to DHowett's script and added it to the repo:
    * Add support for generating high contrast icons
    * Add the ability to easily edit the "intermediate" (previously "zbase")
      files for manual hinting
    * Appease the spellchecker
    
    I created new SVGs for HC mode. There's one SVG for both Black and White
    modes -- I just invert the colors. Then I manually hinted the generated
    bitmaps for the production icons. I didn't bother hinting the Dev/Pre
    ones, so the text does get unreadable at small sizes.
    
    View the original images in #6915.
    
    Co-authored-by: Jeffrey Tippet <[email protected]>
    Co-authored-by: Dustin L. Howett <[email protected]>
    Closes #6822
    jtippet authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    bd93cb5 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2020

  1. Configuration menu
    Copy the full SHA
    ebfd852 View commit details
    Browse the repository at this point in the history
  2. Replace the color table init code with two const arrays (#6913)

    This results in smaller code and faster copying. I chose til::color even
    though it results in slightly worse codegen (byteswapping in a tight
    loop) than COLORREF (SSE-enlightened block copy) because eventually the
    internal representations of the color tables will also be til::color and
    _then_ it will become a block copy.
    DHowett authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    4715bf5 View commit details
    Browse the repository at this point in the history
  3. Replace basic_string_view<T> with span<const T> (#6921)

    We were using std::basic_string_view as a stand-in for std::span so that
    we could change over all at once when C++20 dropped with full span
    support. That day's not here yet, but as of 54a7fce we're using GSL 3,
    whose span is C++20-compliant.
    
    This commit replaces every instance of basic_string_view that was not
    referring to an actual string with a span of the appropriate type.
    
    I moved the `const` qualifier into span's `T` because while
    `basic_string_view.at()` returns `const T&`, `span.at()` returns `T&`
    (without the const). I wanted to maintain the invariant that members of
    the span were immutable.
    
    * Mechanical Changes
       * `sv.at(x)` -> `gsl::at(sp, x)`
       * `sv.c{begin,end}` -> `sp.{begin,end}` (span's iterators are const)
    
    I had to replace a `std::basic_string<>` with a `std::vector<>` in
    ConImeInfo, and I chose to replace a manual array walk in
    ScreenInfoUiaProviderBase with a ranged-for. Please review those
    specifically.
    
    This will almost certainly cause a code size regression in Windows
    because I'm blowing out all the PGO counts. Whoops.
    
    Related: #3956, #975.
    DHowett authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    80da24e View commit details
    Browse the repository at this point in the history
  4. Replace gsl::at with a new til::at(span) for pre-checked bounds (#6925)

    The recent changes to use gsl::span everywhere added a few bounds checks
    along codepaths where we were already checking bounds. Some of them may
    be non-obvious to the optimizer, so we can now use til::at to help them
    along.
    
    To accomplish this, I've added a new overload of til::at that takes a
    span and directly accesses its backing buffer.
    DHowett authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    09471c3 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2020

  1. Added til::spsc, a lock-free, single-producer/-consumer FIFO queue (#…

    …6751)
    
    ## Summary of the Pull Request
    
    This PR adds the `til::spsc` namespace, which implements a lock-free, single-producer, single-consumer FIFO queue ("channel"). The queue efficiently blocks the caller using Futexes if no data can be written to / read from the queue (e.g. using `WaitOnAddress` on Windows). Furthermore it allows batching of data and contains logic to signal the caller if the other side has been dropped/destructed.
    
    ## PR Checklist
    * [ ] Closes #xxx
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [x] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
    
    ## Detailed Description of the Pull Request / Additional comments
    
    `til::spsc::details::arc<T>` contains most of the queue's logic and as such has the relevant documentation for its design.
    
    ## Validation Steps Performed
    
    The queue was tested on Windows, Linux and macOS using MSVC, gcc and llvm and each of their available runtime introspection utilities in order to ensure no race conditions or memory leaks occur.
    lhecker authored Jul 16, 2020
    Configuration menu
    Copy the full SHA
    b62f5ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3255177 View commit details
    Browse the repository at this point in the history
  3. Cache the viewport to make invalidation faster (#6918)

    In `Renderer::TriggerRedraw`, the act of fetching the viewport from the
    `pData` over and over is wasted time. We already have a cached variable
    of the viewport that is updated on every scroll check (on
    `TriggerScroll` and on `PaintFrame`.) Scrolling wouldn't be working
    correctly if the clients weren't already notifying us that the viewport
    has changed for scroll purposes, so we can just keep using that cached
    value for the invalidation restriction to speed things up over fetching
    it again.
    
    ## Validation Steps Performed
    - Run `time cat big.txt`. Checked average time before/after, WPR traces
      before/after.
    
    ## PR Checklist
    * [x] Closes perf itch
    * [x] I work here
    * [x] Manual test
    * [x] Documentation irrelevant.
    * [x] Schema irrelevant.
    * [x] Am core contributor.
    miniksa authored Jul 16, 2020
    Configuration menu
    Copy the full SHA
    81b7e54 View commit details
    Browse the repository at this point in the history
  4. Fix 'bcz exclusive' typo (#6938)

    Without this fix, you'd end up with an empty target variable, and so
    msbuild would complain and tell you to give it a target.
    jazzdelightsme authored Jul 16, 2020
    Configuration menu
    Copy the full SHA
    53df6c7 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2020

  1. Smooth animation of command palette filtering (#6939)

    The command palette is a ListView of commands.  As you type into the
    search box, commands are added or removed from the ListView.  Currently,
    each update is done by completely clearing the backing list, then adding
    back any items that should be displayed.  However, this defeats the
    ListView's built-in animations: upon every keystroke, ListView displays
    its list-clearing animation, then animates the insertion of every item
    that wasn't deleted.  This results in noticeable flickering.
    
    This PR changes the update logic so that it updates the list using
    (roughly) the minimum number of Insert and Remove calls, so the ListView
    makes smoother transitions as you type.
    
    I implemented it by keeping the existing code that builds the filtered
    list, but I changed it to build into a scratch list.  Then I grafted on
    a generic delta algorithm to make the real list look like the scratch
    list.
    
    To verify the delta algorithm, I tested all 360,000 permutations of
    pairs of up to 5 element lists in a toy C# app.
    
    ## Validation
    I'm not sure if my screen capture tool really caught all the flickering
    here, but the screencasts below should give a rough idea of the
    difference.  (All the flickering was becoming a nuisance while I was
    testing out the HC changes.)
    
    See the images in #6939 for more info.
    
    Co-authored-by: Jeffrey Tippet <[email protected]>
    jtippet and jtippet authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    7062a83 View commit details
    Browse the repository at this point in the history
  2. Move to the TerminalDependencies NuGet feed (#6954)

    After we stood up our own NuGet feed in Azure blob storage, Azure DevOps
    came out with a public artifact feed feature. I've migrated all our
    packages over, and the only thing left to do is switch our project's
    NuGet config to use it.
    
    Fixes #6952
    DHowett authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    03e25f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bcbe246 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7bc5de6 View commit details
    Browse the repository at this point in the history
  5. Convert most of our JSON deserializers to use type-based conversion (#…

    …6590)
    
    This pull request converts the following JSON deserializers to use the
    new JSON deserializer pattern:
    
    * Profile
    * Command
    * ColorScheme
    * Action/Args
    * GlobalSettings
    * CascadiaSettingsSerialization
    
    This is the completion of a long-term JSON refactoring that makes our
    parser and deserializer more type-safe and robust. We're finally able to
    get rid of all our manual enum conversion code and unify JSON conversion
    around _types_ instead of around _keys_.
    
    I've introduced another file filled with template specializations,
    TerminalSettingsSerializationHelpers.h, which comprises a single unit
    that holds all of the JSON deserializers (and eventually serializers)
    for every type that comes from TerminalApp or TerminalSettings.
    
    I've also moved some types out of Profile and GlobalAppSettings into a
    new SettingsTypes.h to improve settings locality.
    
    This does to some extent constitute a breaking change for already-broken
    settings. Instead of parsing "successfully" (where invalid values are
    null or 0 or unknown or unset), deserialization will now fail when
    there's a type mismatch. Because of that, some tests had to be removed.
    
    While I was on a refactoring spree, I removed a number of helpless
    helpers, like GetWstringFromJson (which converted a u8 string to an
    hstring to make a wstring out of its data pointer :|) and
    _ConvertJsonToBool.
    
    In the future, we can make the error types more robust and give them
    position and type information such that a conformant application can
    display rich error information ("line 3 column 3, I expected a string,
    you gave me an integer").
    
    Closes #2550.
    DHowett authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    efb1fdd View commit details
    Browse the repository at this point in the history
  6. Tweaks: normalize TextAttribute method names (adjective form) (#6951)

    ## Summary of the Pull Request
    
    Text can have various attributes, such as "bold", "italic", "underlined", etc.  The TextAttribute class embodies this. It has methods to set/query these attributes.
    
    This change tweaks a few of the method names to make them match. I.e. for an imaginary text property "Foo", we should have methods along the lines of:
    
    ```
    IsFoo
    SetFoo(bool isFoo)
    ```
    
    And variations should match: we should have "Foo" and "OverFoo", not "Fooey" and "OverFoo".
    
    I chose to standardize on the adjective form, since that's what we are closest to already. The attributes I attacked here are:
    
    SetItalic**s** --> SetItalic
    SetUnderline --> SetUnderline**d**
    SetOverline --> SetOverline**d**
    
    ("italic" is an adjective; "italics" is a plural noun, representing letters or words in an italic typeface)
    
    And I also added methods for "DoublyUnderlined" for good measure.
    
    I stopped short of renaming the GraphicsOptions enum values to match, too; but I'd be willing to do that in a follow-up change if people wanted it.
    
    ## Validation Steps Performed
    It builds, and tests still pass.
    jazzdelightsme authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    1f8264d View commit details
    Browse the repository at this point in the history
  7. Set memory order on slow atomics (#6920)

    By default, the memory order on atomics is `seq_cst`. This is a relatively expensive ordering and it shows in situations where we're rapidly signaling a consumer to pick up something from a producer. I've instead attempted to switch these to `release` (producer) and `acquire` (consumer) to improve the performance of these signals. 
    
    ## Validation Steps Performed
    - Run `time cat big.txt` and `time cat ls.txt` under VS Performance Profiler. 
    
    ## PR Checklist
    * [x] Closes perf itch
    * [x] I work here
    * [x] Manual test
    * [x] Documentation irrelevant.
    * [x] Schema irrelevant.
    * [x] Am core contributor.
    miniksa authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    ea2bd42 View commit details
    Browse the repository at this point in the history
  8. Commit attr runs less frequently by accumulating length of color run (#…

    …6919)
    
    The act of calling `InsertAttrRuns` is relatively slow. Instead of
    calling it a bunch of times to meddle with colors one cell at a time,
    we'll accumulate a length of color and call it to make it act all at
    once. This is great for when one color full line is getting replaced
    with another color full line OR when a line is being replaced with the
    same color all at once. There's significantly fewer checks to be made
    inside `InsertAttrRuns` if we can help it out by accumulating the length
    of each color before asking it to stitch it into the storage.
    
    Validation
    ----------
    
    - Run `time cat big.txt` and `time cat ls.txt` under VS Performance
      Profiler.
    miniksa authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    4351f32 View commit details
    Browse the repository at this point in the history
  9. Add gutter to Command Palette to avoid overlapping with scrollbar (#6965

    )
    
    The command palette has some content that can overlap with its
    scrollbar.  This PR adds a 16px gutter for the scrollbar, as recommended
    [here](https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/scroll-controls#:~:text=leave%2016px%20of%20padding%20on%20the%20edge%20of%20the%20viewport).
    
    ## Detailed Description of the Pull Request / Additional comments
    You can repro the overlap in the default configuration by grabbing the
    scrollbar with the mouse pointer.  But there's an accessibility option
    that makes this more obvious: Settings > Display > Automatically hide
    scroll bars.  With that option enabled, the text is _always_
    overlapping.
    
    The gutter does look slightly larger than it needs to be when the
    scrollbar is thin or completely hidden.  Dynamic reflow may help, but
    unfortunately, I don't know enough XAML to wire that up.  MUX has a
    promising visual state named `ScrollBarsSeparatorExpanded`, so the
    scientists suggest we _could_, while the designers are still pondering
    whether we _should_.
    
    ## Validation Steps Performed
    
    Old appearance:
    ![image](https://user-images.githubusercontent.com/10259764/87817879-94d85100-c81e-11ea-956c-ca0e23576fef.png)
    
    New appearance with fat scrollbars:
    ![image](https://user-images.githubusercontent.com/10259764/87817914-a4579a00-c81e-11ea-9e9d-195969e6da95.png)
    
    New appearance with thin scrollbars:
    ![image](https://user-images.githubusercontent.com/10259764/87818061-dff26400-c81e-11ea-866e-088f72276343.png)
    
    New appearance with no scrollbar:
    ![image](https://user-images.githubusercontent.com/10259764/87819674-7758b680-c821-11ea-98b7-dddd1573c242.png)
    jtippet authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    0c3841a View commit details
    Browse the repository at this point in the history
  10. Skip DX invalidation if we've already scrolled an entire screen worth…

    … of height (#6922)
    
    We spend a lot of time invalidating in the DX Renderer. This is a
    creative trick to not bother invalidating any further if we can tell
    that the bitmap is already completely invalidated. That is, if we've
    scrolled at least an entire screen in height... then the entire bitmap
    had to have been marked as invalid as the new areas were "uncovered" by
    the `InvalidateScroll` command. So further setting invalid bits on top
    of a fully invalid map is pointless. 
    
    Note: I didn't use `bitmap::all()` here because it is significantly
    slower to check all the bits than it is to just reason out that the
    bitmap was already fully marked.
    
    ## Validation Steps Performed
    - Run `time cat big.txt`. Checked average time before/after, WPR traces
      before/after.
    miniksa authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    3a91fc0 View commit details
    Browse the repository at this point in the history
  11. Add support for running a wt commandline in the curent window WITH …

    …A KEYBINDING (#6537)
    
    ## Summary of the Pull Request
    
    Adds a execute commandline action (`wt`), which lets a user bind a key to a specific `wt` commandline. This commandline will get parsed and run _in the current window_. 
    
    ## References
    
    * Related to #4472 
    * Related to #5400 - I need this for the commandline mode of the Command Palette
    * Related to #5970
    
    ## PR Checklist
    * [x] Closes oh, there's not actually an issue for this.
    * [x] I work here
    * [x] Tests added/passed
    * [ ] Requires documentation to be updated - yes it does
    
    ## Detailed Description of the Pull Request / Additional comments
    
    One important part of this change concerns how panes are initialized at runtime. We've had some persistent trouble with initializing multiple panes, because they rely on knowing how big they'll actually be, to be able to determine if they can split again. 
    
    We previously worked around this by ignoring the size check when we were in "startup", processing an initial commandline. This PR however requires us to be able to know the initial size of a pane at runtime, but before the parents have necessarily been added to the tree, or had their renderer's set up.
    
    This led to the development of `Pane::PreCalculateCanSplit`, which is very highly similar to `Pane::PreCalculateAutoSplit`. This method attempts to figure out how big a pane _will_ take, before the parent has necessarily laid out. 
    
    This also involves a small change to `TermControl`, because if its renderer hasn't been set up yet, it'll always think the font is `{0, fontHeight}`, which will let the Terminal keep splitting in the x direction. This change also makes the TermControl set up a renderer to get the real font size when it hasn't yet been initialized.
    
    ## Validation Steps Performed
    
    This was what the json blob I was using for testing evolved into
    
    ```json
            {
                "command": {
                    "action":"wt",
                    "commandline": "new-tab cmd.exe /k #work 15 ; split-pane cmd.exe /k #work 15 ; split-pane cmd.exe /k media-commandline ; new-tab powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu\" ; new-tab -p \"haunter.gif\" ; focus-tab -t 0",
    
                },
                "keys": ["ctrl+shift+n"]
            }
    ```
    
    I also added some tests.
    
    # TODO
    * [x] Creating a `{ "command": "wt" }` action without a commandline will spawn a new `wt.exe` process?
      - Probably should just do nothing for the empty string
    zadjii-msft authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    d0ff5f6 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2020

  1. Swap brightBlack/black in the Solarized color schemes (#6985)

    Original notes from @M-Pixel:
    
    > Console applications assume that backgrounds are black, and that
    > `lightBlack`/`DarkGrey` are lighter than `black`/`Black`.  This
    > assumption is accounted for by all color schemes in `defaults.json`,
    > except for the Solarized themes.
    > 
    > The Solarized Dark theme, in particular, makes `-Parameters` invisible
    > against the background in PowerShell, which is obviously an unacceptable
    > usability flaw.
    > 
    > This change makes `black` and `background` to the same (which is common
    > throughout the color schemes), and makes `brightBlack` (`DarkGray` in
    > .NET) lighter than black (which is obviously more correct given the
    > meanings of those words).
    
    Out of the box, we ship a pretty bad behavior.
    
    If I look at all of the existing shipped color schemes--and that
    includes things like Tango and One Half--we are universally following a
    `background` == `black` rule.
    
    If I consult gnome-terminal or xterm, they do the same thing; Xterm by
    default, gnome-terminal for solarized. The background generally matches
    color index `0` across all their **dark** schemes. Konsole and
    lxterminal disagree and map background to `0 intense` for Solarized.
    
    I want to put our Solarized schemes on a deprecation path, but
    unfortunately we still need to ship _something_ for users who we're
    going to strand on them.
    
    I'm going to have to swallow my bitter and say that yes, we should
    probably just change the index mapping and go with something that works
    right out of the box while we figure out how to do perceptual color
    nudging and eventually remove bad defaults (like Solarized).
    
    From #6618.
    
    Fixes #4047.
    Closes #6618.
    DHowett authored Jul 20, 2020
    Configuration menu
    Copy the full SHA
    04f5ee7 View commit details
    Browse the repository at this point in the history
  2. UIA: use full buffer comparison in rects and endpoint setter (#6447)

    In UiaTextRange, `_getBufferSize` returns an optimized version of the
    size of the buffer to be the origin and the last character in the
    buffer. This is to improve performance on search or checking if you are
    currently on the last word/line.
    
    When setting the endpoint and drawing the bounding rectangles, we should
    be retrieving the true buffer size. This is because it is still possible
    to create UiaTextRanges that are outside of this optimized size. The
    main source of this is `ExpandToEnclosingUnit()` when the unit is
    `Document`. The end _should_ be the last visible character, but it isn't
    because that would break our tests.
    
    This is an incomplete solution. #6986 is a follow up to completely test
    and implement the solution.
    
    The crash in #6402 was caused by getting the document range (a range of
    the full text buffer),  then moving the end by one character. When we
    get the document range, we get the optimized size of the buffer (the
    position of the last character). Moving by one character is valid
    because the buffer still has more to explore. We then crash from
    checking if the new position is valid on the **optimized size**, not the
    **real size**.
    
    REFERENCES
    
    #6986 - follow up to properly handle/test this "end of buffer" problem
    
    Closes #6402
    carlos-zamora authored Jul 20, 2020
    Configuration menu
    Copy the full SHA
    c390b61 View commit details
    Browse the repository at this point in the history
  3. wpf: fix a handful of issues with the wpf control (#6983)

    * send alt/F10 through the control
      We were not listening for WM_SYSKEY{UP,DOWN}
    * extract the actual scancode during WM_CHAR, not the bitfield
      We were accidentally sending some of the additional keypress data in with
      the character event in Win32 Input Mode
    * set default fg/bg to campbell
      The WPF control starts up in PowerShell blue even though it's not typically used
      in PowerShell blue.
    * don't rely on the font to determine wideness
      This is a cross-port of #2928 to the WPF control
    * deterministic shutdown
      In testing, I saw a handful of crashes on teardown because we were not shutting
      down the render thread properly.
    * don't pass 10 for the font weight ...
      When Cascadia Code is set, it just looks silly.
    * trigger render when selection is cleared, do it under lock
    
    Fixes #6966.
    DHowett authored Jul 20, 2020
    Configuration menu
    Copy the full SHA
    76de2ae View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2020

  1. Merged PR 4947060: Migrate OS delayload changes

    [Git2Git] Git Train: Merge of building/rs_onecore_dep_uxp/200720-1445 into official/rs_onecore_dep_uxp
    Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp 5e1509a00f1acdefe1e6392468ffc9ae44dc89cb
    
    Related work items: MSFT:25731998
    DHowett committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    878ed57 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2020

  1. Merged PR 4955623: Migrate OSS up to 09471c3 (gsl-3.1.0 update)

    - Move to GSL 3.1.0 (GH-6908)
    - Replace the color table init code with two const arrays (GH-6913)
    - Replace basic_string_view<T> with span<const T> (GH-6921)
    - Replace gsl::at with a new til::at(span) for pre-checked bounds (GH-6925)
    
    Related work items: MSFT:27866336
    DHowett committed Jul 23, 2020
    Configuration menu
    Copy the full SHA
    52d0e3c View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2020

  1. Expose text selection through terminal WPF control API (#7121)

    We've been trying to improve the copy/paste experience with the terminal
    in Visual Studio. Once of our problematic scenarios is when the terminal
    is connected to a remote environment and the user attempts to
    copy/paste. This gets forwarded to the remote shell that copy/paste into
    the remote clipboard instead of the local one. 
    
    So we opted to add ctrl+shift+c/v to the terminal and need access to the
    selected text via the terminal control
    
    VALIDATION
    Tested with Visual Studio integrated terminal
    javierdlg authored Jul 30, 2020
    Configuration menu
    Copy the full SHA
    f486a65 View commit details
    Browse the repository at this point in the history
  2. Fixed window title not updating with tab rename (#7119)

    * Fixed window title not updating with tab rename
    
    * pass the correct title to event handler instead
    PankajBhojwani authored Jul 30, 2020
    Configuration menu
    Copy the full SHA
    bf90869 View commit details
    Browse the repository at this point in the history
  3. Implement SetCursorColor in Terminal (#7123)

    This was never hooked up to the TerminalCore implementation.
    
    Closes #7102
    PankajBhojwani authored Jul 30, 2020
    Configuration menu
    Copy the full SHA
    2f5ba94 View commit details
    Browse the repository at this point in the history
  4. Refactor grid line renderers with support for more line types (#7107)

    This is a refactoring of the grid line renderers, adjusting the line
    widths to scale with the font size, and optimising the implementation to
    cut down on the number of draw calls. It also extends the supported grid
    line types to include true underlines and strike-through lines in the
    style of the active font.
    
    The main gist of the optimisation was to render the horizontal lines
    with a single draw call, instead of a loop with lots of little strokes
    joined together. In the case of the vertical lines, which still needed
    to be handled in a loop, I've tried to move the majority of static
    calculations outside the loop, so there is bit of optimisation there
    too.
    
    At the same time this code was updated to support a variable stroke
    width for the lines, instead of having them hardcoded to 1 pixel. The
    width is now calculated as a fraction of the font size (0.025 "em"),
    which is still going to be 1 pixel wide in most typical usage, but will
    scale up appropriately if you zoom in far enough.
    
    And in preparation for supporting the SGR strike-through attribute, and
    true underlines, I've extended the grid line renders with options for
    handling those line types as well. The offset and thickness of the lines
    is obtained from the font metrics (rounded to a pixel width, with a
    minimum of one pixel), so they match the style of the font.
    
    VALIDATION
    
    For now we're still only rendering grid lines, and only the top and
    bottom lines in the case of the DirectX renderer in Windows Terminal. So
    to test, I hacked in some code to force the renderer to use all the
    different options, confirming that they were working in both the GDI and
    DirectX renderers.
    
    I've tested the output with a number of different fonts, comparing it
    with the same text rendered in WordPad. For the most part they match
    exactly, but there can be slight differences when we adjust the font
    size for grid alignment. And in the case of the GDI renderer, where
    we're working with pixel heights rather than points, it's difficult to
    match the sizes exactly.
    
    This is a first step towards supporting the strike-through attribute
    (#6205) and true underlines (#2915).
    
    Closes #6911
    j4james authored Jul 30, 2020
    Configuration menu
    Copy the full SHA
    6ee8099 View commit details
    Browse the repository at this point in the history
  5. Merged PR 4963673: OS-side build fixes for 09471c3 (gsl-3.1.0 update)

    Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp 29b1a1d663d0047dc0d2125dd05f75959bca27ef
    
    Related work items: MSFT:27866336
    DHowett committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    5c5c437 View commit details
    Browse the repository at this point in the history
  6. Merged PR 4988918: Reflect OS changes for LKG10

    Reverts "Merged PR 4670666: Workaround for LKG10 internal linker error"
    
    Related work items: MSFT:25439646, MSFT:26598503
    DHowett committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    f49ae24 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2020

  1. Implement split pane with new tab button (#7117)

    Allows splitting pane (with default settings) by holding down ALT and pressing the new tab button ('+')
    
    ## PR Checklist
    * [X] Closes #6757 
    * [X] Works here.
    * [X] Manual test (below)
    * [X] Is core contributor. 
    
    ## More detailed description
    
    Pretty much exactly the code added in #5928 (all credit to @carlos-zamora), but put at the new tab button event binding
    
    ## Validation steps
    
    Seems to work - holding ALT while pressing '+' opens a pane instead of a tab. Holding ALT while starting up terminal for the first time does not seem to affect the behaviour.
    PankajBhojwani authored Jul 31, 2020
    Configuration menu
    Copy the full SHA
    8b669b5 View commit details
    Browse the repository at this point in the history
  2. Send ENHANCED_KEY in Win32 input mode in the wpf/uwp controls (#7106)

    When we added support for win32 input mode, we neglected to pass
    `ENHANCED_KEY` through the two surfaces that would generate events. This
    broke arrow keys in much the same way was #2397, but in a different
    layer.
    
    While I was working on the WPF control, I took a moment to refactor the
    message cracking out into a helper. It's a lot easier on the eyes than
    four lines of bit shifting repeated three times.
    
    Fixes #7074
    DHowett authored Jul 31, 2020
    Configuration menu
    Copy the full SHA
    dd0f7b7 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2020

  1. Add support for the "crossed-out" graphic rendition attribute (#7143)

    This PR adds support for the ANSI _crossed-out_ graphic rendition
    attribute, which is enabled by the `SGR 9` escape sequence.
    
    * Support for the escape sequences and storage of the attribute was
      originally added in #2917.
    * Support for drawing the strikethrough effect in the grid line renderer
      was added in #7107.
    
    Since the majority of the code required for this attribute had already
    been implemented, it was just a matter of activating the
    `GridLines::Strikethrough` style in the `Renderer::s_GetGridlines`
    method when the `CrossedOut` attribute was set.
    
    VALIDATION
    
    There were already some unit tests in place in `VtRendererTest` and the
    `ScreenBufferTests`, but I've also now extended the SGR tests in
    `AdapterTest` to cover this attribute.
    
    I've manually confirmed the first test case from #6205 now works as
    expected in both conhost and Terminal.
    
    Closes #6205
    j4james authored Aug 1, 2020
    Configuration menu
    Copy the full SHA
    ef4aed9 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2020

  1. Render the SGR "underlined" attribute in the style of the font (#7148)

    This PR updates the rendering of the _underlined_ graphic rendition
    attribute, using the style specified in the active font, instead of just
    reusing the grid line at the bottom of the character cell.
    
    * Support for drawing the correct underline effect in the grid line
      renderer was added in #7107.
    
    There was already an `ExtendedAttributes` flag defined for the
    underlined state, but I needed to update the `SetUnderlined` and
    `IsUnderlined` methods in the `TextAttribute`  class to use that flag
    now in place of the legacy `LVB_UNDERSCORE` attribute. This enables
    underlines set via a VT sequence to be tracked separately from
    `LVB_UNDERSCORE` grid lines set via the console API.
    
    I then needed to update the `Renderer::s_GetGridlines` method to
    activate the `GridLines::Underline` style when the `Underlined`
    attribute was set. The `GridLines::Bottom` style is still triggered by
    the `LVB_UNDERSCORE` attribute to produce the bottom grid line effect.
    
    Validation
    ----------
    
    Because this is a change from the existing behaviour, certain unit tests
    that were expecting the `LVB_UNDERSCORE` to be toggled by `SGR 4` and
    `SGR 24` have now had to be updated to check the `Underlined` flag
    instead.
    
    There were also some UI Automation tests that were checking for `SGR 4`
    mapping to `LVB_UNDERSCORE` attribute, which I've now substituted with a
    test of the `SGR 53` overline attribute mapping to
    `LVB_GRID_HORIZONTAL`. These tests only work with legacy attributes, so
    they can't access the extended underline state, and I thought a
    replacement test that covered similar ground would be better than
    dropping the tests altogether.
    
    As far as the visual rendering is concerned, I've manually confirmed
    that the VT underline sequences now draw the underline in the correct
    position and style, while grid lines output via the console API are
    still displayed in their original form.
    
    Closes #2915
    j4james authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    158a170 View commit details
    Browse the repository at this point in the history
  2. Add a spec for per-profile tab colors (#7134)

    Co-authored-by: Mike Griese <[email protected]>
    
    ## Summary of the Pull Request
    
    This spec is a subset of #5772, but specific to per-profile tab colors. We've had enough requests for that in the last few days that I want to pull that feature out into it's own spec, so we can get that approved and implemented in a future-proof way.
    
    > This spec describes a way to specify tab colors in a profile in a way that will
    > be forward compatible with theming the Terminal. This spec will be largely
    > dedicated to the design of a single setting, but within the context of theming.
    > 
    
    ## PR Checklist
    * [x] Specs: #1337
    * [x] References: #5772 
    * [x] I work here
    
    ## Detailed Description of the Pull Request / Additional comments
    _\*<sup>\*</sup><sub>\*</sub> read the spec  <sub>\*</sub><sup>\*</sup>\*_
    zadjii-msft authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    14c94f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    46f7772 View commit details
    Browse the repository at this point in the history
  4. Update TAEF to 10.57.200731005-develop (#7164)

    Updates TAEF to 10.57.200731005-develop
    
    ## PR Checklist
    * [x] Helps #6992 by bringing `wttlog.dll` along with the rest of TAEF.
    * [x] I work here.
    * [x] Automated tests in CI
    * [x] No doc/schema update necessary (checked for docs in this repo)
    * [x] Am core contributor.
    miniksa authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    8bad88c View commit details
    Browse the repository at this point in the history
  5. Research how many characters users are typing before dismissing the c…

    …mdpal (#7165)
    
    Add some user research to determine what the average number of characters a user types before executing a cmdpal action.
    
    This might need to be modified when it merges with #6732
    zadjii-msft authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    7bf9225 View commit details
    Browse the repository at this point in the history
  6. Move TerminalSettings object to TermApp Project (#7163)

    Move TerminalSettings object from TerminalSettings project
    (Microsoft.Terminal.Settings) to TerminalApp project. `TerminalSettings`
    specifically operates as a bridge that exposes any necessary information
    to a TerminalControl.
    
    Closes #7139 
    Related Epic: #885
    Related Spec: #6904
    
    ## PR Checklist
    * [X] Closes #7139 
    * [X] CLA signed
    * [X] Tests ~added~/passed (no additional tests necessary)
    * [X] ~Documentation updated~
    * [X] ~Schema updated~
    
    ## Validation Steps Performed
    Deployed Windows Terminal and opened a few new tabs.
    carlos-zamora authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    eb8bb09 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2020

  1. Fix VT mouse capture issues in Terminal and conhost (#7166)

    This pull request fixes capture and event generation in VT mouse mode
    for both conhost and terminal.
    
    Fixes #6401.
    
    [1/3] Terminal: clamp mouse events to the viewport, don't throw them away
    
     gnome-terminal (at least) sends mouse events whose x/y are at the
     extreme ends of the buffer when a drag starts inside the terminal and
     then exits it.
    
     We would previously discard any mouse events that exited the borders of
     the viewport. Now we will keep emitting events where X/Y=0/w/h.
    
    [2/3] conhost: clamp VT mouse to viewport, capture pointer
    
     This is the same as (1), but for conhost. conhost wasn't already
     capturing the pointer when VT mouse mode was in use. By capturing, we
     ensure that events that happen outside the screen still result in events
     sent to an application (like a release after a drag)
    
    [3/3] wpf: capture the pointer when VT mouse is enabled
    
     This is the same as (2), but for the WPF control. Clamping is handled
     in TerminalCore in (1), so we didn't need to do it in WPF.
    DHowett authored Aug 4, 2020
    Configuration menu
    Copy the full SHA
    d29be59 View commit details
    Browse the repository at this point in the history
  2. wpf: fixup mouse wheel events from screen coords (#7168)

    I found this while crawling through conhost's WindowIo. Mouse wheel
    events come in in screen coordinates, unlike literally every other mouse
    event.
    
    The WPF control was doing it wrong.
    DHowett authored Aug 4, 2020
    Configuration menu
    Copy the full SHA
    cd72356 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2020

  1. Merged PR 5011080: Migrate OSS up to cd72356

    Carlos Zamora (1)
    * UIA: use full buffer comparison in rects and endpoint setter (GH-6447)
    
    Dan Thompson (2)
    * Tweaks: normalize TextAttribute method names (adjective form) (GH-6951)
    * Fix 'bcz exclusive' typo (GH-6938)
    
    Dustin L. Howett (4)
    * Fix VT mouse capture issues in Terminal and conhost (GH-7166)
    * version: bump to 1.3 on master
    * Update Cascadia Code to 2007.15 (GH-6958)
    * Move to the TerminalDependencies NuGet feed (GH-6954)
    
    James Holderness (3)
    * Render the SGR "underlined" attribute in the style of the font (CC-7148)
    * Add support for the "crossed-out" graphic rendition attribute (CC-7143)
    * Refactor grid line renderers with support for more line types (CC-7107)
    
    Leonard Hecker (1)
    * Added til::spsc, a lock-free, single-producer/-consumer FIFO queue (CC-6751)
    
    Michael Niksa (6)
    * Update TAEF to 10.57.200731005-develop (GH-7164)
    * Skip DX invalidation if we've already scrolled an entire screen worth of height (GH-6922)
    * Commit attr runs less frequently by accumulating length of color run (GH-6919)
    * Set memory order on slow atomics (GH-6920)
    * Cache the viewport to make invalidation faster (GH-6918)
    * Correct comment in this SPSC test as a quick follow up to merge.
    
    Related work items: MSFT-28208358
    DHowett committed Aug 5, 2020
    Configuration menu
    Copy the full SHA
    a3c8b2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b759bdb View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2020

  1. Fix #7064: Ignore key events without scan code (#7145)

    Up until #4999 we deferred all key events to the character event handler
    for which `ToUnicodeEx` returned a valid character and alternatively
    those who aren't a special key combination as listed in
    `TerminalInput`'s implementation.
    
    Since #4999 we started acknowledging/handling all key events no matter
    whether they're actually a known key combination. Given non-ASCII inputs
    the Win32 `SendInput()` method generates certain sequences that aren't
    recognizable combinations though and if they're handled by the key event
    handler no follow up character event is sent containing the unicode
    character.
    
    This PR adds another condition and defers all key events without scan
    code (i.e. those not representable by the current keyboard layout) to
    the character event handler.
    
    I'm absolutely not certain that this PR doesn't have a negative effect
    on other kinds of inputs.
    
    Is it common for key events to not contain a scan code? I personally
    haven't seen it happen before AutoHotKey/SendInput.
    
    Before this PR is merged it'd be nice to have a good testing plan in
    place in order to ensure nothing breaks.
    
    ## Validation Steps Performed
    
    Remapped `AltGr+8` to `»` using AutoHotKey using `<^>!8::SendInput {Raw}»`.
    Ensured `»` is printed if `AltGr+8` is pressed.
    
    Closes #7064
    Closes #7120
    lhecker authored Aug 6, 2020
    Configuration menu
    Copy the full SHA
    b617c43 View commit details
    Browse the repository at this point in the history
  2. Add a "shell vs terminal" section to Niksa.md (#7202)

    I've typed this up way too many times now. I'm sticking this comment in Niksa.md, and if it's ever an insufficient explanation of the differences, we can elaborate.
    zadjii-msft authored Aug 6, 2020
    Configuration menu
    Copy the full SHA
    f215b56 View commit details
    Browse the repository at this point in the history
  3. Add closeOtherTabs, closeTabsAfter actions (#7176)

    ## Summary of the Pull Request
    
    Adds support for two actions, `closeOtherTabs` and `closeTabsAfter`. Both these actions accept an `index` parameter.
    
    * `closeOtherTabs`: Close tabs other than `index`
    * `closeTabsAfter`: Close tabs after `index` (This is also "Close tabs to the right")
    
    ## References
    * This PR is being made to unblock @RahulRavishankar in #1912
    ## PR Checklist
    * [x] I work here
    * [ ] Tests added/passed
    * [x] Requires documentation to be updated
    * [ ] We should file an issue for "add an `index` param to `closeTab`" to add similar support to the close tab action
    * [ ] We should file an issue for "make the `index` param to `closeOtherTabs`, `closeTabsAfter` optional" to make them both work on the _active_ tab when there's no `index` provided
    
    ## Validation Steps Performed
    * _Verified that_ closing all tabs when I have the `index`'th tab selected _works as expected_
    * _Verified that_ closing all tabs when I have a tab other than the `index`'th tab selected _works as expected_
    * _Verified that_ closing tabs to the right when I have the `index`'th tab selected _works as expected_
    * _Verified that_ closing tabs to the right when I have a tab other than the `index`'th tab selected _works as expected_
        - This one has one caveat: for whatever reason, if you run this action when the tab that's currently focused is _before_ the `index` param, then the tabs will expand to fill the entire width of the tab row, until you mouse over them. Probably has something to do with tabs not resizing down until there's a mouse exit event.
    zadjii-msft authored Aug 6, 2020
    Configuration menu
    Copy the full SHA
    0a30b85 View commit details
    Browse the repository at this point in the history
  4. Disable MinimalCoreWin when OpenConsoleUniversalApp is false (#7203)

    This fixes the build the rest of the way in VS 16.7. Something about the
    way we were using the Store/Container flags caused some of our projects
    to end up linking kernel32.lib only (MinimalCoreWin==KernelOnly).
    The best way to solve it once and for all is to make sure MinimalCoreWin
    is always set.
    
    References 313568d.
    DHowett authored Aug 6, 2020
    Configuration menu
    Copy the full SHA
    858905f View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2020

  1. Move ICore/ControlSettings to TerminalControl project (#7167)

    ## Summary of the Pull Request
    Move `ICoreSettings` and `IControlSettings` from the TerminalSettings project to the TerminalCore and TerminalControl projects respectively. Also entirely removes the TerminalSettings project.
    
    The purpose of these interfaces is unchanged. `ICoreSettings` is used to instantiate a terminal. `IControlSettings` (which requires an `ICoreSettings`) is used to instantiate a UWP terminal control.
    
    ## References
    Closes #7140 
    Related Epic: #885 
    Related Spec: #6904 
    
    ## PR Checklist
    * [X] Closes #7140 
    * [X] CLA signed
    * [X] Tests ~added~/passed (no additional tests necessary)
    * [X] ~Documentation updated~
    * [X] ~Schema updated~
    
    ## Detailed Description of the Pull Request / Additional comments
    A lot of the work here was having to deal with winmd files across all of these projects. The TerminalCore project now outputs a Microsoft.Terminal.TerminalControl.winmd. Some magic happens in TerminalControl.vcxproj to get this to work properly.
    
    ## Validation Steps Performed
    Deployed Windows Terminal and opened a few new tabs.
    carlos-zamora authored Aug 7, 2020
    Configuration menu
    Copy the full SHA
    1c6aa4d View commit details
    Browse the repository at this point in the history
  2. Batch RTL runs to ensure proper draw order (#7190)

    Consecutive RTL GlyphRuns are drawn from the last to the first.
    
    References
    #538, #7149, all those issues asking for RTL closed as dupes.
    
    As @miniksa suggested in a comment on #7149 -- handle the thingy on the
    render side.
    
    If we have GlyphRuns abcdEFGh, where EFG are RTL, we draw them now in
    order abcdGFEh.
    
    This has ransom-noting, because I didn't touch the font scaling at all.
    This should fix the majority of RTL issues, except it *doesn't* fix
    issues with colors, because those get split in the TextBuffer phase in
    the renderer I think, so they show up separately by the GlyphRun phase.
    schorrm authored Aug 7, 2020
    Configuration menu
    Copy the full SHA
    60b44c8 View commit details
    Browse the repository at this point in the history
  3. Add support for per-profile tab colors (#7162)

    This PR adds support for per-profile tab colors, in accordance with
    #7134. This adds a single `tabColor` property, that when set, specifies
    the background color for profile's tab. This color can be overridden by
    the color picker, and clearing the color with the color picker will
    revert to this default color set for the tab.
    
    * Full theming is covered in #3327 & #5772 
    
    Validation: Played with setting this color, both on launch and via
    hot-reload
    
    Specified in #7134
    Closes #1337
    zadjii-msft authored Aug 7, 2020
    Configuration menu
    Copy the full SHA
    4e0f313 View commit details
    Browse the repository at this point in the history
  4. Add a togglePaneZoom action for zooming a pane (#6989)

    This PR adds the `togglePaneZoom` action, which can be used to make a
    pane expand to fill the entire contents of the window.  A tab that
    contains a zoomed pane will have a magnifying glass icon prepended
    to its title. Any attempts to manage panes with one zoomed will force
    the zoomed pane back to normal size.
    
    VALIDATION
    Zoomed in and out a bunch. Tried closing panes while zoomed. Tried
    splitting panes while zoomed. Etc.
    
    Closes #996
    zadjii-msft authored Aug 7, 2020
    Configuration menu
    Copy the full SHA
    70fd03f View commit details
    Browse the repository at this point in the history
  5. Pass mouse button state into HandleMouse instead of asking win32 (#6765)

    MouseInput was directly asking user32 about the state of the mouse buttons,
    which was somewhat of a layering violation. This commit makes all callers
    have to pass the mouse state in themselves.
    
    Closes #4869
    carlos-zamora authored Aug 7, 2020
    Configuration menu
    Copy the full SHA
    20a2880 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2020

  1. Add support for changing the active color scheme with an action (#6993)

    ## Summary of the Pull Request
    
    Adds the `setColorScheme` action, to change the color scheme of the active control to one given by the `name` parameter. `name` is required. If `name` is not the name of a color scheme, the action does nothing.
    
    ## References
    
    * Being done as a stepping stone to #6689 
    
    ## PR Checklist
    * [x] Closes #5401
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    Technically, the action is being done by changing the settings of the current `TerminalSettings` of the `TermControl`. Frankly, it should be operating on a copy of the `TermControl`'s `IControlSettings`, then updating the control's settings, or the Control should just listen for changes to it's setting's properties, and update in real time (without a manual call to `UpdateSettings`. However, both those paths are somewhere unknowable beyond #6904, so we'll just do this for now.
    
    ## Validation Steps Performed
    
    * tested manually with a scheme that exists
    * tested manually with a scheme that doesn't exist
    zadjii-msft authored Aug 10, 2020
    Configuration menu
    Copy the full SHA
    aee803e View commit details
    Browse the repository at this point in the history
  2. Add support for the "doubly underlined" graphic rendition attribute (#…

    …7223)
    
    This PR adds support for the ANSI _doubly underlined_ graphic rendition
    attribute, which is enabled by the `SGR 21` escape sequence.
    
    There was already an `ExtendedAttributes::DoublyUnderlined` flag in the
    `TextAttribute` class, but I needed to add `SetDoublyUnderlined` and
    `IsDoublyUnderlined` methods to access that flag, and update the
    `SetGraphicsRendition` methods of the two dispatchers to set the
    attribute on receipt of the `SGR 21` sequence. I also had to update the
    existing `SGR 24` handler to reset _DoublyUnderlined_ in addition to
    _Underlined_, since they share the same reset sequence.
    
    For the rendering, I've added a new grid line type, which essentially
    just draws an additional line with the same thickness as the regular
    underline, but slightly below it - I found a gap of around 0.05 "em"
    between the lines looked best. If there isn't enough space in the cell
    for that gap, the second line will be clamped to overlap the first, so
    you then just get a thicker line. If there isn't even enough space below
    for a thicker line, we move the offset _above_ the first line, but just
    enough to make it thicker.
    
    The only other complication was the update of the `Xterm256Engine` in
    the VT renderer. As mentioned above, the two underline attributes share
    the same reset sequence, so to forward that state over conpty we require
    a slightly more complicated process than with most other attributes
    (similar to _Bold_ and _Faint_). We first check whether either underline
    attribute needs to be turned off to send the reset sequence, and then
    check individually if each of them needs to be turned back on again.
    
    ## Validation Steps Performed
    
    For testing, I've extended the existing attribute tests in
    `AdapterTest`, `VTRendererTest`, and `ScreenBufferTests`, to make sure
    we're covering both the _Underlined_ and _DoublyUnderlined_ attributes.
    
    I've also manually tested the `SGR 21` sequence in conhost and Windows
    Terminal, with a variety of fonts and font sizes, to make sure the
    rendering was reasonably distinguishable from a single underline.
    
    Closes #2916
    j4james authored Aug 10, 2020
    Configuration menu
    Copy the full SHA
    e7a1a67 View commit details
    Browse the repository at this point in the history
  3. Allow profile.padding to be an int (or any other type :|) (#7235)

    ## Summary of the Pull Request
    
    We're expecting that people have treated `padding` as an integer, and the type-based converter is too strict for that. This PR widens its scope and explicitly allows for it in the schema.
    
    ## PR Checklist
    * [x] Closes #7234
    DHowett authored Aug 10, 2020
    Configuration menu
    Copy the full SHA
    e6c71cb View commit details
    Browse the repository at this point in the history
  4. Resolve the default profile during defaults load, don't crash on laun…

    …ch (#7237)
    
    The "default profile as name" feature in 1.1 broke the loading of
    default settings, as we would never get to the validation phase where
    the default profile string was transformed into a guid.
    
    I moved knowledge of the "unparsed default profile" optional to the
    consumer so that we could make sure we only attempted to deserialize it
    once (and only if it was present.)
    
    Fixes #7236.
    
    ## PR Checklist
    * [x] Closes #7236
    DHowett authored Aug 10, 2020
    Configuration menu
    Copy the full SHA
    c03677b View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2020

  1. Advanced Tab Switcher (#6732)

    ![TabSwitchingv2](https://user-images.githubusercontent.com/57155886/88237962-5505d500-cc35-11ea-8384-d91699155067.gif)
    
    ## Summary of the Pull Request
    This PR adds the Advanced Tab Switcher (ATS) to Terminal. It'll work
    similarly to VSCode's tab switcher. Because this implementation rides
    off a lot of the Command Palette's XAML code, it'll look just like the
    Command Palette, and also have support for tab title search.
    
    ## References
    #3753 - ATS Spec
    
    Closes #1502
    leonMSFT authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    b07c1e4 View commit details
    Browse the repository at this point in the history
  2. Display meaningful errors when JSON types don't match (#7241)

    This pull request completes (and somewhat rewrites) the JsonUtils error
    handling arc. Deserialization errors, no longer represented by trees of
    exceptions that must be rethrown and caught, are now transformed at
    catch time into a message explaining what we expected and where we
    expected it.
    
    Instead of exception trees, a deserialization failure will result in a
    single type of exception with the originating JSON object from which we
    can determine the contents and location of the failure.
    
    Because most of the error message actually comes from the JSON schema
    or the actual supported types, and the other jsoncpp errors are not
    localized I've made the decision to **not** localize these messages.
    DHowett authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    7ccd1f6 View commit details
    Browse the repository at this point in the history
  3. Fix viewport moving when we've scrolled up and circled the buffer (#7247

    )
    
    If you scroll up to view the scrollback, then we want the viewport to
    "stay in place", as new output comes in (see #6062). This works fine up
    until the buffer circles. In this case, the mutable viewport isn't
    actually moving, so we never set `updatedViewport` to true. 
    
    This regressed in #6062
    Closes #7222
    zadjii-msft authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    bc642bb View commit details
    Browse the repository at this point in the history
  4. tools: add Get-OSSConhostLog (#7250)

    This script takes a range of commits and generates a commit log with the
    git2git-excluded file changes filtered out.
    
    It also replaces GitHub issue numbers with GH-XXX so as to not confuse
    Git2Git or Azure DevOps.  Community contributions are tagged with CC- so
    they can be detected later.
    
    The output looks like this:
    
    ```
    Carlos Zamora (2)
    * Pass mouse button state into HandleMouse instead of asking win32 (GH-6765)
    
    Dustin L. Howett (6)
    * Disable MinimalCoreWin when OpenConsoleUniversalApp is false (GH-7203)
    
    James Holderness (1)
    * Add support for the "doubly underlined" graphic rendition attribute (CC-7223)
    ```
    
    Yes, the numbers are wrong. No, it doesn't really matter.
    DHowett authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    c5d5500 View commit details
    Browse the repository at this point in the history
  5. Enable partial rebuilds of the TerminalControl project again (#7248)

    This regressed around the #7163 timeframe.
    
    We're discussing this on chat currently. It might break the intellisense
    on the `#include <winrt/Microsoft.Terminal.TerminalControl.h>` line in
    VS 16.7, but we're not _really_ sure? Intellisense has been notoriously
    flaky for us.
    
    I'm running 16.6.5, and it works for me. @lhecker is running 16.7 and
    confirmed it worked there. If the CI build passes, then this definitely
    will work for 16.7.
    zadjii-msft authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    fe82e97 View commit details
    Browse the repository at this point in the history
  6. Always create a new environment block before we spawn a process (#7243)

    This commit ensures that we always furnish a new process with the
    cleanest, most up-to-date environment variables we can. There is a minor
    cost here in that WT will no longer pass environment variables that it
    itself inherited to its child processes.
    
    This could be considered a reasonable sacrifice. It will also remove
    somebody else's TERM, TERM_PROGRAM and TERM_PROGRAM_VERSION from the
    environment, which could be considered a win.
    
    I validated  that GetCurrentProcessToken returns a token we're
    _technically able_ to use with this API; it is roughly equivalent to
    OpenProcessToken(GetCurrentProcess) in that it returns the current
    active _access token_ (which is what CreateEnvironmentBlock wants.)
    
    There's been discussion about doing a 3-way merge between WT's
    environment and the new one. This will be complicated and I'd like to
    scream test the 0-way merge first ;P
    
    Related to #1125 (but it does not close it or resolve any of the other
    issues it calls out.)
    
    Fixes #7239
    Fixes #7204 ("App Paths" value creeping into wt's environment)
    DHowett authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    849243a View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2020

  1. Spec for global action IDs (#7175)

    ## Summary of the Pull Request
    
    ⚠️ This spec has been moved from #6902. That version was branched off the new tab menu customization, and had a terribly convoluted git history. After discussion with the team, we've decided that it's best that this spec is merged atomically _first_, and used as the basis for #5888, as opposed to the other way around.
    
    > This document is intended to serve as an addition to the [Command Palette Spec],
    > as well as the [New Tab Menu Customization Spec].
    > 
    > As we come to rely more on actions being a mechanism by which the user defines
    > "do something in the Terminal", we'll want to make it even easier for users to
    > re-use the actions that they've already defined, as to reduce duplicated json as
    > much as possible. This spec proposes a mechanism by which actions could be
    > uniquely identifiable, so that the user could refer to bindings in other
    > contexts without needing to replicate an entire json blob.
    > 
    
    ## PR Checklist
    * [x] Specs: #6899
    * [x] References: #1571, #1912, #3337, #5025, #5524, #5633
    * [x] I work here
    
    ## Detailed Description of the Pull Request / Additional comments
    _\*<sup>\*</sup><sub>\*</sub> read the spec  <sub>\*</sub><sup>\*</sup>\*_
    
    
    
    [Command Palette Spec]: https://github.com/microsoft/terminal/blob/master/doc/specs/%232046%20-%20Command%20Palette.md
    [New Tab Menu Customization Spec]: https://github.com/microsoft/terminal/blob/master/doc/specs/%231571%20-%20New%20Tab%20Menu%20Customization.md
    zadjii-msft authored Aug 12, 2020
    Configuration menu
    Copy the full SHA
    c241f83 View commit details
    Browse the repository at this point in the history
  2. Mini-spec for New Tab Menu Customization (#5888)

    * This is a mini-spec for how I see this working
    
    * good bot
    
    * These were some typos
    
    * Addd a future consideration about the command palette and commands
    
    * Update spec to reflect discussion with Carlos
    
    * update spec to reflect investigations in Command Palette Addenda 1
    
    * add references to #6899, and minor bits of review feedback
    
    * add `remainingProfiles` as a way of adding all the user's other profiles quickly to the menu as well
    
    * clarify why we're not doing it in the profiles list
    
    * no two commits do not contain a misspelling of separate
    zadjii-msft authored Aug 12, 2020
    Configuration menu
    Copy the full SHA
    a34cfa4 View commit details
    Browse the repository at this point in the history
  3. Fixed #3799: Introduce sendInput command (#7249)

    ## Summary of the Pull Request
    
    This PR enables users to send arbitrary text input to the shell via a keybinding.
    
    ## PR Checklist
    * [x] Closes #3799
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [ ] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [x] Schema updated.
    * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #3799
    
    ## Detailed Description of the Pull Request / Additional comments
    
    ## Validation Steps Performed
    
    Added the following keybindings:
    ```json
    { "keys": "p", "command": { "action": "sendInput", "input": "foobar" } },
    { "keys": "q", "command": { "action": "sendInput", "input": "\u001b[A" } },
    ```
    Ensured that when pressing <kbd>P</kbd> "foobar" is echoed to the shell and when pressing <kbd>Q</kbd> the shell history is being navigated backwards.
    lhecker authored Aug 12, 2020
    Configuration menu
    Copy the full SHA
    a2721c1 View commit details
    Browse the repository at this point in the history
  4. Merged PR 5039910: Migrate OSS up to a2721c1

    Carlos Zamora (1)
    * Pass mouse button state into HandleMouse instead of asking win32 (GH-6765)
    
    James Holderness (1)
    * Add support for the "doubly underlined" graphic rendition attribute (CC-7223)
    
    Moshe Schorr (1)
    * Batch RTL runs to ensure proper draw order (CC-7190)
    
    Related work items: MSFT-28385436
    DHowett committed Aug 12, 2020
    Configuration menu
    Copy the full SHA
    e1cdc27 View commit details
    Browse the repository at this point in the history
  5. doc: Add Pankaj to our README (#7266)

    We have a new team member!
    cinnamon-msft authored Aug 12, 2020
    Configuration menu
    Copy the full SHA
    a02a297 View commit details
    Browse the repository at this point in the history
  6. Default initialize a CmdPal mode (#7263)

    Whoops, members are zero initialized in Debug builds but most likely not
    in Release builds So, this PR adds a couple of default values to
    `_currentMode` and its associated XAML strings to make cmdpal/ats work
    deterministically on first use.  I also added a default value to
    `_anchorKey` just to be safe.
    
    Closes #7254
    leonMSFT authored Aug 12, 2020
    Configuration menu
    Copy the full SHA
    93ae6b6 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2020

  1. Don't zoom when there's only one pane (#7273)

    This is a minor fix from #6989. If there's only one pane in the
    Terminal, then we'd still "zoom" it and give it a border, but all the
    borders would be black. 
    
    A single pane is already "zoomed", so it doesn't really make sense to
    try and zoom if there's only one.
    zadjii-msft authored Aug 13, 2020
    Configuration menu
    Copy the full SHA
    01e3fda View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary check when updating ATS indices (#7280)

    Removes the if-statement in `UpdateTabIndices` that blocks all scenarios where you delete the second to last tab. This fixes the issue where the ATS gets confused about which item in the ListView is associated with which tab.
    
    Closes #7278
    leonMSFT authored Aug 13, 2020
    Configuration menu
    Copy the full SHA
    d9ffca6 View commit details
    Browse the repository at this point in the history
  3. Add support for iterable, nested commands (#6856)

    ## Summary of the Pull Request
    
    This PR adds support for both _nested_ and _iterable_ commands in the Command palette.
    ![nested-commands-000](https://user-images.githubusercontent.com/18356694/87072916-2d991c00-c1e2-11ea-8917-a70e8b8b9803.gif)
    
    * **Nested commands**: These are commands that include additional sub-commands. When the user selects on of these, the palette will update to only show the nested commands.
    * **Iterable commands**: These are commands what allow the user to define only a single command, which is repeated once for every profile. (in the future, also repeated for color schemes, themes, etc.)
    
    The above gif uses the following json:
    
    ```json
            {
                "name": "Split Pane...",
                "commands": [
                    {
                        "iterateOn": "profiles",
                        "name": "Split with ${profile.name}...",
                        "commands": [
                            { "command": { "action": "splitPane", "profile": "${profile.name}", "split": "automatic" } },
                            { "command": { "action": "splitPane", "profile": "${profile.name}", "split": "vertical" } },
                            { "command": { "action": "splitPane", "profile": "${profile.name}", "split": "horizontal" } }
                        ]
                    }
                ]
            },
    ```
    
    ## References
    
    ## PR Checklist
    * [x] Closes #3994
    * [x] I work here
    * [x] Tests added/passed
    * [ ] Requires documentation to be updated - Sure does, but we'll finish polishing this first.
    
    ## Detailed Description of the Pull Request / Additional comments
    
    We've now gotta keep the original json for a command around, so that once we know what all the profiles will be, we can expand the commands that need it. 
    
    We've also got to parse commands recursively, because they might have any number of child commands.
    
    These together made the command parsing a _lot_ more complicated, but it feels good so far.
    
    ## Validation Steps Performed
    * wrote a bunch of tests
    * Played with it a bunch
    zadjii-msft authored Aug 13, 2020
    Configuration menu
    Copy the full SHA
    dcc2799 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2020

  1. Pass the scancode in our tunneled DirectKey event (#7298)

    #7145 introduced a check so that we wouldn't dispatch keys unless they
    actually had a scancode. Our synthetic events actually _didn't_ have
    scancodes. Not because they couldn't--just because they didn't.
    
    Fixes #7297
    DHowett authored Aug 14, 2020
    Configuration menu
    Copy the full SHA
    aecd99e View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2020

  1. Make ColorScheme a WinRT object (#7238)

    ColorScheme is now a WinRT object.
    
    All of the JSON stuff can't be exposed via the idl. So the plan here is
    that we'll have the TerminalSettingsModel project handle all of the
    serialization when it's moved over. These functions will be exposed off
    of the `implementation` namespace, not projected namespace.
    
    References #7141 - ColorScheme is a settings object
    References #885 - this new settings object will be moved to a new
    TerminalSettingsModel project
    
    ## Validation Steps Performed
    - [x] Tests passed
    - [x] Deployment succeeded
    carlos-zamora authored Aug 15, 2020
    Configuration menu
    Copy the full SHA
    e9a7053 View commit details
    Browse the repository at this point in the history
  2. Add copyFormatting keybinding arg and array support (#6004)

    Adds array support for the existing `copyFormatting` global setting.
    This allows users to define which formats they would specifically like
    to be copied.
    
    A boolean value is still accepted and is translated to the following:
    - `false` --> `"none"` or `[]`
    - `true` --> `"all"` or `["html", "rtf"]`
    
    This also adds `copyFormatting` as a keybinding arg for `copy`. As with
    the global setting, a boolean value and array value is accepted.
    
    CopyFormat is a WinRT enum where each accepted format is a flag.
    Currently accepted formats include `html`, and `rtf`. A boolean value is
    accepted and converted. `true` is a conjunction of all the formats.
    `false` only includes plain text.
    
    For the global setting, `null` is not accepted. We already have a
    default value from before so no worries there.
    
    For the keybinding arg, `null` (the default value) means that we just do
    what the global arg says to do. Overall, the `copyFormatting` keybinding
    arg is an override of the global setting **when using that keybinding**.
    
    References #5212 - Spec for formatted copying
    References #2690 - disable html copy
    
    Validated behavior with every combination of values below:
    - `copyFormatting` global: { `true`, `false`, `[]`, `["html"]` }
    - `copyFormatting` copy arg:
      { `null`, `true`, `false`, `[]`, `[, "html"]`}
    
    Closes #4191
    Closes #5262
    carlos-zamora authored Aug 15, 2020
    Configuration menu
    Copy the full SHA
    24b8c13 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2020

  1. Add initial support for VT DCS sequences (#6328)

    As the title suggests, this commit adds initial support for the VT DCS
    sequences. The parameters are parsed but not yet used. The pass through
    data is yet to be handled. This effectively fixes #120 by making Sixel
    graphics sequences *ignored* instead of printed.
    
    * https://vt100.net/docs/vt510-rm/chapter4.html
    * https://vt100.net/emu/dec_ansi_parser
    
    Tests added.
    
    References #448
    Closes #120
    skyline75489 authored Aug 17, 2020
    Configuration menu
    Copy the full SHA
    acac350 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2020

  1. Disable parallel build (again) and keep TerminalApp PCHs (#7322)

    The build now builds every project multiple times, so I figure, why not
    try to fix it.
    DHowett authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    c4a9752 View commit details
    Browse the repository at this point in the history
  2. Update colour picker buttons with round edges. (#7305)

    ![RoundedButtons](https://user-images.githubusercontent.com/41475767/90323225-39e96500-df56-11ea-9219-d386f74fc1b4.png)
    
    ## Validation Steps Performed
    Deployed locally and verified that the colour picker's button has round edges.
    
    Closes #7142
    MichelleTanPY authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    baefa46 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8943f68 View commit details
    Browse the repository at this point in the history
  4. Compensate for new warnings and STL changes in VS 16.7 (#7319)

    New warnings were added in VS 16.7 and `std::map::erase` is now `noexcept`.
    Update our code to be compatible with the new enforcement.
    
    ## PR Checklist
    * [x] Closes broken audit in main after Agents updated over the weekend.
    * [x] I work here.
    * [x] Audit mode passes now
    * [x] Am core contributor.
    
    ## Validation Steps Performed
    * [x] Ran audit mode locally
    miniksa authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    a50c48c View commit details
    Browse the repository at this point in the history
  5. Add menu (also known as "app") as a bindable key (#7328)

    - Add MENU key with "menu" "app" as key bindings.
    - Updated profiles.schema.json and documentation.
    
    ## Validation Steps Performed
    Ran tests locally.
    Tested out the new key binding.
    ```{ "command": "openNewTabDropdown", "keys": "app" }```
    
    Closes #7144
    MichelleTanPY authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    93d2669 View commit details
    Browse the repository at this point in the history
  6. Add til::static_map, a constexpr key-value store (#7323)

    This is based on (cribbed almost directly from) code written by the
    inimitable @StephanTLavavej on one of our mailing lists.
    
    This is a nice generic version of the approach used in
    JsonUtils::EnumMapper and CodepointWidthDetector: a static array of
    key-value pairs that we binary-search at runtime (or at compile time, as
    the case may be.)
    
    Keys are not required to be sorted, as we're taking advantage of
    constexpr std::sort (VS 16.6+) to get the compiler to do it for us. How
    cool is that?
    
    static_map presents an operator[] or at much like
    std::map/std::unordered_map does.
    
    I've added some tests, but they're practically fully-solveable at compile
    time so they pretty much act like `VERIFY_IS_TRUE(true)`.
    DHowett authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    66fd9c3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6eea6a3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    97c52c6 View commit details
    Browse the repository at this point in the history
  9. Helix Testing (#6992)

    Use the Helix testing orchestration framework to run our Terminal LocalTests and Console Host UIA tests.
    
    ## References
    #### Creates the following new issues:
    - #7281 - re-enable local tests that were disabled to turn on Helix
    - #7282 - re-enable UIA tests that were disabled to turn on Helix
    - #7286 - investigate and implement appropriate compromise solution to how Skipped is handled by MUX Helix scripts
    
    #### Consumes from:
    - #7164 - The update to TAEF includes wttlog.dll. The WTT logs are what MUX's Helix scripts use to track the run state, convert to XUnit format, and notify both Helix and AzDO of what's going on.
    
    #### Produces for:
    - #671 - Making Terminal UIA tests is now possible
    - #6963 - MUX's Helix scripts are already ready to capture PGO data on the Helix machines as certain tests run. Presuming we can author some reasonable scenarios, turning on the Helix environment gets us a good way toward automated PGO.
    
    #### Related:
    - #4490 - We lost the AzDO integration of our test data when I moved from the TAEF/VSTest adapter directly back to TE. Thanks to the WTTLog + Helix conversion scripts to XUnit + new upload phase, we have it back!
    
    ## PR Checklist
    * [x] Closes #3838
    * [x] I work here.
    * [x] Literally adds tests.
    * [ ] Should I update a testing doc in this repo?
    * [x] Am core contributor. Hear me roar.
    * [ ] Correct spell-checking the right way before merge.
    
    ## Detailed Description of the Pull Request / Additional comments
    We have had two classes of tests that don't work in our usual build-machine testing environment:
    1. Tests that require interactive UI automation or input injection (a.k.a. require a logged in user)
    2. Tests that require the entire Windows Terminal to stand up (because our Xaml Islands dependency requires 1903 or later and the Windows Server instance for the build is based on 1809.)
    
    The Helix testing environment solves both of these and is brought to us by our friends over in https://github.com/microsoft/microsoft-ui-xaml.
    
    This PR takes a large portion of scripts and pipeline configuration steps from the Microsoft-UI-XAML repository and adjusts them for Terminal needs.
    You can see the source of most of the files in either https://github.com/microsoft/microsoft-ui-xaml/tree/master/build/Helix or https://github.com/microsoft/microsoft-ui-xaml/tree/master/build/AzurePipelinesTemplates
    
    Some of the modifications in the files include (but are not limited to) reasons like:
    - Our test binaries are named differently than MUX's test binaries
    - We don't need certain types of testing that MUX does.
    - We use C++ and C# tests while MUX was using only C# tests (so the naming pattern and some of the parsing of those names is different e.g. :: separators in C++ and . separators in C#)
    - Our pipeline phases work a bit differently than MUX and/or we need significantly fewer pieces to the testing matrix (like we don't test a wide variety of OS versions).
    
    The build now runs in a few stages:
    1. The usual build and run of unit tests/feature tests, packaging verification, and whatnot. This phase now also picks up and packs anything required for running tests in Helix into an artifact. (It also unifies the artifact name between the things Helix needs and the existing build outputs into the single `drop` artifact to make life a little easier.)
    2. The Helix preparation build runs that picks up those artifacts, generates all the scripts required for Helix to understand the test modules/functions from our existing TAEF tests, packs it all up, and queues it on the Helix pool.
    3. Helix generates a VM for our testing environment and runs all the TAEF tests that require it. The orchestrator at helix.dot.net watches over this and tracks the success/fail and progress of each module and function. The scripts from our MUX friends handle installing dependencies, making the system quiet for better reliability, detecting flaky tests and rerunning them, and coordinating all the log uploads (including for the subruns of tests that are re-run.)
    4. A final build phase is run to look through the results with the Helix API and clean up the marking of tests that are flaky, link all the screenshots and console output logs into the AzDO tests panel, and other such niceities.
    
    We are set to run Helix tests on the Feature test policy of only x64 for now. 
    
    Additionally, because the set up of the Helix VMs takes so long, we are *NOT* running these in PR trigger right now as I believe we all very much value our 15ish minute PR turnaround (and the VM takes another 15 minutes to just get going for whatever reason.) For now, they will only run as a rolling build on master after PRs are merged. We should still know when there's an issue within about an hour of something merging and multiple PRs merging fast will be done on the rolling build as a batch run (not one per).
    
    In addition to setting up the entire Helix testing pipeline for the tests that require it, I've preserved our classic way of running unit and feature tests (that don't require an elaborate environment) directly on the build machines. But with one bonus feature... They now use some of the scripts from MUX to transform their log data and report it to AzDO so it shows up beautifully in the build report. (We used to have this before I removed the MStest/VStest wrapper for performance reasons, but now we can have reporting AND performance!) See https://dev.azure.com/ms/terminal/_build/results?buildId=101654&view=ms.vss-test-web.build-test-results-tab for an example. 
    
    I explored running all of the tests on Helix but.... the Helix setup time is long and the resources are more expensive. I felt it was better to preserve the "quick signal" by continuing to run these directly on the build machine (and skipping the more expensive/slow Helix setup if they fail.) It also works well with the split between PR builds not running Helix and the rolling build running Helix. PR builds will get a good chunk of tests for a quick turn around and the rolling build will finish the more thorough job a bit more slowly.
    
    ## Validation Steps Performed
    - [x] Ran the updated pipelines with Pull Request configuration ensuring that Helix tests don't run in the usual CI
    - [x] Ran with simulation of the rolling build to ensure that the tests now running in Helix will pass. All failures marked for follow on in reference issues.
    miniksa authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    5d082ff View commit details
    Browse the repository at this point in the history
  10. Refactor VT control sequence identification (#7304)

    This PR changes the way VT control sequences are identified and
    dispatched, to be more efficient and easier to extend. Instead of
    parsing the intermediate characters into a vector, and then having to
    identify a sequence using both that vector and the final char, we now
    use just a single `uint64_t` value as the identifier.
    
    The way the identifier is constructed is by taking the private parameter
    prefix, each of the intermediate characters, and then the final
    character, and shifting them into a 64-bit integer one byte at a time,
    in reverse order. For example, the `DECTLTC` control has a private
    parameter prefix of `?`, one intermediate of `'`, and a final character
    of `s`. The ASCII values of those characters are `0x3F`, `0x27`, and
    `0x73` respectively, and reversing them gets you 0x73273F, so that would
    then be the identifier for the control.
    
    The reason for storing them in reverse order, is because sometimes we
    need to look at the first intermediate to determine the operation, and
    treat the rest of the sequence as a kind of sub-identifier (the
    character set designation sequences are one example of this). When in
    reverse order, this can easily be achieved by masking off the low byte
    to get the first intermediate, and then shifting the value right by 8
    bits to get a new identifier with the rest of the sequence.
    
    With 64 bits we have enough space for a private prefix, six
    intermediates, and the final char, which is way more than we should ever
    need (the _DEC STD 070_ specification recommends supporting at least
    three intermediates, but in practice we're unlikely to see more than
    two).
    
    With this new way of identifying controls, it should now be possible for
    every action code to be unique (for the most part). So I've also used
    this PR to clean up the action codes a bit, splitting the codes for the
    escape sequences from the control sequences, and sorting them into
    alphabetical order (which also does a reasonable job of clustering
    associated controls).
    
    ## Validation Steps Performed
    
    I think the existing unit tests should be good enough to confirm that
    all sequences are still being dispatched correctly. However, I've also
    manually tested a number of sequences to make sure they were still
    working as expected, in particular those that used intermediates, since
    they were the most affected by the dispatch code refactoring.
    
    Since these changes also affected the input state machine, I've done
    some manual testing of the conpty keyboard handling (both with and
    without the new Win32 input mode enabled) to make sure the keyboard VT
    sequences were processed correctly. I've also manually tested the
    various VT mouse modes in Vttest to confirm that they were still working
    correctly too.
    
    Closes #7276
    j4james authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    7fcff4d View commit details
    Browse the repository at this point in the history
  11. Add some polish to nested commands in the command palette (#7299)

    ## Summary of the Pull Request
    
    ![cmdpal-nested-command-polish](https://user-images.githubusercontent.com/18356694/90293616-1f29ca00-de4a-11ea-8942-00d255de929a.gif)
    
    
    * Add a chevron for nested commands
    * Add the text of the parent command when entering a child command
    
    ## References
    
    ## PR Checklist
    * [x] Closes #7265
    * [x] I work here
    * [n/a] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    _look at that gif_
    zadjii-msft authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    3d64921 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b8b0dd7 View commit details
    Browse the repository at this point in the history
  13. Expose selection background and alpha through the WPF control (#7339)

    Adds the ability to set the selection background opacity when setting the
    selection background. This also exposes the selection background and alpha
    through the terminal WPF container.
    javierdlg authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    20b7fe4 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2020

  1. Add support for commands iterable on color schemes (#7329)

    ## Summary of the Pull Request
    
    ![cmdpal-set-color-scheme](https://user-images.githubusercontent.com/18356694/90517094-8eddd480-e12a-11ea-8be4-8b6782d8d88c.gif)
    
    Allows for creating commands that iterate over the user's color schemes. Also adds a top-level nested command to `defaults.json` that allows the user to select a color scheme (pictured above). I'm not sure there are really any other use cases that make sense, but it _really_ makes sense for this one.
    
    ## References
    * #5400 - cmdpal megathread
    * made possible by #6856, _and support from viewers like you._
    * All this is being done in pursuit of #6689 
    
    ## PR Checklist
    * [x] Closes wait what? I could have swore there was an issue for this one...
    * [x] I work here
    * [x] Tests added/passed
    * [ ] Requires documentation to be updated - okay maybe now I'll write some docs
    
    ## Detailed Description of the Pull Request / Additional comments
    
    Most of the hard work for this was already done in #6856. This is just another thing to iterate over.
    
    ## Validation Steps Performed
    * Played with this default command. It works great.
    * Added tests.
    zadjii-msft authored Aug 19, 2020
    Configuration menu
    Copy the full SHA
    eecdd53 View commit details
    Browse the repository at this point in the history
  2. Set ProcessTestResults job to use conditions specified in parent (#7347)

    Activating a template doesn't actually process conditions. Only jobs, stages, and tasks can process a condition. So specify the full condition in the parent template call as a parameter and ask the child job (who can actually evaluate the condition) to use that parameter to determine if it should run.
    miniksa authored Aug 19, 2020
    Configuration menu
    Copy the full SHA
    5a0deca View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2020

  1. Add togglePaneZoom to schema, defaults, and sort action names (#7346)

    #6989 forgot to add `togglePaneZoom` to the schema, so this does that. 
    
    WHILE I'M HERE:
    * The action names in the schema and the actual source were both in _random_ order, so I sorted them alphabetically.
    * I also added an unbound `togglePaneZoom` command to defaults.json, so users can use that command from the cmdpal w/o binding it manually.
    zadjii-msft authored Aug 20, 2020
    Configuration menu
    Copy the full SHA
    4814c4f View commit details
    Browse the repository at this point in the history
  2. Replace "bindings" with "actions" (#7332)

    In #6532, we thought it would be a good idea to add "bindings" as an
    overload for "keybindings", as we were no longer going to use the
    keybindings array for just keybindings. We were going to add commands.
    So we started secretly treating `"bindings"` the same as
    `"keybindings"`.
    
    Then, in #7175, we discussed using "actions" as the key for the list of
    commands/keybindings/global actions, instead of using "bindings". We're
    going to be using this array as the global list of all actions, so it
    makes sense to just call it `"actions"`. 
    
    This PR renames "bindings" to "actions". Fortunately, we never
    documented the "bindings" overload in the first place, so we can get
    away with this safely, and preferably before we ship "bindings" for too
    long.
    
    References #6899
    zadjii-msft authored Aug 20, 2020
    Configuration menu
    Copy the full SHA
    2c4b868 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6f991d3 View commit details
    Browse the repository at this point in the history
  4. Fix intellisense errors by moving TerminalApp projects around (#6897)

    The easiest fix was actually just moving all the source files from
    `TerminalApp` to `TerminalApp/lib`, where the appropriate `pch.h`
    actually resides.
    
    Closes #6866
    zadjii-msft authored Aug 20, 2020
    Configuration menu
    Copy the full SHA
    e238dcb View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2020

  1. Add a pair of nested, iterable default commands (#7348)

    ## Summary of the Pull Request
    ![cmdpal-default-nested-commands](https://user-images.githubusercontent.com/18356694/90684483-e6b13400-e22d-11ea-8ca6-fe90ca8d9e82.gif)
    
    Adds a pair of top-level commands that both have nested, iterable sub-commands. The "New Tab..." command has one child for each profile, and will open a new tab for that profile. The "Split Pane..." command similarly has a nested command for each profile, and also has a nested command for split auto/horizontal/vertical.
    
    ## References
    
    * megathread: #5400 
    * Would look better with icons from  #6644
    
    ## PR Checklist
    * [x] Closes #7174 
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Aug 21, 2020
    Configuration menu
    Copy the full SHA
    64e3c84 View commit details
    Browse the repository at this point in the history
  2. Provide global setting to use ATS for nextTab and prevTab (#7321)

    <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
    ## Summary of the Pull Request
    This PR splits the anchored and unanchored tab switcher into two. The anchored tab switcher is now baked into `nextTab`/`prevTab`, and the unanchored tab switcher command is just named `tabSearch`. `tabSearch` takes no arguments. To reflect this distinction, `CommandPalette.cpp` now refers to one as `TabSwitchMode` and the other as `TabSearchMode`.
    
    I've added a global setting named `useTabSwitcher` (name up for debate) that makes the Terminal use the anchored tab switcher experience for `nextTab` and `prevTab`. 
    
    I've also given the control the ability to detect <kbd>Alt</kbd> KeyUp events and to dispatch keybinding events. By listening for keybindings, the ATS can react to `nextTab`/`prevTab` invocations for navigation in addition to listening for <kbd>tab</kbd> and the arrow keys.
    
    Closes #7178 
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [x] CLA signed.
    * [x] Documentation updates: MicrosoftDocs/terminal#107
    * [x] Schema updated.
    leonMSFT authored Aug 21, 2020
    Configuration menu
    Copy the full SHA
    3d370dc View commit details
    Browse the repository at this point in the history
  3. Add icons to commands in the Command Palette (#7368)

    ## Summary of the Pull Request
    
    ![cmdpal-icons](https://user-images.githubusercontent.com/18356694/90916410-97dada00-e3a6-11ea-9fb0-755938a68a05.gif)
    
    Adds support for setting a command's `icon`. This supports a couple different scenarios:
    * setting a path to an image
    * on `"iterateOn": "profiles"` commands, setting the icon to `${profile.icon}` (to use the profile's icon)
    * setting the icon to a symbol from [Segoe MDL2 Assets](https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font)
    * setting the icon to an emoji
    * setting the icon to a character (what is an emoji other than a character, after all?)
    
    ## References
    * Big s/o to @leonMSFT in #6732, who really did all the hard work here.
    
    ## PR Checklist
    * [x] Closes #6644 
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    Importantly, the creation of these icons must occur on the UI thread. That's why it's done in a "load the path from json", then "get the actual IconSource" structure.
    
    ## Validation Steps Performed
    see the gif
    zadjii-msft authored Aug 21, 2020
    Configuration menu
    Copy the full SHA
    58efe79 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2020

  1. Compensate for VS 16.7, part 2 (#7383)

    This is just the `noexcept` part of #7319, because the CI apparently got updated overnight.
    zadjii-msft authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    55b6ace View commit details
    Browse the repository at this point in the history
  2. Add support for Commandline Mode to the CmdPal (#7293)

    ## Summary of the Pull Request
    
    Adds support for "commandline mode" to the command palette. 
    ![cmdpal-commandline-mode](https://user-images.githubusercontent.com/18356694/90263053-bbd17500-de14-11ea-8726-fee48fec5888.gif)
    
    
    This allows the user to start typing a `wt.exe` commandline directly in the command palette, to run that commandline directly in the current window. This allows the user input something like `> nt -p Ubuntu ; sp -p ssh` and open up a new tab and split it _in the current window_. 
    
    ## References
    
    * cmdpal megathread: #5400
    * Kinda related to #4472
    * built with the `wt` action from #6537
    
    ## PR Checklist
    * [x] Closes #6677
    * [x] I work here
    * [ ] Tests added/passed
    * [ ] Requires documentation to be updated - sure does, when the cmdpal docs are written in the first place :P
    
    ## Validation Steps Performed
    
    Tested manually
    zadjii-msft authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    f897ce0 View commit details
    Browse the repository at this point in the history
  3. Bind the command palette by default (#7384)

    Bind the command palette to Ctrl+Shift+P by default, to enable it for all users in v1.3
    zadjii-msft authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    17e0c11 View commit details
    Browse the repository at this point in the history
  4. TermControl: set the scrollbar jump distance to one screenful (#7385)

    Most applications with scrollable content seem to define the "large
    jump" distance as about a screenful of content. You can see this in long
    pages in Settings and documents in Notepad.
    
    We just weren't configuring ScrollBar here.
    
    Fixes #7367
    DHowett authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    a5bed25 View commit details
    Browse the repository at this point in the history
  5. version: bump to 1.4 on master

    Signed-off-by: Dustin Howett <[email protected]>
    DHowett committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    c15b808 View commit details
    Browse the repository at this point in the history
  6. schema: swap closeTabsAfter and closeOtherTabs (#7386)

    The descriptions were flipped, so I unflipped them.
    cinnamon-msft authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    6acb9f8 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2020

  1. Update clang-format to 10.0 (#7389)

    This commit removes our local copy of clang-format 8 and replaces it
    with a newly-built nuget package containing clang-format 10.
    
    This resolves the inconsistency between our version of clang-format and
    the one shipped in Visual Studio.
    
    A couple minor format changes were either required or erroneously forced
    upon us--chief among them is a redistribution of `*`s around SAL
    annotations in inline class members of COM classes. Don't ask why; I
    couldn't figure it out.
    
    We had some aspirational goals for our formatting, which were left in
    but commented out. Enabling them changes our format a little more than
    I'm comfortable with, so I uncommented them and locked them to the
    format style we've been using for the past year. We may not love it, but
    our aspirations may not matter here any longer. Consistent formatting is
    better than perfect formatting.
    DHowett authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    dbbe820 View commit details
    Browse the repository at this point in the history
  2. Clear the last error before calling Mb2Wc in ConvertToW (#7391)

    When the console functional tests are running on OneCoreUAP, the
    newly-introduced (65bd4e3, #4309) FillOutputCharacterA tests will
    actually fail because of radio interference on the return value of GLE.
    
    Fixes MSFT-28163465
    DHowett authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    4aecbf3 View commit details
    Browse the repository at this point in the history
  3. Fixed #7372: Setting "altGrAliasing" to "false" disables AltGr (#7400)

    ## Summary of the Pull Request
    
    Previously, if `altGrAliasing` was disabled, all `Ctrl+Alt` combinations were considered to be aliases of `AltGr` including `AltGr` itself and thus considered as key and not character events. But `AltGr` should not be treated as an alias of itself of course, as that prevents one from entering `AltGr` combinations entirely.
    
    ## PR Checklist
    * [x] Closes #7372
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [x] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
    
    ## Validation Steps Performed
    
    * Activate a German keyboard layout
    * Run `showkey -a` in WSL
    * **Ensure** that `AltGr+Q` produces `@`
    * **Ensure** that `Ctrl+Alt+Q` produces `@`
    * Disable `altGrAliasing`
    * **Ensure** that `AltGr+Q` produces `@`
    * **Ensure** that `Ctrl+Alt+Q` produces `^[^Q`
    lhecker authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    ac310d9 View commit details
    Browse the repository at this point in the history
  4. Fix environment block creation (#7401)

    This fixes a regression in environment variable loading introduced as part
    of the new environment block creation that prevents some system-defined,
    volatile environment variables from being defined.
    
    ## References
    #7243 (comment)
    
    ## Validation Steps Performed
    Manually verified locally.
    
    Closes #7399
    nathpete-msft authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    64f10a0 View commit details
    Browse the repository at this point in the history
  5. Make index in closeOtherTabs and closeTabsAfter optional (#7390)

    ## Summary of the Pull Request
    The `index` action argument is now optional for `closeOtherTabs` and `closeTabsAfter`. When `index` is not defined, `index` is set to the focused tab's index.
    
    Also, adds the non-index version of these actions to defaults.json.
    
    ## PR Checklist
    * [X] Closes #7181 
    * [X] CLA signed
    * [X] Tests passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [X] Schema updated.
    
    ## Validation Steps Performed
    Opened 4 tabs and ran closeOtherTabs/closeTabsAfter from command palette.
    carlos-zamora authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    2fdc88f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0488c53 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. Merged PR 5097423: Migrate OSS up to 0488c53

    Dustin L. Howett
    * Clear the last error before calling Mb2Wc in ConvertToW (GH-7391)
    * Update clang-format to 10.0 (GH-7389)
    * Add til::static_map, a constexpr key-value store (GH-7323)
    
    James Holderness
    * Refactor VT control sequence identification (CC-7304)
    
    Mike Griese
    * Compensate for VS 16.7, part 2 (GH-7383)
    * Add support for iterable, nested commands (GH-6856)
    
    Michael Niksa
    * Helix Testing (GH-6992)
    * Compensate for new warnings and STL changes in VS 16.7 (GH-7319)
    
    nathpete-msft
    * Fix environment block creation (GH-7401)
    
    Chester Liu
    * Add initial support for VT DCS sequences (CC-6328)
    
    Related work items: #28791050
    DHowett committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    f357e37 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. Fix schema for setColorScheme (#7433)

    `setColorScheme` should require `colorScheme` rather than `name`
    cinnamon-msft authored Aug 27, 2020
    Configuration menu
    Copy the full SHA
    9283781 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2020

  1. Configuration menu
    Copy the full SHA
    6c0e6d9 View commit details
    Browse the repository at this point in the history
  2. Make Profile a WinRT object (#7283)

    Profile is now a WinRT object in the TerminalApp project.
    
    As with ColorScheme, all of the serialization logic is not exposed via
    the idl. TerminalSetingsModel will handle it when it's all moved over.
    
    I removed the "Get" and "Set" prefixes from all of the Profile
    functions. It just makes more sense to use the `GETSET_PROPERTY` macro
    to do most of the work for us.
    
    `CloseOnExitMode` is now an enum off of the Profile.idl.
    
    `std::optional<wstring>` got converted to `hstring` (as opposed to
    `IReference<hstring>`). `IReference<hstring>` is not valid to MIDL.
    
    ## References
    #7141 - Profile is a settings object
    #885 - this new settings object will be moved to a new TerminalSettingsModel project
    
    ## Validation Steps Performed
    - [x] Tests passed
    - [x] Deployment succeeded
    
    Closes #7435
    carlos-zamora authored Aug 28, 2020
    Configuration menu
    Copy the full SHA
    a51091c View commit details
    Browse the repository at this point in the history
  3. Make GlobalAppSettings a WinRT object (#7349)

    GlobalAppSettings is now a WinRT object in the TerminalApp project.
    
    ## References
    #7141 - GlobalAppSettings is a settings object
    #885 - this new settings object will be moved to a new TerminalSettingsModel project
    
    ## PR Checklist
    * [x] Tests passed
    
    ## Detailed Description of the Pull Request / Additional comments
    This one was probably the easiest thus far.
    
    The only weird thing is how we handle InitialPosition. Today, we lose a
    little bit of fidelity when we convert from LaunchPosition (int) -->
    Point (float) --> RECT (long). The current change converts
    LaunchPosition (optional<long>) --> InitialPosition (long) --> RECT
    (long).
    
    NOTE: Though I could use LaunchPosition to go directly from TermApp to
    AppHost, I decided to introduce InitialPosition because LaunchPosition
    will be a part of TerminalSettingsModel soon.
    
    ## Validation Steps Performed
    - [x] Tests passed
    - [x] Deployment succeeded
    carlos-zamora authored Aug 28, 2020
    Configuration menu
    Copy the full SHA
    7803efa View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

  1. OSC 8 support for conhost and terminal (#7251)

    <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
    ## Summary of the Pull Request
    Conhost can now support OSC8 sequences (as specified [here](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)). Terminal also supports those sequences and additionally hyperlinks can be opened by Ctrl+LeftClicking on them. 
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    #204 
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [X] Closes #204 
    * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [ ] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
    
    <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
    ## Detailed Description of the Pull Request / Additional comments
    Added support to:
    
    - parse OSC8 sequences and extract URIs from them (conhost and terminal)
    - add hyperlink uri data to textbuffer/screeninformation, associated with a hyperlink id (conhost and terminal)
    - attach hyperlink ids to text to allow for uri extraction from the textbuffer/screeninformation (conhost and terminal)
    - process ctrl+leftclick to open a hyperlink in the clicked region if present
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    Open up a PowerShell tab and type
    ```PowerShell
    ${ESC}=[char]27
    Write-Host "${ESC}]8;;https://github.com/microsoft/terminal${ESC}\This is a link!${ESC}]8;;${ESC}\"
    ```
    Ctrl+LeftClick on the link correctly brings you to the terminal page on github
    
    ![hyperlink](https://user-images.githubusercontent.com/26824113/89953536-45a6f580-dbfd-11ea-8e0d-8a3cd25c634a.gif)
    PankajBhojwani authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    614507b View commit details
    Browse the repository at this point in the history
  2. Prevent crash when attempting to select an out-of-bounds UIA text ran…

    …ge (#7504)
    
    When attempting to select a text range from a different text buffer (such as a standard text range when in alt mode), conhost crashes. This PR checks for this case and returns `E_FAIL` instead, preventing this crash.
    
    ## PR Checklist
    * [x] Closes unfiled crash issue
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [x] Passes manual test below
    * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
    
    ## Validation Steps Performed
    Ran the following lines in the NVDA Python console (NVDA+control+z) before and after this PR, and observed that Conhost no longer crashes after the change:
    
    ``` Python console
    >>> # SSH to a remote Linux system
    >>> ti=nav.makeTextInfo("caret")
    >>> ti.move("line", -2)
    -2
    >>> # Switch away from the NVDA Python console, and run Nano in conhost. Then:
    >>> ti.updateSelection() # Calls select() on the underlying UIA text range
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "NVDAObjects\UIA\__init__.pyc", line 790, in updateSelection
      File "comtypesMonkeyPatches.pyc", line 26, in __call__
    _ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
    ```
    codeofdusk authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    c808ed9 View commit details
    Browse the repository at this point in the history
  3. Merged PR 5131018: [Git2Git] Migrate OS changes to console property s…

    …heet manifest
    
    Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp dd0c54d9abd94dea1ffe956373a4c20b30a6151e
    
    Related work items: MSFT-26187783
    DHowett committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    4c75ffb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    97c2ccf View commit details
    Browse the repository at this point in the history
  5. Add profiles to the Jumplist (#7515)

    This commit introduces Jumplist customization and an item for each
    profile to the Jumplist. Selecting an entry in the jumplist will pretty
    much just execute  `wt.exe -p "{profile guid}"`, and so a new Terminal
    will open with the selected profile.
    
    Closes #576
    leonMSFT authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    9279b7a View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2020

  1. Update to a newer MUX prerelease; remove workaround for compact sizing (

    #7447)
    
    Update the WinUI version which allows us to remove the workaround.
    
    Closes #6681
    marcelwgn authored Sep 4, 2020
    Configuration menu
    Copy the full SHA
    5330759 View commit details
    Browse the repository at this point in the history
  2. docs: use unlikely example versions in nuget package script (#7448)

    * Update doc
    
    * Change last digit
    marcelwgn authored Sep 4, 2020
    Configuration menu
    Copy the full SHA
    5ba992a View commit details
    Browse the repository at this point in the history
  3. Add support for DECSCUSR "0" to restore cursor to user default (#7379)

    This PR is about the behavior of DECSCUSR. This PR changes the meaning
    of DECSCUSR 0 to restore the cursor style back to user default. This
    differs from what VT spec says but it’s used in popular terminal
    emulators like iTerm2 and VTE-based ones. See #1604. 
    
    Another change is that for parameter greater than 6, DECSCUSR should be
    ignored, instead of restoring the cursor to legacy. This PR fixes it.
    See #7382.
    
    Fixes #1604.
    skyline75489 authored Sep 4, 2020
    Configuration menu
    Copy the full SHA
    7ab4d45 View commit details
    Browse the repository at this point in the history
  4. Keep degenerate UIA text ranges degenerate after movement (#7530)

    Conhost expands UIA text ranges when moved. This means that degenerate
    ranges become non-degenerate after movement, leading to odd behaviour
    from UIA clients. This PR doesn't expand degenerate ranges, but rather
    keeps them degenerate by moving `_end` to the newly-changed `_start`.
    
    Tested in the NVDA Python console (cases with `setEndPoint` and
    `compareEndPoints` described in #7342). Also ran the logic by
    @michaelDCurran.
    
    Closes #7342
    
    Almost definitely addresses nvaccess/nvda#11288 (although I'll need to
    test with my Braille display). Also fixes an issue privately reported to
    me by @Simon818 with copy/paste from review cursor which originally lead
    me to believe the issue was with `moveEndPointByRange`.
    codeofdusk authored Sep 4, 2020
    Configuration menu
    Copy the full SHA
    7a03f75 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2020

  1. Revert "Update to a newer MUX prerelease; remove workaround for compa…

    …ct sizing (#7447)"
    
    This reverts commit 5330759.
    
    Fixes #7553
    DHowett committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    230b86c View commit details
    Browse the repository at this point in the history
  2. jumplist: prefer the app execution alias in %LOCALAPPDATA% (#7567)

    By setting the jumplist entries to launch `WindowsTerminal.exe` out of
    the package root, we've inadvertently made WindowsTerminalDev emit jump
    list entries that launch the _unpackaged_ version of Terminal.
    
    We can fix this by copying the code from the shell extension that
    determines which version of the executable to launch -- wt, wtd or
    WindowsTerminal -- depending on the context under which it was invoked.
    
    Fixes #7554
    DHowett authored Sep 8, 2020
    Configuration menu
    Copy the full SHA
    b2cfd0a View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Remove AcrylicOpacity from AzureCloudShellGenerator (#7573)

    Removed Acrylic Opacity from AzureCloudShellGenerator.
    
    ## PR Checklist
    * [x] Closes #7245 
    * [x] CLA signed
    * [x] I've discussed this with core contributors already
    KnapSac authored Sep 9, 2020
    Configuration menu
    Copy the full SHA
    c28efc3 View commit details
    Browse the repository at this point in the history
  2. Make CascadiaSettings a WinRT object (#7457)

    CascadiaSettings is now a WinRT object in the TerminalApp project.
    
    ## References
    #7141 - CascadiaSettings is a settings object
    #885 - this new settings object will be moved to a new TerminalSettingsModel project
    
    This one _looks_ big, but most of it is really just propagating the
    changes to the tests. In fact, you can probably save yourself some time
    because the tests were about an hour of Find&Replace.
    
    `CascadiaSettings::GetCurrentAppSettings()` was only being used in
    Pane.cpp. So I ripped out the 3 lines of code and stuffed them in there.
    
    Follow-up work:
    - There's a few places in AppLogic where I `get_self` to be able to get
      the warnings out. This will go away in the next PR (wrapping up #885)
    
    ## Validation Steps Performed
    - [x] Tests passed
    - [X] Deployment succeeded
    
    Closes #7141
    carlos-zamora authored Sep 9, 2020
    Configuration menu
    Copy the full SHA
    c5cf7b8 View commit details
    Browse the repository at this point in the history
  3. Add initial settings UI spec (#6720)

    ## Summary of the Pull Request
    
    This is the spec for the overall functionality of the settings UI - #1564.
    
    There are proposals for the launch method and editing and saving settings that we should discuss.
    
    
    ## Detailed Description of the Pull Request / Additional comments
    
    ### [spec.md](https://github.com/microsoft/terminal/blob/cinnamon/spec-settings-ui/doc/specs/%231564%20-%20Settings%20UI/spec.md)
    ### [design.md](https://github.com/microsoft/terminal/blob/cinnamon/spec-settings-ui/doc/specs/%231564%20-%20Settings%20UI/design.md)
    cinnamon-msft authored Sep 9, 2020
    Configuration menu
    Copy the full SHA
    1c7ee65 View commit details
    Browse the repository at this point in the history
  4. Destruct ConptyConnection on a background thread (#7575)

    This commit leverages C++/WinRT's final_release [extension point] to
    pull the final destruction of ConptyConnection off onto a background
    thread.
    
    We've been seeing some deadlocks during teardown where the output thread
    (holding the last owning reference to the connection) was trying to
    destruct the threadpool wait while the threadpool wait was
    simultaneously running its callback and waiting for the output thread to
    terminate. It turns out that trying to release a threadpool wait while
    it's running a callback that's blocked on you will absolutely result in
    a deadlock.
    
    Fixes #7392.
    
    [extension point]: https://devblogs.microsoft.com/oldnewthing/20191018-00/?p=103010
    DHowett authored Sep 9, 2020
    Configuration menu
    Copy the full SHA
    27f7ce7 View commit details
    Browse the repository at this point in the history
  5. Switch all DSR responses to appending instead of prepending (#7583)

    This fixes an issue where two CPRs could end up corrupted in the input
    buffer. An application that sent two CPRs back-to-back could
    end up reading the first few characters of the first prepended CPR
    before handing us another CPR. We would dutifully prepend it to the
    buffer, causing them to overlap.
    
    ```
    ^[^[2;2R[1;1R
    ^^      ^^^^^ First CPR
      ^^^^^^ Second CPR
    ```
    
    The end result of this corruption is that a requesting application
    would receive an unbidden `R` on stdin; for vim, this would trigger
    replace mode immediately on startup.
    
    Response prepending was implemented in !997738 without much comment.
    There's very little in the way of audit trail as to why we switched.
    Michael believes that we wanted to make sure that applications got DSR
    responses immediately. It had the unfortunate side effect of causing
    subsequence CPRs across cursor moves to come out in the wrong order.
    
    I discussed our options with him, and he suggested that we could
    implement a priority queue in InputBuffer and make sure that "response"
    input was dispatched to a client application before any application- or
    user-generated input. This was deemed to be too much work.
    
    We decided that DSR responses getting top billing was likely to be a
    stronger guarantee than most terminals are capable of giving, and that
    we should be fine if we just switch it back to append.
    
    Thanks to @k-takata, @Tekki and @brammool for the investigation on the
    vim side.
    
    Fixes #1637.
    DHowett authored Sep 9, 2020
    Configuration menu
    Copy the full SHA
    cb037f3 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. Display URI tooltip, render dashed/solid underline for links (#7420)

    - Render hyperlinks with a dashed underline
    - Render hovered hyperlinks with a solid underline
    - Show URI tooltip on hover
    
    TermControl now has a canvas that contains a tiny border to which a
    tooltip is attached. When we hover over hyperlinked text, we move the
    border to the mouse location and update the tooltip content with the
    URI. 
    
    Introduced a new underline type (HyperlinkUnderline), supports rendering
    for it, and uses it to render hyperlinks. HyperlinkUnderline is usually
    a dashed underline, but when a link is hovered, all text with the same
    hyperlink ID is rendered with a solid underline. 
    
    References #5001
    PankajBhojwani authored Sep 10, 2020
    Configuration menu
    Copy the full SHA
    be50e56 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2020

  1. oss: add a manifest for x11's rgb database (#7600)

    We will want to add support for the x11 color names.
    The name table is are MIT-licensed by the X.org Foundation.
    DHowett authored Sep 11, 2020
    Configuration menu
    Copy the full SHA
    c3ddfab View commit details
    Browse the repository at this point in the history
  2. Open up content dialogs for invalid URIs and unsupported schemes (#7523)

    If a user clicks a link that is either invalid (cannot be parsed) or has
    a scheme we do not support (like file or mailto (for now)), we open up a
    dialog box telling them the issue.
    
    References #5001
    PankajBhojwani authored Sep 11, 2020
    Configuration menu
    Copy the full SHA
    1377dbc View commit details
    Browse the repository at this point in the history
  3. Add serialization error handling to settings projection layer (#7576)

    Now that CascadiaSettings is a WinRT object, we need to update the error
    handling a bit. Making it a WinRT object limits our errors to be
    hresults. So we moved all the error handling down a layer to when we
    load the settings object.
    
    - Warnings encountered during validation are saved to `Warnings()`.
    - Errors encountered during validation are saved to `GetLoadingError()`.
    - Deserialization errors (mainly from JsonUtils) are saved to
      `GetDeserializationErrorMessage()`.
    
    ## References
    #7141 - CascadiaSettings is a settings object
    #885 - this makes ripping out CascadiaSettings into
         TerminalSettingsModel much easier
    
    ## Validation Steps Performed
    * [x] Tests passed
    - [x] Deployment succeeded
       - tested with invalid JSON (deserialization error)
       - tested with missing DefaultProfile (validation error)
    carlos-zamora authored Sep 11, 2020
    Configuration menu
    Copy the full SHA
    892cf05 View commit details
    Browse the repository at this point in the history
  4. Fix OSC8 termination over the PTY after SGR 0 (#7608)

    We were prematurely clearing the hyperlink ID by resetting the
    _lastTextAttributes. We should only clear the fields we want
    cleared.
    
    Fixes #7597.
    PankajBhojwani authored Sep 11, 2020
    Configuration menu
    Copy the full SHA
    88d1527 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Make til::color's COLORREF conversion more optimal (#7619)

    Clang (10) has no trouble optimizing the COLORREF conversion operator to
    a simple 32-bit load with mask (!) even though it's a series of bit
    shifts across multiple struct members.
    
    MSVC (19.24) doesn't make the same optimization decision, and it emits
    three 8-bit loads and some shifting.
    
    In any case, the optimization only applies at -O2 (clang) and above.
    
    In this commit, we leverage the spec-legality of using unions for type
    conversions and the overlap of four uint8_ts and a uint32_t to make the
    conversion very obvious to both compilers.
    
    x86_64 msvc | O0 | O1 | O2
    ------------|----|----|--------------------
    shifts      | 12 | 11 | 11 (fully inlined)
    union       |  5 |  1 |  1 (fully inlined)
    
    x86_64 clang | O0 | O1 | O2 + O3
    -------------|----|----|--------------------
    shifts       | 14 |  5 |  1 (fully inlined)
    union        |  9 |  3 |  1 (fully inlined)
    
    j4james brought up some concerns about til::color's minor wastefulness
    in #7578 (comment).
    
    This is a clear, simple transformation that saves us a few instructions
    in a relatively common case, so I'm accepting a micro-optimization even
    though we don't have data showing this to be a hot spot.
    DHowett authored Sep 14, 2020
    Configuration menu
    Copy the full SHA
    c17f448 View commit details
    Browse the repository at this point in the history
  2. Introduce KeyMapping and Move TerminalSettings construction (#7537)

    `KeyMapping` was introduced to break up `AppKeyBindings`. `KeyMapping`
    records the keybindings from the JSON and lets you query them.
    `AppKeyBindings` now just holds a `ShortcutActionDispatcher` to run
    actions, and a `KeyMapping` to record/query your existing keybindings.
    This refactor allows `KeyMapping` to be moved to the
    TerminalSettingsModel, and `ShortcutActionDispatcher` and
    `AppKeyBindings` will stay in TerminalApp.
    
    `AppKeyBindings` had to be passed down to a terminal via
    `TerminalSettings`. Since each settings object had its own
    responsibility to update/create a `TerminalSettings` object, I moved all
    of that logic to `TerminalSettings`. This helps with the
    TerminalSettingsModel refactor, and makes the construction of
    `TerminalSettings` a bit cleaner and more centralized.
    
    ## References
    #885 - this is all in preparation for the TerminalSettingsModel
    
    ## Validation Steps Performed
    - [x] Tests passed
    - [X] Deployment succeeded
    carlos-zamora authored Sep 14, 2020
    Configuration menu
    Copy the full SHA
    abf8805 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. Merged PR 5181181: Migrate OSS up to abf8805

    Related work items: MSFT-29391837
    DHowett committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    2f8b3c4 View commit details
    Browse the repository at this point in the history
  2. Merged PR 5181334: OS build fixes on top of abf8805

    til::color
    It turns out that clang/gcc are okay with the anonymous
    struct, but the CL we use in Windows was not.
    DHowett committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    6c7a3ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    515c9f2 View commit details
    Browse the repository at this point in the history
  4. Fix code format from inbox

    It appears as though the pragma above broke the format below.
    DHowett committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    863e3e5 View commit details
    Browse the repository at this point in the history
  5. Preprocess and convert C1 controls to their 7 bit equivalent (#7340)

    C1 control characters are now first converted to their 7 bit equivalent.
    This allows us to unify the logic of C1 and C0 escape handling. This
    also adds support for SOS/PM/APC string.
    
    * Unify the logic for C1 and C0 escape handling by converting C1 to C0
      beforehand. This adds support for various C1 characters, including
      IND(8/4), NEL(8/5), HTS(8/8), RI(8/13), SS2(8/14), SS3(8/15),
      OSC(9/13), etc. 
    * Add support for SOS/PM/APC escape sequences. Fixes #7032
    * Use "Variable Length String" logic to unify the string termination
      handling of OSC, DCS and SOS/PM/APC. This fixes an issue where OSC
      action is successfully dispatched even when terminated with non-ST
      character. Introduced by #6328, the DCS PassThrough is spared from
      this issue. This PR puts them together and add test cases for them.
    
    References:
    https://vt100.net/docs/vt510-rm/chapter4.html
    https://vt100.net/emu/dec_ansi_parser
    
    Closes #7032
    Closes #7317
    skyline75489 authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    f91b53d View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

  1. Configuration menu
    Copy the full SHA
    5d823f5 View commit details
    Browse the repository at this point in the history
  2. Fix failing HyperlinkIdConsistency unit test (#7655)

    ## Summary of the Pull Request
    
    This fixes a typo in the `HyperlinkIdConsistency` unit test which was causing that test to fail. It was mistakenly using a `/` instead of `\` for the string terminator sequences.
    
    ## References
    
    The test initially worked because of a bug in the state machine parser, but that bug was recently fixed in PR #7340.
    
    ## PR Checklist
    * [x] Closes #7654
    * [x] CLA signed. 
    * [x] Tests passed
    * [ ] Documentation updated. 
    * [ ] Schema updated.
    * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.
    
    ## Validation Steps Performed
    
    I've run the test again and it now passes.
    j4james authored Sep 17, 2020
    Configuration menu
    Copy the full SHA
    c033594 View commit details
    Browse the repository at this point in the history
  3. Update ColorScheme with Json Serializer and color table API (#7609)

    Add `ToJson()` to the `ConversionTrait`s in JsonUtils. This can be used
    to serialize settings objects into JSON.
    
    As a proof of concept, `ToJson` and `UpdateJson` were added to
    `ColorScheme`.
    
    Getters and setters for members and colors in the color table were added
    and polished.
    
    ## References
    #1564 - Settings UI
    
    `ColorScheme` is a particularly easy example of serialization because it
    has _no fallback_.
    
    Added a few tests for JSON serializers.
    carlos-zamora authored Sep 17, 2020
    Configuration menu
    Copy the full SHA
    b70ffdf View commit details
    Browse the repository at this point in the history
  4. Update Cascadia Code to 2009.14 (#7648)

    2009.14 brings support for the Salishan language family and some bug fixes.
    DHowett authored Sep 17, 2020
    Configuration menu
    Copy the full SHA
    d1981b5 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2020

  1. Give Tab ownership of its SwitchToTab command (#7659)

    Currently, `CommandPalette` creates and maintains the `SwitchToTab`
    commands used for the ATS. When `Command` goes into the
    TerminalSettingsModel, the palette won't be able to access `Command`'s
    implementation type, making it difficult for `CommandPalette` to tell
    `Command` to listen to `Tab` for changes.
    
    This PR changes the relationship up so `Tab` now manages its
    `SwitchToTab` command, and `CommandPalette` just plops the command from
    `Tab` into its list.
    leonMSFT authored Sep 18, 2020
    Configuration menu
    Copy the full SHA
    468c8c6 View commit details
    Browse the repository at this point in the history
  2. Make sure we don't hide the cursor until the IME starts (#7673)

    Some IME implementations do not produce composition strings, and their
    users have come to rely on the cursor that conhost traditionally left on
    until a composition string showed up. We shouldn't hide the cursor until
    we get a string (as opposed to hiding it when composition begins) so as
    to not break those IMEs.
    
    Related to #6207.
    
    Fixes MSFT:29219348
    DHowett authored Sep 18, 2020
    Configuration menu
    Copy the full SHA
    ef83aa3 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2020

  1. Wrap the textblock containing the "invalid" URI (#7694)

    It looks much better this way.
    DHowett authored Sep 21, 2020
    Configuration menu
    Copy the full SHA
    f6cc020 View commit details
    Browse the repository at this point in the history
  2. Update userDefaults from "keybindings" to "actions" (#7692)

    * Update userDefaults from "keybindings" to "actions"
    
    * dfgdsafretgjhfg
    DHowett authored Sep 21, 2020
    Configuration menu
    Copy the full SHA
    1e3236c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    206131d View commit details
    Browse the repository at this point in the history
  4. Add support for the "blink" graphic rendition attribute (#7490)

    This PR adds support for the _blink_ graphic rendition attribute. When a
    character is output with this attribute set, it "blinks" at a regular
    interval, by cycling its color between the normal rendition and a dimmer
    shade of that color.
    
    The majority of the blinking mechanism is encapsulated in a new
    `BlinkingState` class, which is shared between the Terminal and Conhost
    implementations. This class keeps track of the position in the blinking
    cycle, which determines whether characters are rendered as normal or
    faint. 
    
    In Windows Terminal, the state is stored in the `Terminal` class, and in
    Conhost it's stored in the `CONSOLE_INFORMATION` class. In both cases,
    the `IsBlinkingFaint` method is used to determine the current blinking
    rendition, and that is passed on as a parameter to the
    `TextAttribute::CalculateRgbColors` method when these classes are
    looking up attribute colors.
    
    Prior to calculating the colors, the current attribute is also passed to
    the `RecordBlinkingUsage` method, which keeps track of whether there are
    actually any blink attributes in use. This is used to determine whether
    the screen needs to be refreshed when the blinking cycle toggles between
    the normal and faint renditions.
    
    The refresh itself is handled by the `ToggleBlinkingRendition` method,
    which is triggered by a timer. In Conhost this is just piggybacking on
    the existing cursor blink timer, but in Windows Terminal it needs to
    have its own separate timer, since the cursor timer is reset whenever a
    key is pressed, which is not something we want for attribute blinking.
    
    Although the `ToggleBlinkingRendition` is called at the same rate as the
    cursor blinking, we actually only want the cells to blink at half that
    frequency. We thus have a counter that cycles through four phases, and
    blinking is rendered as faint for two of those four. Then every two
    cycles - when the state changes - a redraw is triggered, but only if
    there are actually blinking attributes in use (as previously recorded).
    
    As mentioned earlier, the blinking frequency is based on the cursor
    blink rate, so that means it'll automatically be disabled if a user has
    set their cursor blink rate to none. It can also be disabled by turning
    off the _Show animations in Windows_ option. In Conhost these settings
    take effect immediately, but in Windows Terminal they only apply when a
    new tab is opened.
    
    This PR also adds partial support for the `SGR 6` _rapid blink_
    attribute. This is not used by DEC terminals, but was defined in the
    ECMA/ANSI standards. It's not widely supported, but many terminals just
    it implement it as an alias for the regular `SGR 5` blink attribute, so
    that's what I've done here too.
    
    ## Validation Steps Performed
    
    I've checked the _Graphic rendition test pattern_ in Vttest, and
    compared our representation of the blink attribute to that of an actual
    DEC VT220 terminal as seen on [YouTube]. With the right color scheme
    it's a reasonably close match.
    
    [YouTube]: https://www.youtube.com/watch?v=03Pz5AmxbE4&t=1m55s
    
    Closes #7388
    j4james authored Sep 21, 2020
    Configuration menu
    Copy the full SHA
    d1671a0 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2020

  1. version: bump to 1.5 on master

    Signed-off-by: Dustin Howett <[email protected]>
    DHowett committed Sep 22, 2020
    Configuration menu
    Copy the full SHA
    49b9d41 View commit details
    Browse the repository at this point in the history
  2. Add docs for creating a new DLL (#7661)

    This PR adds a docs page for the gotchas and things to do when creating a new WinRT dll project.
    leonMSFT authored Sep 22, 2020
    Configuration menu
    Copy the full SHA
    9539ec3 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2020

  1. Fix A11y EndExclusive Error for Move & Expand (#7677)

    `EndExclusive` represents the end of the buffer. This is designed to not
    point to any data on the buffer. UiaTextRange would point to this
    `EndExclusive` and then attempt to move based on it. However, since it
    does not point to any data, it could experience undefined behavior or
    (inevitably) crash from running out of bounds.
    
    This PR specifically checks for expansion and movement at that point,
    and prevents us from moving beyond it. There are plans in the future to
    define the "end" as the last character in the buffer. Until then, this
    solution will suffice and provide correct behavior that doesn't crash.
    
    ## Validation Steps Performed
    Performed the referenced bugs' repro steps and added test coverage.
    
    Closes MSFT-20458595
    Closes #7663
    Closes #7664
    carlos-zamora authored Sep 23, 2020
    Configuration menu
    Copy the full SHA
    40893b2 View commit details
    Browse the repository at this point in the history
  2. Normalize file paths before handing them to the jumplist (#7711)

    DestListLogoUri cannot handle paths that are separated with / unless
    they're actually URLs. We have to guess somewhat whether something is a
    file path and if it appears to be one, normalize it.
    
    Fixes #7706
    DHowett authored Sep 23, 2020
    Configuration menu
    Copy the full SHA
    f28ec65 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2020

  1. When win32 is resizing the viewport, make sure Right > Left (#7768)

    Sometimes when we were sliding the viewport to fit inside the buffer, we
    would end up with left > right.
    
    That would cause us to crash down the line when rendering.
    
    Fixes MSFT:28387423
    Fixes #7744
    DHowett authored Sep 28, 2020
    Configuration menu
    Copy the full SHA
    c3b3f5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3cf31fb View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2020

  1. Introduce til::presorted_static_map (#7640)

    til::static_map can't be constexpr until we move to C++20.
    It can't be constexpr because std::sort isn't constexpr until then.
    This poses a problem: if we start using it and treating it like a map,
    we'll incur a potentially high cost in static initialization in both
    code size in .text and runtime.
    
    This commit introduces presorted_static_map, which is static_map except
    that it doesn't automatically sort its keys. That's the only difference.
    
    At this point, it's just a maplike interface to a constant array of
    pairs that does a binary search. It should be used for small tables that
    are used infrequently enough as to not warrant their cost in code size
    or initialization time. It should also be used for tables that aren't
    going to be edited much by developers (like the color table in #7578.)
    DHowett authored Sep 29, 2020
    Configuration menu
    Copy the full SHA
    6f05114 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2020

  1. Fix and test TextBuffer::MoveToPreviousWord() (#7770)

    This fixes a bug when moving backwards by word that resulted in #7742.
    
    This also includes...
    - a minor refactor that leverages `GetWordStart` in `MoveToPreviousWord`
    - additional unit tests for movement by word
    - a feature test comprised of the referenced bug report
    
    `MoveToPreviousWord()` would...
    - move backwards for each whitespace character
    - then, move backwards for each regular character
    
    This would actually result in moving to the beginning of the current "word" (as defined by a11y).
    
    We actually need to do this process twice:
    - the first time gets you to the beginning of the current word
    - attempt to move back by one character
    - the second time gets you to the beginning of the previous word
    
    Rather than implementing 4 while loops, we leverage `GetWordStart()` to
    attempt to move to the beginning of the previous word. We call it twice
    (as described above). The logic is unchanged, but we instead reuse a
    function that has already undergone more testing.
    
    To make sure this works as expected, additional unit tests were
    introduced covering "MoveByWord" in the TextBuffer.
    
    ## Validation Steps Performed
    Added test for repro steps.
    Added unit tests for movement by word.
    
    Closes #7742
    carlos-zamora authored Sep 30, 2020
    Configuration menu
    Copy the full SHA
    9ec57a7 View commit details
    Browse the repository at this point in the history
  2. Fix parallel builds by specifying the application type for WAP (#7783)

    The WAP packaging project is sensitive to including applications that it
    thinks are UWPs. The changes we made to separate WindowsStoreApp and
    WindowsAppContainer weren't comprehensive enough to convince WAP that we
    were not still UWPs.
    
    Because of that, it would run sub-builds of each of these projects (and
    all their dependencies) with an additional `GenerateAppxPackageOnBuild`
    property set. The existence of this property caused MSBuild to think the
    projects needed to be built *again*.
    DHowett authored Sep 30, 2020
    Configuration menu
    Copy the full SHA
    da4ca86 View commit details
    Browse the repository at this point in the history
  3. Add optimization to get a11y next word (#7789)

    This performs a minor refactor on `TextBuffer::MoveToNextWord` that
    relies more heavily on `TextBuffer::GetWordEnd`. Now, the logic is
    simplified and looks more like `MoveToPreviousWord`.
    
    This refactor required me to move the `lastCharPos` optimization down to
    `GetWordEnd`. So word expansion gets this optimization for free now.
    
    ### WPR Traces
    The percentages below represent the weight that a function call had. The
    test scenario included moving by word on the CMD welcome message until
    the last word was reached. Inspect.exe was used to limit any additional
    calls that are generally performed by a screen reader.
    
    | function   | current | branch |
    | --         | --      | --     |
    | `UIA:Move` | 34.55%  | 29.52% |
    
    There is an improvement of about 5% in a release build of ConHost.
    
    NOTE: `UIA::Move` already calls `Expand` after a move operation is
    performed. I'm using this data to represent a performance improvement
    across both functions.
    
    Contributes to #5243
    carlos-zamora authored Sep 30, 2020
    Configuration menu
    Copy the full SHA
    386ae04 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2020

  1. Add support for the BEL control in Windows Terminal (#7679)

    This commit makes the Windows Terminal play an audible sound when the
    `BEL` control character is output.
    
    The `BEL` control was already being forwarded through conpty, so it was
    just a matter of hooking up the `WarningBell` dispatch method to
    actually play a sound. I've used the `PlaySound` API to output the sound
    configured for the "Critical Stop" system event (aka _SystemHand_),
    since that is the sound used in conhost.
    
    ## Validation
    
    I've manually confirmed that the terminal produces the expected sound
    when executing `echo ^G` in a cmd shell, or `printf "\a"` in a WSL bash
    shell.
    
    References:
    * There is a separate issue (#1608) to deal with configuring the `BEL`
      to trigger visual forms of notification.
    * There is also an issue (#2360) requesting an option to disable the
      `BEL`.
    
    Closes #4046
    j4james authored Oct 1, 2020
    Configuration menu
    Copy the full SHA
    09cc5f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a11497 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2020

  1. Properly handle and test a11y movement at end of buffer (#7792)

    The `MovementAtExclusiveEnd` test was improperly authored for the
    following reasons:
    - it should have used `TEST_METHOD_PROPERTY` to cover all of the
      TextUnits
    - TextUnit::Document (arguably one of the most important) was ommitted
      accidentally (`!= TextUnit_Document` was used instead of `<=`)
    - The created range was not `EndExclusive`, but rather, the last cell in
      the buffer (`EndInclusive`)
    
    The first half of this PR fixes the test.
    
    The second half of this PR expands the test and fixes any related issues
    to make the test pass (i.e. #7771):
    - `TEST_METHOD_PROPERTY` was added for it to be degenerate (start/end at
      `EndExclusive`) or not (last cell of buffer)
    - `utr->_start` is now also validated after moving backwards
    
    NOTE: `utr->_start` was not validated when moving forwards because
    moving forwards should always fail when at/past the last chell in the
    buffer.
    
    Closes #7771
    carlos-zamora authored Oct 5, 2020
    Configuration menu
    Copy the full SHA
    e401edf View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2020

  1. Introduce TerminalSettingsModel project (#7667)

    Introduces a new TerminalSettingsModel (TSM) project. This project is
    responsible for (de)serializing and exposing Windows Terminal's settings
    as WinRT objects.
    
    ## References
    #885: TSM epic
    #1564: Settings UI is dependent on this for data binding and settings access
    #6904: TSM Spec
    
    In the process of ripping out TSM from TerminalApp, a few other changes
    were made to make this possible:
    1. AppLogic's `ApplicationDisplayName` and `ApplicationVersion` was
       moved to `CascadiaSettings`
       - These are defined as static functions. They also no longer check if
         `AppLogic::Current()` is nullptr.
    2. `enum LaunchMode` was moved from TerminalApp to TSM
    3. `AzureConnectionType` and `TelnetConnectionType` were moved from the
       profile generators to their respective TerminalConnections
    4. CascadiaSettings' `SettingsPath` and `DefaultSettingsPath` are
       exposed as `hstring` instead of `std::filesystem::path`
    5. `Command::ExpandCommands()` was exposed via the IDL
       - This required some of the warnings to be saved to an `IVector`
         instead of `std::vector`, among some other small changes.
    6. The localization resources had to be split into two halves.
       - Resource file linked in init.cpp. Verified at runtime thanks to the
         StaticResourceLoader.
    7. Added constructors to some `ActionArgs`
    8. Utils.h/cpp were moved to `cascadia/inc`. `JsonKey()` was moved to
       `JsonUtils`. Both TermApp and TSM need access to Utils.h/cpp.
    
    A large amount of work includes moving to the new namespace
    (`TerminalApp` --> `Microsoft::Terminal::Settings::Model`).
    
    Fixing the tests had its own complications. Testing required us to split
    up TSM into a DLL and LIB, similar to TermApp. Discussion on creating a
    non-local test variant can be found in #7743.
    
    Closes #885
    carlos-zamora authored Oct 6, 2020
    Configuration menu
    Copy the full SHA
    2608e94 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2020

  1. Preview tab switching with the ATS (#7796)

    ## Summary of the Pull Request
    
    ![preview-ats-000](https://user-images.githubusercontent.com/18356694/94801728-18302a00-03ac-11eb-851d-760b92ebb46f.gif)
    
    This PR enables the ATS to display the active tab as the user navigates the tab switcher. We do this by dispatching the tab switch actions as the user navigates the menu, and manually _not_ focusing the new tab when the tab switcher is open. 
    
    ## References
    
    * #6732 - original tab switcher PR
    * #6689 - That's a more involved, generic version of this, but this PR will be enough to stop most of the complaints hopefully
    
    
    ## PR Checklist
    * [x] Closes #7409
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    
    Opened tabs, tabbed through the menu, verified that it did what I'd expect
    zadjii-msft authored Oct 7, 2020
    Configuration menu
    Copy the full SHA
    22887d7 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2020

  1. Fix old reference to TermApp::Command (#7863)

    #7796 and #7667 were being implemented concurrently. As a part of #7667, Command was moved from TermApp to TSM. This just applies that change to a line we missed in #7796 and fixes the build break.
    carlos-zamora authored Oct 8, 2020
    Configuration menu
    Copy the full SHA
    ba79d53 View commit details
    Browse the repository at this point in the history
  2. Introduce IconConverter (#7830)

    ## Summary of the Pull Request
    Introduce the `IconPathConverter` to `TerminalApp`. `Command` and `Profile` now both return the unexpanded icon path. `IconPathConverter` is responsible for expanding the icon path and retrieving the appropriate icon source.
    
    This also removes `Profile`'s expanded icon path and uses the `IconPathConverter` when necessary. This allows users to set profile icons to emoji as well. However, emoji do not appear in the jumplist.
    
    ## References
    Based on #7667 
    
    ## PR Checklist
    * [X] Closes #7784 
    * [x] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [x] Schema updated.
    
    ## Validation Steps Performed
    Deploy succeeded.
    carlos-zamora authored Oct 8, 2020
    Configuration menu
    Copy the full SHA
    4fc607a View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2020

  1. BUILD: Disable parallel build

    The build agents can't handle the size of our PCH files.
    
    Signed-off-by: Dustin Howett <[email protected]>
    DHowett committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    91ccbb7 View commit details
    Browse the repository at this point in the history
  2. Add Spec for winrt TerminalSettings (#6904)

    ## Summary of the Pull Request
    This introduces a spec for (what I like to call) winrt TerminalSettings. Basically, we need to move over some of the code that resides in TerminalApp that relates to the settings model, then expose some of the settings objects as winrt objects. Doing so will allow us to access/modify settings across different project layers (a must-have for the Settings UI).
    
    ## References
    #885 - winrt Terminal Settings issue
    #1564 - spec for most of the backend work for Settings UI
    carlos-zamora authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    f0b8875 View commit details
    Browse the repository at this point in the history
  3. From orbit, nuke the Telnet connection and all supporting infra. (#7840)

    This is not going to be our plan of record for Universal going forward.
    
    This updates the Universal configuration to 1) match non-universal and 2) switch to local applications
    DHowett authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    d33ca7e View commit details
    Browse the repository at this point in the history
  4. Fix UIA ScrollIntoView at EndExclusive (#7868)

    `ScrollIntoView` is responsible for scrolling the viewport to include
    the UTR's start endpoint. The crash was caused by `start` being at the
    exclusive end, and attempting to scroll to it. This is now fixed by
    clamping the result to the bottom of the buffer.
    
    Most of the work here is to allow a test for this. `ScrollIntoView`
    relied on a virtual `ChangeViewport` function. By making that
    non-virtual, the `DummyElementProvider` in the tests can now be a
    `ScreenInfoUiaProviderBase`. This opens up the possibility of more
    UiaTextRange tests in the future too.
    
    Closes #7839
    carlos-zamora authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    7a1932c View commit details
    Browse the repository at this point in the history
  5. Hook up the WIL fallback error tracer in Terminal (#7864)

    This pull request introduces (a very, very stripped-down copy of) the
    WIL fallback error reporter.
    
    It emits error records, usually immediately before the application
    implodes, into the event stream.
    
    This should improve diagnosability of issues that take Terminal down,
    and allow us to give out a .wprp file to gather traces from users.
    DHowett authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    cd76893 View commit details
    Browse the repository at this point in the history
  6. wpf: Add AutoFill to control whether the connection/buffer resizes (#…

    …7853)
    
    Adds the ability to manually handle the terminal renderer resizing
    events by allowing different render size and WPF control size. This is
    done by adding an `AutoFill` property to the control that prevents the
    renderer from automatically resizing and tells the WPF control to fill
    in the extra space with the terminal background as shown below:
    
    This PR adds the following:
    - Helper method in the DX engine to convert character viewports into
      pixel viewports
    - `AutoFill` property that prevents automatic resizing of the renderer
    - Tweaks and fixes that automatically fill in the empty space if
      `AutoFill` is set to false
    - Fixes resizing methods and streamlines their codepath
    
    ## Validation Steps Performed
    Manual validation with the Visual Studio Integrated Terminal tool
    window.
    javierdlg authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    9e86e29 View commit details
    Browse the repository at this point in the history
  7. Add an animation to pane entrance/exit (#7364)

    Adds an entrance animation when panes are created. This animation can be
    disabled with the `disableAnimations` global setting. 
    
    Although the XAML animation documentation was pretty heavy on the _do it
    in XAML_ route, our panes are created pretty much entirely in code, so
    we've got to create the animations in code as well. 
    
    200ms as the duration of the animation was picked _super_ arbitrarily.
    300ms felt too long, and 166ms felt like it was only visible for a
    single frame. 
    
    see also:
    * [Motion in practice](https://docs.microsoft.com/en-us/windows/uwp/design/motion/motion-in-practice)
    * [This example](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Media.Animation.Storyboard?view=winrt-19041#examples) what what I ended up using, albeit ported to cppwinrt.
    * [`Timeline.AllowDependentAnimations`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.animation.timeline.allowdependentanimations?view=winrt-19041#Windows_UI_Xaml_Media_Animation_Timeline_AllowDependentAnimations)
    * [easing functions](https://docs.microsoft.com/en-us/windows/uwp/design/motion/key-frame-and-easing-function-animations#easing-functions)
    
    ## Validation Steps Performed
    Man have I been opening panes
    
    Closes #1001
    Closes #7366
    zadjii-msft authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    9dc38ad View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2020

  1. Inform user that holding alt opens a new pane (#7866)

    Adds a tooltip to the new tab button and menu  to let the user know
    that holding alt will open a new pane instead.
    
    Fixes #7851
    
    Co-authored-by: Pankaj Bhojwani <[email protected]>
    PankajBhojwani and PankajBhojwani authored Oct 13, 2020
    Configuration menu
    Copy the full SHA
    8d12388 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b203d4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb96aa7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d2d462f View commit details
    Browse the repository at this point in the history
  5. 7571: do not activate terminal window upon settings modificaion (#7887)

    Took this as an easy starter. The method IslandWindow::SetAlwaysOnTop is
    triggered once terminal settings are reloaded (in
    TerminalPage::_RefreshUIForSettingsReload flow). This method calls
    SetWindowPos without SWP_NOACTIVATE. As a result the window gets
    activated, the focus is set and the cursor starts blinking.
    
    Added SWP_NOACTIVATE in all SetWindowPos calls from IslandWindow and
    NoClientIslandWindow (where it was missing). Please let me know if this
    is an overkill - it is not required to fix the issue, however seems a
    good practice, that might help if we decide to apply more settings
    immediately.
    
    ## Validation Steps Performed
    * Only manual testing - please guide me to the relevant UT framework, if
      exists. 
    * Trying to reproduce this with VS attached doesn't work - the window
      gets the focus in any case.
    * Tested as a standalone application, by modifying different settings
      (and comparing the results before and after the fix).
    * Checked with Spy++ that no WM_ACTIVATE / WM_SETFOCUS is thrown upon
      settings modification
    * Applied terminal resizing, toggling full screen and focus mode to
      check no regression was introduced.
    
    Closes #7571
    Don-Vito authored Oct 13, 2020
    Configuration menu
    Copy the full SHA
    cb732a4 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2020

  1. 7124: Add focus and maximizedFocus launch modes (#7873)

    This commit introduces two new launch modes: focus and maximizedFocus. 
    * Focused mode, behaves like a default mode, but with the Focus Mode
      enabled.
    * Maximized focused mode, behaves like a Maximized mode, but with the
      Focus Mode enabled.
    
    There two ways to invoke these new modes:
    * In the settings file: you set the "launchMode" to either "focus" or
      "maximizedFocus"
    * In the command line options, you can path -f / --focus, which is
      mutually exclusive with the --fullscreen, but can be combined with the
      --maximized:
      * Passing -f / --focus will launch the terminal in the "focus" mode
      * Passing -fM / --focus --maximized will launch the terminal in the
        "maximizedFocus" mode
    
    This should resolve a relevant part in the command line arguments
    mega-thread #4632
    
    Closes #7124
    Closes #7825
    Closes #7875
    Don-Vito authored Oct 14, 2020
    Configuration menu
    Copy the full SHA
    f86045e View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2020

  1. Add support for more OSC color formats (#7578)

    * Correct the behaviour of parsing `rgb:R/G/B`. It should be interpreted
      as `RR/GG/BB` instead of `0R/0G/0B`
    * Add support for `rgb:RRR/GGG/BBB` and `rgb:RRRR/GGGG/BBBB`. The
      behaviour of 12 bit variants is to repeat the first digit at the end,
      e.g. `rgb:123/456/789` becomes `rgb:1231/4564/7897`.
    * Add support for `#` formats. We are following the rules of
      [XParseColor] by interpreting `#RGB` as `R000G000B000`.
    * Add support for XOrg app color names, which are supported by xterm, VTE
      and many other terminal emulators.
    * Multi-parameter OSC 4 is now supported.
    * The chaining of OSC 10-12 is not yet supported. But the parameter
      validation is relaxed by parsing the parameters as multi-params but
      only use the first one, which means `\e]10;rgb:R/G/B;` and
      `\e]10:rgb:R/G/B;invalid` will execute `OSC 10` with the first color
      correctly. This fixes some of the issues mentioned in #942 but not
      all of them.
    
    [XParseColor]: https://linux.die.net/man/3/xparsecolor
    
    Closes #3715
    skyline75489 authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    02b1202 View commit details
    Browse the repository at this point in the history
  2. doc: address how to use TAEF (#7590)

    This PR updates the doc in the repo to address how to use TAEF as part
    of the development workflow.
    
    Closes #1962
    skyline75489 authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    33321b8 View commit details
    Browse the repository at this point in the history
  3. Add Github Action Super Linter (#7637)

    This uses the templates from
    https://github.com/github/super-linter/tree/master/TEMPLATES currently.
    A future PR can add the necessary templates to the Windows Terminal
    repository and update the source of Templates following the README.
    Additionally we can add flags to explicitly choose the linters
    applicable to this code base but is not necessary.
    
    Per the README, this does not enforce any linting rules but rather
    outputs the suggestions in the build step, which are to be read by the
    PR submitter and Windows Terminal team to determine if they want to use
    the linting rule. C++ is currently not supported (Powershell, Json,
    Yaml, and Markdown will be the only things the linter checks for
    currently) but we could add our own custom support if desired in
    separate PR.
    
    ## Validation Steps Performed
    It successfully runs. Currently only shows the yaml file itself being
    linted in this PR as a test case. It will apply to new PRs once this is
    merged. We can lint existing code base but would require a separate PR
    and examining the code output (also requires updating the yaml file
    temporarily).
    
    Closes #7513
    WSLUser authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    afcc930 View commit details
    Browse the repository at this point in the history
  4. doc: Update Notice emoji (#7424)

    Just a simple update on the emoji so that it catch people attention as I
    see many open issues about terminal not running on Windows Server 2016.
    quangkieu authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    f786874 View commit details
    Browse the repository at this point in the history
  5. Add Close... option to Tab context menu (#7728)

    <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
    ## Summary of the Pull Request
    Add a "Close..." option to the tab context menu, with nested entries to close tabs to the right and close other tabs (actions already available)
    ![immagine](https://user-images.githubusercontent.com/1140981/94178005-c7e03600-fe9a-11ea-9f87-c6f4895d4cf3.png)
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    #1912 
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [x] Closes #5524
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [ ] Tests added/passed
    * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
    * [ ] Schema updated.
    * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
    
    <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
    ## Detailed Description of the Pull Request / Additional comments
    First contribution 🙂
    Tried to follow some suggestions from #1912 (comment)
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    mpela81 authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    004da88 View commit details
    Browse the repository at this point in the history
  6. Fix the linter for C++ files (#7930)

    For whatever reason, the super linter seems to think that any file it doesn't recognize is an EDITORCONFIG file. That means all our `cpp`, `hpp`, `h`, `resw`, `xaml`, etc files are going to get linted with different rules than the clang-format ones we already use. 
    
    This PR disables the EDITORCONFIG linter, and has a minimal change to a cpp file to ensure that it's no longer linted by the action.
    
    See also: 
    * #7637 added this
    * #7799 is blocked by this
    * #7924 is blocked by this
    zadjii-msft authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    8bdae31 View commit details
    Browse the repository at this point in the history
  7. Auto detect background image (#7849)

    ##  Summary of the Pull Request
    Added watch on desktopImagePath to check when the path equals "DesktopWallpaper"
    If it does equal "DesktopWallpaper" it replaces the path with a path to the desktop's wallpaper
    
    *I am a student and this is my first pull request for Terminal so please give feedback no matter how small. It's the best way I can learn.
    
    ## PR Checklist
    * [X] Closes #7295 
    * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [?] Tests added/passed
    * [X] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: MicrosoftDocs/terminal#155
    * [?] Schema updated. (Not sure if this is needed, also not sure where this would be)
    * [X] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #7295 (Have only talked with the people on the issue, which I don't think has any core contributors)
    
    ## Detailed Description of the Pull Request / Additional comments
    I am using SystemParametersInfo for SPI_GETDESKWALLPAPER which puts the path into a WCHAR and that is then inserted as the BackgroundImagePath.
    
    I do not think an additional test would add value. The SPI_GETDESKTOPWALLPAPER uses the computers local wallpaper path and puts it into a WCHAR, which then I feed into BackgroundImagePath() as it's new path. I don't think there adds value in making a static path of the desktop background and testing that, given that static tests are already done for "BackgroundImage()".
    
    ## Validation Steps Performed
    
    (Manual Validation - Test False Value)
    1. Ran Terminal
    2. Set setting ["backgroundImage": "<some random img path>"] under profiles->defaults
    3. Verified terminal's background is not the desktops wallpaper. 
    
    (Manual Validation - Test True Value)
    1. Ran Terminal
    2. Set setting ["backgroundImage": "DesktopWallpaper"] under profiles->defaults
    3. Verified the background image matches the desktop background image. 
    
    (Manual Validation - Multiple Tabs True Value)
    1. Ran Terminal
    2. Set setting ["backgroundImage": "DesktopWallpaper"] under profiles->defaults
    3. Verified the background image matches the desktop background image.  
    4. Opened new tabs
    5. Verified the background image matches the desktop background image for each tab.
    bennettnicholas authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    6e8388e View commit details
    Browse the repository at this point in the history
  8. Refactor VT parameter handling (#7799)

    This PR introduces a pair of classes for managing VT parameters that
    automatically handle range checking and default fallback values, so the
    individual operations don't have to do that validation themselves. In
    addition to simplifying the code, this fixes a few cases where we were
    mishandling missing or extraneous parameters, and adds support for
    parameter sequences on commands that couldn't previously handle them.
    This PR also sets a limit on the number of parameters allowed, to help
    thwart DoS memory consumption attacks.
    
    ## References
    
    * The new parameter class also introduces the concept of an
      omitted/default parameter which is not necessarily zero, which is a
      prerequisite for addressing issue #4417.
    
    ## Detailed Description of the Pull Request / Additional comments
    
    There are two new classes provide by this PR: a `VTParameter` class,
    similar in function to a `std::optional<size_t>`, which holds an
    individual parameter (which may be an omitted/default value); and a
    `VTParameters` class, similar in function to `gsl:span<VTParameter>`,
    which holds a sequence of those parameters.
    
    Where `VTParameter` differs from `std::optional` is with the inclusion
    of two cast operators. There is a `size_t` cast that interprets omitted
    and zero values as 1 (the expected behaviour for most numeric
    parameters). And there is a generic cast, for use with the enum
    parameter types, which interprets omitted values as 0 (the expected
    behaviour for most selective parameters).
    
    The advantage of `VTParameters` class is that it has an `at` method that
    can never fail - out of range values simply return the a default
    `VTParameter` instance (this is standard behaviour in VT terminals). It
    also has a `size` method that will always return a minimum count of 1,
    since an empty parameter list is typically the equivalent of a single
    "default" parameter, so this guarantees you'll get at least one value
    when iterating over the list with `size()`.
    
    For cases where we just need to call the same dispatch method for every
    parameter, there is a helper `for_each` method, which repeatedly calls a
    given predicate function with each value in the sequence. It also
    collates the returned success values to determine the overall result of
    the sequence. As with the `size` method, this will always make at least
    one call, so it correctly handles empty sequences.
    
    With those two classes in place, we could get rid of all the parameter
    validation and default handling code in the `OutputStateMachineEngine`.
    We now just use the `VTParameters::at` method to grab a parameter and
    typically pass it straight to the appropriate dispatch method, letting
    the cast operators automatically handle the assignment of default
    values. Occasionally we might need a `value_or` call to specify a
    non-standard default value, but those cases are fairly rare.
    
    In some case the `OutputStateMachineEngine` was also checking whether
    parameters values were in range, but for the most part this shouldn't
    have been necessary, since that is something the dispatch classes would
    already have been doing themselves (in the few cases that they weren't,
    I've now updated them to do so).
    
    I've also updated the `InputStateMachineEngine` in a similar way to the
    `OutputStateMachineEngine`, getting rid of a few of the parameter
    extraction methods, and simplifying other parts of the implementation.
    It's not as clean a replacement as the output engine, but there are
    still benefits in using the new classes.
    
    ## Validation Steps Performed
    
    For the most part I haven't had to alter existing tests other than
    accounting for changes to the API. There were a couple of tests I needed
    to drop because they were checking for failure cases which shouldn't
    have been failing (unexpected parameters should never be an error), or
    testing output engine validation that is no longer handled at that
    level.
    
    I've added a few new tests to cover operations that take sequences of
    selective parameters (`ED`, `EL`, `TBC`, `SM`, and `RM`). And I've
    extended the cursor movement tests to make sure those operations can
    handle extraneous parameters that weren't expected. I've also added a
    test to verify that the state machine will correctly ignore parameters
    beyond the maximum 32 parameter count limit.
    
    I've also manual confirmed that the various test cases given in issues
    #2101 are now working as expected.
    
    Closes #2101
    j4james authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    55151a4 View commit details
    Browse the repository at this point in the history
  9. doc: Remove unnecessary link to VC redist, update md lint rules (#7926)

    Terminal ships with this dependency embedded, and it is not required that you install it separately. Since the link is broken, let's just remove it entirely.
    
    * [x] fixes #7889 
    * [x] related to #7917 (comment)
    * [x] I work here
    * [x] is a docs update
    
    Additionally, update the markdown linter rules in the wake of #7637, because apparently that was never actually applied to any files, so now the onus is on the first person to touch any of our markdown files.
    zadjii-msft authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    5662cc1 View commit details
    Browse the repository at this point in the history
  10. conpty: fall back to conhost if OpenConsole is missing (#7741)

    This commit is in support of WTU.
    
    I initially added support for a new flag, `PSEUDOCONSOLE_UNDOCKED_PREFER_INBOX_CONHOST`,
    which I liked because it was more explicit. We chose not to go that route.
    
    ### Automatic fallback
    #### Pros
    * It's easier on the consumer
    * We can eventually expand it to support `$ARCH/openconsole.exe`
    #### Cons
    * Packaging the project wrong will result in a working-but-somewhat-broken experience (old conhost)
       * We ameliorated this by checking it in the packaging script.
    * Implicit behavior may be bad
    DHowett authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    e996fad View commit details
    Browse the repository at this point in the history
  11. Add a setting to configure the audible bell (#7793)

    Adds a new setting, `bellStyle`, to be able to disable the audible bell
    added in #7679. Currently, this setting accepts two values:
    * `audible`: play a noise on a bell
    * `none`: Don't play a noise.
    
    In the future, we can add a `"bellStyle": "visible"` for flashing the
    Terminal instead of making a noise on bell.
    
    ## Validation Steps Performed
    Pressing <kbd>Ctrl+G</kbd> in cmd, and hitting enter is an easy way of
    triggering a bell. I set the setting to `none`, and presto, the bell
    stopped.
    
    Closes #2360
    zadjii-msft authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    98806e2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9d911c0 View commit details
    Browse the repository at this point in the history
  13. Add support for the DECREQTPARM report (#7939)

    This PR adds support for the `DECREQTPARM` (Request Terminal Parameters)
    escape sequence, which was originally used on the VT100 terminal to
    report the serial communication parameters. Modern terminal emulators
    simply hardcode the reported values for backward compatibility.
    
    The `DECREQTPARM` sequence has one parameter, which was originally used
    to tell the terminal whether it was permitted to send unsolicited
    reports or not. However, since we have no reason to send an unsolicited
    report, we don't need to keep track of that state, but the permission
    parameter does still determine the value of the first parameter in the
    response.
    
    The response parameters are as follows:
    
    | Parameter        | Value  | Meaning                  |
    | ---------------- | ------ | ------------------------ |
    | response type    | 2 or 3 | unsolicited or solicited |
    | parity           | 1      | no parity                |
    | data bits        | 1      | 8 bits per character     |
    | transmit speed   | 128    | 38400 baud               |
    | receive speed    | 128    | 38400 baud               |
    | clock multiplier | 1      |                          |
    | flags            | 0      |                          |
    
    There is some variation in the baud rate reported by modern terminal
    emulators, and 9600 baud seems to be a little more common than 38400
    baud, but I thought the higher speed was probably more appropriate,
    especially since that's also the value reported by XTerm.
    
    ## Validation Steps Performed
    
    I've added a couple of adapter and output engine tests to verify that
    the sequence is dispatched correctly, and the expected responses are
    generated. I've also manually tested in Vttest and confirmed that we now
    pass the `DECREQTPARM` test in the _Test of terminal reports_.
    
    Closes #7852
    j4james authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    30e363e View commit details
    Browse the repository at this point in the history
  14. Swap the command palette modes for the prefix > (#7935)

    VsCode uses `>` as its "prefix" for the equivalent of their "action
    mode". This PR aligns the Terminal with their logic here. 
    
    We have to be tricky - if we use the `>` in the actual input as the
    indicator for action mode, we can't display any placeholder text in the
    input to tell users to type a command. This wasn't an issue for the
    commandline mode previously, because we'd stick the "prompt" in the "no
    matches text" space. However, we can't do that for action mode. Instead,
    we'll stick a floating text block over the input box, and when the
    user's in action mode, we'll manually place a `>` into that space. When
    the user backspaces the `>`, we'll remove it from that block, and switch
    into commandline mode.
    
    ## Validation Steps Performed
    Played with the cmdpal in lots of different modes, this finally feels
    good
    
    Closes #7736
    zadjii-msft authored Oct 15, 2020
    Configuration menu
    Copy the full SHA
    bd7cd55 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2020

  1. 7395: do not clear text selection upon PrintScreen (#7883)

    When handling SendKey, preserve selection upon PrintScreen (VK_SNAPSHOT)
    
    Closes #7395
    Don-Vito authored Oct 16, 2020
    Configuration menu
    Copy the full SHA
    60d681d View commit details
    Browse the repository at this point in the history
  2. Optimize the binary size of the XOrg color table (#7929)

    This optimizes the binary size of the xorg color table by replacing the
    static lookup table with a table of variable colors (indexed "" (0)
    through "4"), calculated greys for gr[ae]y0-100, and a table of the
    remaining unsuffixed colors.
    
    78 variable colors ...
      8 bytes each for pointer+size
      5 variants, 4 bytes each for the color data
    718 bytes for 0-terminated color names
    
    plus
    
    84 colors ...
      8 bytes each for pointer+size
      4 bytes each for the color data
    955 bytes for 8-terminated color names
    
      2902 = (78 * 8) + (78 * 5 * 4) + 718
    + 1963 = (84 * 8) + (84   *   4) + 955
    ------
      4865 bytes (approximately)
    
    "I couldn't sleep at night thinking that after years of accusing Windows
    being bloated and literally making it even more bloated with my hands.
    So here you go. The mediocre yet working solution. This reduces the
    binary size to 1051k (1067k before) while keeping the code maintainable
    for human beings."
    skyline75489 authored Oct 16, 2020
    Configuration menu
    Copy the full SHA
    4a4a41e View commit details
    Browse the repository at this point in the history
  3. Fix garbling when copying multibyte text via OSC 52 (#7870)

    This commit adds a missing conversion utf8 to utf16 in decoding base64
    for handling multibyte text in copying via OSC 52.
    
    ## Validation Steps Performed
    * automatically
        * Tests w/ multibyte characters
    * manually
        * case1
            * Executed `printf "\x1b]52;;%s\x1b\\" "$(printf '👍👍🏻👍🏼👍🏽👍🏾👍🏿' | base64)"`
            * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard
        * case2
            * Copied `👍👍🏻👍🏼👍🏽👍🏾👍🏿` by tmux 2.6 default copy function (OSC 52)
            * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard
    
    Closes #7819
    amaya382 authored Oct 16, 2020
    Configuration menu
    Copy the full SHA
    743283e View commit details
    Browse the repository at this point in the history
  4. Hash the URI as part of the hyperlink ID (#7940)

    It turns out that we missed part of the OSC 8 spec which indicated that
    _hyperlinks with the same ID but different URIs are logically distinct._
    
    > Character cells that have the same target URI and the same nonempty id
    > are always underlined together on mouseover.
    > The same id is only used for connecting character cells whose URIs is
    > also the same. Character cells pointing to different URIs should never
    > be underlined together when hovering over.
    
    This pull request fixes that oversight by appending the (hashed) URI to
    the generated ID.
    
    When Terminal receives one of these links over ConPTY, it will hash the
    URL a second time and therefore append a second hashed ID. This is taken
    as an acceptable cost.
    
    Fixes #7698
    DHowett authored Oct 16, 2020
    Configuration menu
    Copy the full SHA
    df7c3cc View commit details
    Browse the repository at this point in the history
  5. Implement CascadiaSettings::Copy() (#7877)

    ## Summary of the Pull Request
    This implements the `Copy` function for `CascadiaSettings`. Copy performs a deep copy of a `CascadiaSettings` object. This is needed for data binding in the Terminal Settings Editor.
    
    The `Copy` function was basically implemented in every settings model object. This was mostly just repetitive work.
    
    ## References
    #7667 - TSM
    #1564 - Settings UI
    
    ## PR Checklist
    * [X] Tests added/passed
    carlos-zamora authored Oct 16, 2020
    Configuration menu
    Copy the full SHA
    9045266 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. Fix crash when creating tab menu multiple times (#7961)

    Fix for crash occurring when splitting a pane, due to tab context menu created multiple times.
    
    ## References
    #7728 
    
    ## PR Checklist
    * [x] Closes #7941 
    * [x] CLA signed. 
    
    ## Detailed Description of the Pull Request / Additional comments
    When splitting panes the `Tab::Initialize` function is called again. This rebuilt the context menu from scratch and appended the existing Close... sub-menu items to a new parent, thus causing the crash.
    It is not necessary to re-create the context menu every time you split panes, it can be created only once.
    
    ## Validation Steps Performed
    Manual verification:
    - Play with the context menu, the Close... submenu is functioning
    - Split panes (ALT + New tab), no crash occurs and context menu still functioning
    mpela81 authored Oct 19, 2020
    Configuration menu
    Copy the full SHA
    8eaaa8a View commit details
    Browse the repository at this point in the history
  2. Update GH Action Super-Linter and README (#7951)

    Updates the GH Action and makes a small update to the README to test
    changes.
    
    A missing install step for Windows Terminal using Scoop has been added.
    The versioning of Super-Linter was also switched to v3 to allow
    auto-updates within the v3 series. This can be version-pinned again if a
    breaking change comes later. The current updates fix some bugs and bump
    the linters utilized. 
    
    ## Validation Steps Performed
    Validation will be shown in the build steps.
    
    Closes #7934
    WSLUser authored Oct 19, 2020
    Configuration menu
    Copy the full SHA
    c1d2777 View commit details
    Browse the repository at this point in the history
  3. Make sure TSM pulls in the wildcard resource targets (#7966)

    This import is required to make localized resources work.
    DHowett authored Oct 19, 2020
    Configuration menu
    Copy the full SHA
    1ad7a25 View commit details
    Browse the repository at this point in the history
  4. Fix #5784: Key bindings won't consume dead keys (#7686)

    Let's assume the user has bound the dead key ^ to a sendInput command
    that sends "b".  If the user presses the two keys ^a it'll produce "bâ",
    despite us marking the key event as handled.  We can use `ToUnicodeEx`
    to clear such dead keys from the keyboard state and should make use of
    that for keybindings.  Unfortunately `SetKeyboardState` cannot be used
    for this purpose as it doesn't clear the dead key state.
    
    Validation
    * Enabled a German keyboard layout
    * Added the following two keybindings:
      { "command": { "action": "sendInput", "input": "x" }, "keys": "q" },
      { "command": { "action": "sendInput", "input": "b" }, "keys": "^" }
    * Pressed the following keys → ensured that the given text is printed:
      * q → x
      * ´ → nothing
      * a → á
      * ^ → b
      * a → a (previously this would print: â)
      * ´ → nothing
      * ^ → b
      * a → a (unfortunately we cannot specifically clear only ^)
    
    Closes #5784
    lhecker authored Oct 19, 2020
    Configuration menu
    Copy the full SHA
    4099aac View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2020

  1. Display ATS tabs in MRU order (#7952)

    This PR changes the ATS display order to _always_ be in most recently
    used (MRU) order. I chose not to give ATS the option to be displayed
    in-order because that order is better served through the traditional
    left-right TabRow switching. 
    
    _Note_: `TabSearch` will stay in-order.
    
    This means that users can only choose one order or another in their
    `nextTab/prevTab` bindings. Setting `useTabSwitcher` to true will make
    nT/pT open the ATS in MRU order. If it's set to false, the ATS won't
    open and nT/pT will simply go left and right on the TabRow.
    
    I'm open to getting rid of the global and making ATS its own keybinding,
    but for now I figured I would keep the current behavior and open the PR
    to get eyes on the code that doesn't have anything to do with the
    settings.
    
    Closes #973
    leonMSFT authored Oct 21, 2020
    Configuration menu
    Copy the full SHA
    00f5fba View commit details
    Browse the repository at this point in the history
  2. Fix slowdown on open/close tabs when the user has many profiles (#7993)

    ## Summary of the Pull Request
    Just deleting an unnecessary call to `_UpdateCommandsForPalette`
    
    **Note:** This only fixes slowdown when opening/closing a tab, but not upon first startup (we still need to call `_UpdateCommandsForPalette` there 
    
    ## References
    Fixes the slowdown described in #7820 for opening and closing tabs, but doesn't improve startup time dramatically.
    
    ## Validation Steps Performed
    Tested with ~100 profiles in my settings file
    PankajBhojwani authored Oct 21, 2020
    Configuration menu
    Copy the full SHA
    895ac06 View commit details
    Browse the repository at this point in the history
  3. Fix exiting a zoomed pane (#7973)

    ## Summary of the Pull Request
    
    Fixes the bug where `exit`ing inside a closed pane would leave the Terminal blank.
    
    Additionally, removes `Tab::GetRootElement` and replaces it with the _observable_ `Tab::Content`. This should be more resilient in the future.
    
    Also adds some tests, though admittedly not for this exact scenario. This scenario requires a cooperating TerminalConnection that I can drive for the sake of testing, and _ain't nobody got time for that_.
    
    ## References
    * Introduced in #6989 
    
    ## PR Checklist
    * [x] Closes #7252
    * [x] I work here
    * [x] Tests added/passed 🎉 
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    From notes I had left in `Tab.cpp` while I was working on this:
    ```
    OKAY I see what's happening here the ActivePaneChanged Handler in TerminalPage
    doesn't re-attach the tab content to the tree, it just updates the title of the
    window.
    
    So when the pane is `exit`ed, the pane's control is removed and re-attached to
    the parent grid, which _isn't in the XAML tree_. And no one can go tell the
    TerminalPage that it needs to re set up the tab content again.
    
    The Page _manually_ does this in a few places, when various pane actions are
    about to take place, it'll unzoom. It would be way easier if the Tab could just
    manage the content of the page.
    
    Or if the Tab just had a Content that was observable, that when that changed,
    the page would auto readjust. That does sound like a LOT of work though.
    ```
    
    ## Validation Steps Performed
    
    Opened panes, closed panes, exited panes, zoomed panes, moved focus between panes, panes, panes, panes
    zadjii-msft authored Oct 21, 2020
    Configuration menu
    Copy the full SHA
    ccf9f03 View commit details
    Browse the repository at this point in the history
  4. Expose WindowsTerminalBranding to the preprocessor (optionally) (#7986)

    Our build pipeline was originally set up such that we could take any
    binaries from the Terminal build and seamlessly re-package them with the
    release or preview livery. My initial plan was to stamp a stable and
    preview build at the same time, out of the same bits, to make ring
    promotion easier.
    
    I've never done that. For the last five releases, we've just re-cut a
    new stable build along with the new preview build, usually because we
    want to backport some fixes to stable.
    
    This commit introduces preprocessor defines, detectable through CL and
    RC, for any project that wants them. Right now, that's just going to be
    WindowsTerminal.vcxproj (since it hosts the icons and the app entry
    point). This list may be extended to include wt (the shim executable)
    and the shell extension at some future date.
    
    This will greatly simplify the logic in #7971, as we'll no longer need
    to detect if we're dev or preview at runtime. It may also simplify the
    logic in the shell extension for determining whether we're Dev or not.
    DHowett authored Oct 21, 2020
    Configuration menu
    Copy the full SHA
    ae550e0 View commit details
    Browse the repository at this point in the history