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

Update Fork #1

Merged
merged 1,325 commits into from
Sep 5, 2020
Merged

Update Fork #1

merged 1,325 commits into from
Sep 5, 2020
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jun 4, 2020

  1. Draw the cursor underneath text, and above the background (#6337)

    ## Summary of the Pull Request
    
    ![textAboveCursor003](https://user-images.githubusercontent.com/18356694/83681722-67a24d00-a5a8-11ea-8d9b-2d294065e4e4.gif)
    
    This is the plan that @miniksa suggested to me. Instead of trying to do lots of work in all the renderers to do backgrounds as one pass, and foregrounds as another, we can localize this change to basically just the DX renderer. 
    1. First, we give the DX engine a "heads up" on where the cursor is going to be drawn during the frame, in `PrepareRenderInfo`.
      - This function is left unimplemented in the other render engines.
    2. While printing runs of text, the DX renderer will try to paint the cursor in `CustomTextRenderer::DrawGlyphRun` INSTEAD of `DxEngine::PaintCursor`. This lets us weave the cursor background between the text background and the text. 
    
    ## References
    
    * #6151 was a spec in this general area. I should probably go back and update it, and we should probably approve that first.
    * #6193 is also right up in this mess
    
    ## PR Checklist
    * [x] Closes #1203
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    * This is essentially `"cursorTextColor": "textForeground"` from #6151.
    * A follow up work item is needed to add support for the current behavior, (`"cursorTextColor": null`), and hooking up that setting to the renderer.
    zadjii-msft authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    1fcd957 View commit details
    Browse the repository at this point in the history
  2. Add a test to ensure support for trailing commas in settings.json (#…

    …6312)
    
    ## Summary of the Pull Request
    
    Adds support for trailing commas in our json files. 
    
    ## References
    
    * Enabled due to the excellent work over in open-source-parsers/jsoncpp#1098
    
    ## PR Checklist
    * [x] I work here
    * [x] Tests added/passed
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    7b48912 View commit details
    Browse the repository at this point in the history
  3. Merged PR 4764832: Migrate OSS changes up to 7b48912

    Related work items: #26765368
    DHowett committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    b171547 View commit details
    Browse the repository at this point in the history
  4. Improve support for VT character sets (#4496)

    This PR improves our VT character set support, enabling the [`SCS`]
    escape sequences to designate into all four G-sets with both 94- and
    96-character sets, and supports invoking those G-sets into both the GL
    and GR areas of the code table, with [locking shifts] and [single
    shifts]. It also adds [`DOCS`] sequences to switch between UTF-8 and the
    ISO-2022 coding system (which is what the VT character sets require),
    and adds support for a lot more characters sets, up to around the level
    of a VT510.
    
    [`SCS`]: https://vt100.net/docs/vt510-rm/SCS.html
    [locking shifts]: https://vt100.net/docs/vt510-rm/LS.html
    [single shifts]: https://vt100.net/docs/vt510-rm/SS.html
    [`DOCS`]: https://en.wikipedia.org/wiki/ISO/IEC_2022#Interaction_with_other_coding_systems
    
    ## Detailed Description of the Pull Request / Additional comments
    
    To make it easier for us to declare a bunch of character sets, I've made
    a little `constexpr` class that can build up a mapping table from a base
    character set (ASCII or Latin1), along with a collection of mappings for
    the characters the deviate from the base set. Many of the character sets
    are simple variations of ASCII, so they're easy to define this way.
    
    This class then casts directly to a `wstring_view` which is how the
    translation tables are represented in most of the code. We have an array
    of four of these tables representing the four G-sets, two instances for
    the active left and right tables, and one instance for the single shift
    table.
    
    Initially we had just one `DesignateCharset` method, which could select
    the active character set. We now have two designate methods (for 94- and
    96- character sets), and each takes a G-set number specifying the target
    of the designation, and a pair of characters identifying the character
    set that will be designated (at the higher VT levels, character sets are
    often identified by more than one character).
    
    There are then two new `LockingShift` methods to invoke these G-sets
    into either the GL or GR area of the code table, and a `SingleShift`
    method which invokes a G-set temporarily (for just the next character
    that is output).
    
    I should mention here that I had to make some changes to the state
    machine to make these single shift sequences work. The problem is that
    the input state machine treats `SS3` as the start of a control sequence,
    while the output state machine needs it to be dispatched immediately
    (it's literally the _Single Shift 3_ escape sequence). To make that
    work, I've added a `ParseControlSequenceAfterSs3` callback in the
    `IStateMachineEngine` interface to decide which behavior is appropriate.
    
    When it comes to mapping a character, it's simply an array reference
    into the appropriate `wstring_view` table. If the single shift table is
    set, that takes preference. Otherwise the GL table is used for
    characters in the range 0x20 to 0x7F, and the GR table for characters
    0xA0 to 0xFF (technically some character sets will only map up to 0x7E
    and 0xFE, but that's easily controlled by the length of the
    `wstring_view`).
    
    The `DEL` character is a bit of a special case. By default it's meant to
    be ignored like the `NUL` character (it's essentially a time-fill
    character). However, it's possible that it could be remapped to a
    printable character in a 96-character set, so we need to check for that
    after the translation. This is handled in the `AdaptDispatch::Print`
    method, so it doesn't interfere with the primary `PrintString` code
    path.
    
    The biggest problem with this whole process, though, is that the GR
    mappings only really make sense if you have access to the raw output,
    but by the time the output gets to us, it would already have been
    translated to Unicode by the active code page. And in the case of UTF-8,
    the characters we eventually receive may originally have been composed
    from two or more code points.
    
    The way I've dealt with this was to disable the GR translations by
    default, and then added support for a pair of ISO-2022 `DOCS` sequences,
    which can switch the code page between UTF-8 and ISO-8859-1. When the
    code page is ISO-8859-1, we're essentially receiving the raw output
    bytes, so it's safe to enable the GR translations. This is not strictly
    correct ISO-2022 behavior, and there are edge cases where it's not going
    to work, but it's the best solution I could come up with.
    
    ## Validation Steps Performed
    
    As a result of the `SS3` changes in the state machine engine, I've had
    to move the existing `SS3` tests from the `OutputEngineTest` to the
    `InputEngineTest`, otherwise they would now fail (technically they
    should never have been output tests).
    
    I've added no additional unit tests, but I have done a lot of manual
    testing, and made sure we passed all the character set tests in Vttest
    (at least for the character sets we currently support). Note that this
    required a slightly hacked version of the app, since by default it
    doesn't expose a lot of the test to low-level terminals, and we
    currently identify as a VT100.
    
    Closes #3377
    Closes #3487
    j4james authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    96a77cb View commit details
    Browse the repository at this point in the history
  5. Reflect OS build fixes on 7b48912 back to inbox

    Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_uxp 677d15a4e298a0e1e3ce093bc1dff8d832e3c2b1
    
    Related work items: #26765368
    DHowett committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    efce279 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f1c9fbd View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2020

  1. Allow Ctrl+Alt <> AltGr aliasing to be disabled (#6212)

    ## Summary of the Pull Request
    
    Some people wish to use Ctrl+Alt combinations without Windows treating those as an alias for AltGr combinations. This PR adds a new `altGrAliasing` setting allowing one to control this behavior.
    
    ## PR Checklist
    * [x] Closes #6211
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [x] Manual testing
    * [x] Requires documentation to be updated: MicrosoftDocs/terminal#50
    * [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
    
    ## Validation Steps Performed
    
    * Choose a German keyboard layout
    * Using `showkey -a` ensured that both `Ctrl+Alt+Q/E` and `AltGr+Q/E` produce `@/€`
    * Added `"altGrAliasing": false` to the WSL profile
    * Using `showkey -a` ensured `Ctrl+Alt+Q/E` now produces `^[^Q/E` while `AltGr+Q/E` continues to produce `@/€`
    lhecker authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    e455d4b View commit details
    Browse the repository at this point in the history
  2. Move to Microsoft.UI.Xaml 2.4.0 (#5778)

    This brings support for "Compact" tab sizing, which compresses all inactive tabs to just the size of their icons plus the close button. Neat!
    
    It also just keeps us generally up-to-date and good citizens.
    DHowett-MSFT authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    1711c76 View commit details
    Browse the repository at this point in the history
  3. Spec for tab tear off and default app (#2080)

    docs have no build, cleaning out draft spec from PR queue
    miniksa authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    b051e78 View commit details
    Browse the repository at this point in the history
  4. First draft of a spec for panes with non-terminal content (#1080)

    Co-authored-by: Michael Niksa <miniksa@microsoft.com>
    
    putting outdated draft spec into drafts folder and closing PR. CI has no function on docs.
    zadjii-msft authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    038d6e5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c3ea731 View commit details
    Browse the repository at this point in the history
  6. Add support for compact tab sizing (#5787)

    ## Summary of the Pull Request
    
    Really couldn't be more starightforward. MUX 2.4 added support for "compact" sized tabs. This PR (targeting the 2.4 PR currently, will move to `master` when that merges) enables users to specify `"tabWidthMode": "compact"` in their global settings to get this behavior.
    
    ## References
    * #5778 - PR to move to MUX 2.4
    * [microsoft-ui-xaml#2016](microsoft/microsoft-ui-xaml#2016) - the MUX PR for compact tab sizing.
    * #597 - Tab sizing options?
    
    ## PR Checklist
    * [x] I don't think we have an issue for this, though I could be wrong.
    * [x] I work here
    * [x] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Detailed Description of the Pull Request / Additional comments
    
    In this screenshot, I'm hovering over tab 2, but the ubuntu tab is focused:
    ![image](https://user-images.githubusercontent.com/18356694/81302365-e6ef4000-903f-11ea-9ce3-5f5ce92e5ba4.png)
    
    In this screenshot, tab 2 is focused:
    ![image](https://user-images.githubusercontent.com/18356694/81302383-ea82c700-903f-11ea-9820-92348d5adc64.png)
    zadjii-msft authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    bb4c73c View commit details
    Browse the repository at this point in the history
  7. spelling I

    DHowett committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    026ba34 View commit details
    Browse the repository at this point in the history
  8. spelling II

    DHowett committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    b822cfb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b47df4b View commit details
    Browse the repository at this point in the history
  10. Update the tab's close button color to match the tab text color (#5789)

    ## Summary of the Pull Request
    
    When we select a color for the tab, we update the foreground color of the text so that it maintains acceptable contrast with the new tab color. However, we weren't also updating the foreground color of the close button.
    
    This is understandable though, because apparently this wasn't fixable until MUX 2.4 arrived. I'm not a XAML expert, but I know that setting this key only works when we're using MUX 2.4, so I'm assuming something about the TabView implementation changed in that release. _This PR is marked as a draft until #5778 is merged, then I'll re-target to master._
    
    ## References
    * #5778 - PR to move to MUX 2.4
    * This bug was introduced with the tab color picker in #3789
    
    ## PR Checklist
    * [x] Closes #5780
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    A light tab color:
    ![image](https://user-images.githubusercontent.com/18356694/81303943-00918700-9042-11ea-86e6-7bdfe343c4ca.png)
    
    A dark tab color:
    ![image](https://user-images.githubusercontent.com/18356694/81303953-04250e00-9042-11ea-8db2-be97af519fae.png)
    zadjii-msft authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    f90f3bf View commit details
    Browse the repository at this point in the history
  11. Merged PR 4770883: Migrate OSS changes up to f90f3bf

    Dustin Howett (1):
          Merge remote-tracking branch 'openconsole/inbox' into HEAD
    
    James Holderness (1):
          Improve support for VT character sets (CC-4496)
    
    Related work items: MSFT:26791619
    DHowett committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    935702c View commit details
    Browse the repository at this point in the history
  12. Make the conversion from WORD to TextAttribute explicit (#6380)

    In Windows, we build with /Zc:wchar_t- (which makes wchar_t an unsigned
    short typedef.) This causes build breaks when we compare two wchar_t
    values (or a wchar_t and an enum class that's of type wchar_t) and the
    compiler decides that it might want to _promote them to TextAttribute_
    before doing the comparison.
    DHowett authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    2d18874 View commit details
    Browse the repository at this point in the history
  13. Reflect OS build fixes back from f90f3bf

    Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_uxp 272dfa1c4ad5e4202c4c56f3db7a445dc0b003cf
    DHowett committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    2aaad96 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4a1f2d3 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. Improve the legacy color conversions (#6358)

    This PR provides a faster algorithm for converting 8-bit and 24-bit
    colors into the 4-bit legacy values that are required by the Win32
    console APIs. It also fixes areas of the code that were incorrectly
    using a simple 16-color conversion that didn't handle 8-bit and 24-bit
    values.
    
    The faster conversion algorithm should be an improvement for issues #783
    and #3950.
    
    One of the main points of this PR was to fix the
    `ReadConsoleOutputAttribute` API, which was using a simplified legacy
    color conversion (the original `TextAttribute:GetLegacyAttributes`
    method), which could only handle values from the 16-color table. RGB
    values, and colors from the 256-color table, would be mapped to
    completely nonsensical values. This API has now been updated to use the
    more correct `Settings::GenerateLegacyAttributes` method.
    
    But there were also a couple of other places in the code that were using
    `GetLegacyAttributes` when they really had no reason to be working with
    legacy attributes at all. This could result in colors being downgraded
    to 4-bit values (often badly, as explained above), when the code was
    already perfectly capable of displaying the full 24-bits.
    
    This included the fill colors in the IME composer (in `ConsoleImeInfo`),
    and the construction of the highlighting colors in the color
    search/selection handler (`Selection::_HandleColorSelection`). I also
    got rid of some legacy attribute code in the `Popup` class, which was
    originally intended to update colors below the popup when the settings
    changed, but actually caused more problems than it solved.
    
    The other major goal of this PR was to improve the performance of the
    `GenerateLegacyAttributes` method, since the existing implementation
    could be quite slow when dealing with RGB values.
    
    The simple cases are handled much the same as they were before. For an
    `IsDefault` color, we get the default index from the
    `Settings::_wFillAttribute` field. For an `IsIndex16` color, the index
    can just be returned as is.
    
    For an `IsRgb` color, the RGB components are compressed down to 8 bits
    (3 red, 3 green, 2 blue), simply by dropping the least significant bits.
    This 8-bit value is then used to lookup a representative 16-color value
    from a hard-coded table. An `IsIndex256` color is also converted with a
    lookup table, just using the existing 8-bit index.
    
    The RGB mapping table was calculated by taking each compressed 8-bit
    color, and picking a entry from the _Campbell_ palette that best
    approximated that color. This was done by looking at a range of 24-bit
    colors that mapped to the 8-bit value, finding the best _Campbell_ match
    for each of them (using a [CIEDE2000] color difference calculation), and
    then the most common match became the index that the 8-bit value would
    map to.
    
    The 256-color table was just a simpler version of this process. For each
    entry in the table, we take the default RGB palette value, and find it's
    closest match in the _Campbell_ palette.
    
    Because these tables are hard-coded, the results won't adjust to changes
    in the palette. However, they should still produce reasonable results
    for palettes that follow the standard ANSI color range. And since
    they're only a very loose approximation of the colors anyway, the exact
    value really isn't that important.
    
    That said, I have tried to make sure that if you take an RGB value for a
    particular index in a reasonable color scheme, then the legacy color
    mapped from that value should ideally match the same index. This will
    never be possible for all color schemes, but I have tweaked a few of the
    table entries to improve the results for some of the common schemes.
    
    One other point worth making regarding the hard-coded tables: even if we
    wanted to take the active palette into account, that wouldn't actually
    be possible over a conpty connection, because we can't easily know what
    color scheme the client application is using. At least this way the
    results in conhost are guaranteed to be the same as in the Windows
    Terminal.
    
    [CIEDE2000]: https://en.wikipedia.org/wiki/Color_difference#CIEDE2000
    
    ## Validation Steps Performed
    
    This code still passes the `TextAttributeTests` that check the basic
    `GetLegacyAttribute` behaviour and verify the all legacy attributes
    roundtrip correctly. However, some of the values in the `RgbColorTests`
    had to be updated, since we're now intentionally returning different
    values as a result of the changes to the RGB conversion algorithm.
    
    I haven't added additional unit tests, but I have done a lot of manual
    testing to see how well the new algorithm works with a range of colors
    and a variety of different color schemes. It's not perfect in every
    situation, but I think it works well enough for the purpose it serves.
    
    I've also confirmed that the issues reported in #5940 and #6247 are now
    fixed by these changes. 
    
    Closes #5940 
    Closes #6247
    j4james authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    ccea667 View commit details
    Browse the repository at this point in the history
  2. Move all wildcards into targets or expand them (#6406)

    Wildcards are not allowed in toplevel ItemGroups in vcxproj; they must
    be generated by targets.
    
    We mostly use wildcards for pulling in PRI files that are dumped on disk
    by the translation tool. We don't want to check those in, so we can't
    expand references to them.
    
    To that end, I've introduced a new target that will take a list of
    folders containing resw files and expand wildcards under them.
    
    All[1] other wildcards have been moved into their respective targets
    _or_ simply expanded.
    
    [1]: Nothing has complained about the resource wildcards in
    CascadiaResources.build.items, so I haven't exploded it yet.
    
    Fixes #6214.
    DHowett authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    e3ee583 View commit details
    Browse the repository at this point in the history
  3. Remove the shell extension from directory backgrounds (#6415)

    We're removing this because of MSFT:24623699, which prevents us from being able to do the right thing when we're called on the background of a directory for a range of OS builds. 
    
    #6414 will track re-adding this to the Terminal when the original issue is closed.
    
    * [x] closes #6245
    * I work here
    zadjii-msft authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    55d8df4 View commit details
    Browse the repository at this point in the history
  4. Add support for win32-input-mode to conhost, ConPTY, Terminal (#6309)

    Adds support for `win32-input-mode` to conhost, conpty, and the Windows
    Terminal.
    
    * The shared `terminalInput` class supports sending these sequences when
      a VT client application requests this mode.
    * ConPTY supports synthesizing `INPUT_RECORD`s from the input sent to it
      from a terminal
    * ConPTY requests this mode immediately on startup (if started with a
      new flag, `PSEUDOCONSOLE_WIN32_INPUT_MODE`)
    * The Terminal now supports sending this input as well, when conpty asks
      for it.
    
    Also adds a new ConPTY flag `PSEUDOCONSOLE_WIN32_INPUT_MODE` which
    requests this functionality from conpty, and the Terminal requests this
    by default.
    
    Also adds `experimental.input.forceVT` as a global setting to let a user
    opt-out of this behavior, if they don't want it / this ends up breaking
    horribly.
    
    ## Validation Steps Performed
    * played with this mode in vtpipeterm
    * played with this mode in Terminal
    * checked a bunch of scenarios, as outlined in a [comment] on #4999
    
    [comment]: #4999 (comment)
    
    References #4999: The megathread
    References #5887: The spec
    
    Closes #879
    Closes #2865
    Closes #530 
    Closes #3079
    Closes #1119
    Closes #1694 
    Closes #3608 
    Closes #4334
    Closes #4446
    zadjii-msft authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    f327618 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. Remove parentheses from Preview and Dev build (#6418)

    ## Summary of the Pull Request
    Remove parentheses from the Preview and Dev build. Now they're called Windows Terminal Preview and Windows Terminal Dev Build respectively.
    
    Also removed them from other identifiers of Terminal for consistency.
    
    ## PR Checklist
    * [X] Closes #5974
    carlos-zamora authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    968462f View commit details
    Browse the repository at this point in the history
  2. Upload Windows Terminal 2.0 roadmap (#6419)

    <!-- 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
    Upload the roadmap for Windows Terminal 2.0 and link to it on the README.
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [ ] Closes #xxx
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [ ] Tests added/passed
    * [ ] Requires documentation to be 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
    
    <!-- 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
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    cinnamon-msft authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    8b201c1 View commit details
    Browse the repository at this point in the history
  3. wpf: add a .NET Core WPF Test project for the WPF Control (#6441)

    This commit introduces a new project that lets you F5 a working instance
    of the Wpf Terminal Control.
    
    To make the experience as seamless as possible, I've introduced another
    solution platform called "DotNet_x64Test". It is set to build the WPF
    projects for "Any CPU" and every project that PublicTerminalCore
    requires (including itself) for "x64". This is the only way to ensure
    that when you press F5, all of the native and managed dependencies get
    updated.
    
    It's all quite cool when it works.
    DHowett authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    48b99fa View commit details
    Browse the repository at this point in the history
  4. Set tab title as early as possible (#6433)

    When opening a new tab, it takes a few milliseconds before title to
    appears. This PR makes it instantaneous.
    
    * Updated the Terminal so that it can load the title from the settings
      before it is initialized.
    * Load terminal settings in TermControl constructor before the terminal
      is initialized (see above).
    * Update Tab so that it sets the TabViewItem's title in the constructor
      (in Tab::_MakeTabViewItem) instead of waiting for the VT sequence to
      set the title (from what I understand).
    
    NOTE 1: there is a similar problem with the tabview icon which is not
    fixed by this PR.
    
    NOTE 2: This is only a problem with animations disabled because
    otherwise the title fades in so there is enough time for it to be set
    when it becomes visible.
    
    ## Validation
    
    I ran the terminal and opened a new tab. The title appears instantly.
    beviu authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    f9b1238 View commit details
    Browse the repository at this point in the history
  5. Don't snap on input nor dismiss selection for just a modifier key (#6431

    )
    
    Does what it says on the label. Pure modifier keys weren't making it
    this far at all prior to #6309. This PR changes these methods to make
    sure that we only dismiss a selection or snap on input when the key
    pressed isn't a modifier key.
    
    ## References
    
    * regressed in #6309
    
    ## PR Checklist
    * [x] Closes #6423
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    
    * Tried to repro this in the Terminal, couldn't anymore.
    zadjii-msft authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    e03e46b View commit details
    Browse the repository at this point in the history
  6. Don't send a manual F7 keyup (#6442)

    ## Summary of the Pull Request
    
    When someone asked "Do we need to send a F7 keyup too" in #6309, the right answer was actually _no_. Turns out that while XAML will eat the F7 key**down**, it _won't_ eat the F7 key**up**. 
    
    ## References
    
    * regressed in #6309
    
    ## PR Checklist
    * [x] Closes #6438 
    * [x] I work here
    * [ ] Tested manually
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    
    * Checked this with the debug tap
    zadjii-msft authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    7b791f5 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2020

  1. Tie up some A11y loose threads (#6417)

    This pull request moves WindowUiaProvider back into Win32 interactivity
    and deletes all mention of it from Windows Terminal. Terminal does not
    have a single toplevel window that requires Console-like UIA, as each
    Xaml control inside it is in charge of its own destiny.
    
    I've also merged `IUiaWindow` and `IConsoleWindow` back together, as
    well as `WindowUiaProviderBase` and `WindowUiaProvider`.
    
    Things look a lot more like they did before we tore them apart.
    
    ## PR Checklist
    * [x] Closes #3564
    * [x] CLA
    * [x] Tests added/passed (manual)
    * [ ] Requires documentation to be updated
    * [x] I've discussed this with core contributors already
    
    ## Validation
    
    Carlos validated conhost and terminal on this branch.
    DHowett authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    9ce884c View commit details
    Browse the repository at this point in the history
  2. WpfTest: Add an x86/Win32 build, make DPI aware (#6455)

    This matches more closely how Visual Studio uses the WPF control.
    It comes in the form of _another platform_ (sorry), `DotNet_x86Test`.
    DHowett authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    8dcfd61 View commit details
    Browse the repository at this point in the history
  3. Improve perf by avoiding vector reallocation in renderer clusters and…

    … VT output graphics options (#6420)
    
    ## Summary of the Pull Request
    Caches vectors in the class and uses a new helper to opportunistically shrink/grow as viewport sizes change in order to save performance on alloc/free of commonly used vectors.
    
    ## PR Checklist
    * [x] Scratches a perf itch.
    * [x] I work here.
    * [x] wil tests added
    * [x] No add'l doc.
    * [x] Am core contributor.
    
    ## Detailed Description of the Pull Request / Additional comments
    Two fixes:
    1. For outputting lots of text, the base renderer class spent a lot of time allocating and freeing and reallocating the `Cluster` vector that adapts the text buffer information into render clusters. I've now cached this vector in the base render class itself and I shrink/grow it based on the viewport update that happens at the top of every frame. To prevent too much thrashing in the downward/shrink direction, I wrote the `til::manage_vector` helper that contains a threshold to only shrink if it asks for small enough of a size relative to the existing one. I used 80% of the existing size as the threshold for this one.
    2. For outputting lots of changing colors, the VT graphics output engine spent a bunch of time allocating and reallocating the vector for `GraphicsOptions`. This one doesn't really have a predictable size, but I never expect it to get extremely big. So I just held it in the base class.
    
    ## Validation Steps Performed
    * [x] Ran the til unit test
    * [x] Checked render cluster vector time before/after against `big.txt` from #1064
    * [x] Checked VT graphics output vector time before/after against `cacafire`
    
    Case | Before | After
    ---|---|---|
    `big.txt` | ![image](https://user-images.githubusercontent.com/18221333/84088632-cbaa8400-a9a1-11ea-8932-04b2e12a0477.png) | ![image](https://user-images.githubusercontent.com/18221333/84088996-b6822500-a9a2-11ea-837c-5e32a110156e.png)
    `cacafire` | ![image](https://user-images.githubusercontent.com/18221333/84089153-22648d80-a9a3-11ea-8567-c3d80efa16a6.png) | ![image](https://user-images.githubusercontent.com/18221333/84089190-34463080-a9a3-11ea-98e5-a236b12330d6.png)
    miniksa authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    0c93b2e View commit details
    Browse the repository at this point in the history
  4. Reduce latency with DXGI 1.3 GetFrameLatencyWaitableObject (#6435)

    This pull request reduces input lag, especially with selection, by using
    `IDXGISwapChain2::GetFrameLatencyWaitableObject`.
    
    This is based on the [DXGI 1.3 documentation].
    
    Excerpt from the [DXGI 1.3 improvement list]:
    > The following functionality has been added in Microsoft DirectX
    Graphics Infrastructure (DXGI) 1.3, which is included starting in
    Windows 8.1.
    
    Before, during rendering:
    1. render frame
    2. call `Present` on swap chain:
       2.a. blocks until it can present
       2.b. meanwhile, selection/text in terminal might have changed, but
         we're still using the frame that we rendered before blocking
       2.c. presents
    
    After, during rendering:
    1. block until we can present
    2. render frame with latest data
    3. call `Present` on swap chain:
      3.a. present without blocking
    
    [DXGI 1.3 documentation]: https://docs.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains
    [DXGI 1.3 improvement list]: https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/dxgi-1-3-improvements:
    beviu authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    a921bbf View commit details
    Browse the repository at this point in the history
  5. Open the system menu when user right clicks the drag bar (#6443)

    Related to #1375 ("Click/Right click icon should display
    Minimize/Maximize/Close menu")
    beviu authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    30a6c1e View commit details
    Browse the repository at this point in the history
  6. Deps: Bump Newtonsoft.Json from 10.0.3 to 12.0.3 (#6369)

    Bump Newtonsoft.Json from 10.0.3 to 12.0.3
    
    ## References
    Part of #5297
    
    ## PR Checklist
    * [ ] Closes (none)
    * [x] CLA signed
    * [ ] Tests added/passed N/A
    * [ ] Requires documentation to be updated N/A
    * [ ] 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
    CI builds successfully
    WSLUser authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    7fc7355 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2020

  1. Fix the x86 build and re-enable x86 CI (#6467)

    This was a miss.
    DHowett authored Jun 11, 2020
    Configuration menu
    Copy the full SHA
    60630cf View commit details
    Browse the repository at this point in the history
  2. Add Mini-Spec for openSettings (#5915)

    The spec introduces a keybinding argument of 'target' to be able to open a specific settings file. When the Settings UI gets implemented, it will also become an option.
    
    Alternative designs were presented but the 'target' model was decided on.
    carlos-zamora authored Jun 11, 2020
    Configuration menu
    Copy the full SHA
    bcdccc5 View commit details
    Browse the repository at this point in the history
  3. Fix 3 different bugs in the WPF control (#6464)

    * [wpf] WM_KEYUP crashes on x64 #6444
      - Turns out that doing the `(uint)lParam` cast worked fine for the
        keydowns, because the value of lParam usually didn't have super
        high-order bits set. That's not the case for keyups, where the 30th
        bit is _always_ set. This is fixed by explicitly getting the byte
        with the scancode in it.
    * [wpf] WM_KEYUP generates wrong value in Win32 input mode #6445
      - This was fixed by basically the same thing as the above.
    * [wpf] WPF control crashes on startup trying to render cursor #6446
      - This was a regression from #6337. I forgot to initialize the brush
        used to paint the cursor, because the UWP version always uses color
        (but the WPF one relies on the text foreground color).
    * Also adds a minor change to the WPF test app, so that the user can
      actually exit `win32-input-mode`.
    
    * #6337 regressed #6446 
    * #6309 regressed the other two.
    
    Closes #6444
    Closes #6445
    Closes #6446
    zadjii-msft authored Jun 11, 2020
    Configuration menu
    Copy the full SHA
    db518c0 View commit details
    Browse the repository at this point in the history
  4. Finalize Command Palette Spec (#5674)

    ## Summary of the Pull Request
    
    This PR aims to move the command palette spec out of the draft state and into a finalized state for inclusion in the 2.0 version of the Windows Terminal. 
    
    Notably, I've added sections regarding the ability to run `wt` commandlines using the Command Palette UI, something we hadn't considered in the original draft, because `wt` commandlines didn't land for like _4 months_ after this first draft.
    
    ## References
    * #2046 - the original command palette thread
    * #2193 - the original draft PR
    * #5400 - the new command palette megathread for WT 2.0, which I'll be updating with follow-up tasks as we work on implementing this.
    
    ## PR Checklist
    * [x] Specs #2046
    * [x] I work here
    * [x] Is documentation
    
    ## Detailed Description of the Pull Request / Additional comments
    
    _read the spec_
    zadjii-msft authored Jun 11, 2020
    Configuration menu
    Copy the full SHA
    827cc42 View commit details
    Browse the repository at this point in the history
  5. Pass <Alt> to the application (#6461)

    For mysterious reasons lost to the sands of time, XAML will _never_ pass
    us a VK_MENU event. This is something that'll probably get fixed in
    WinUI 3, but considering we're stuck on system XAML for the time being,
    the only way to work around this bug is to pass the event through
    manually. This change generalizes the F7 handler into a "direct key
    event" handler that uses the same focus and tunneling method to send
    different key events, and then uses it to send VK_MENU.
    
    ## Validation Steps Performed
    
    Opened the debug tap, verified that I was seeing alt key ups.
    Also used some alt keybindings to make sure I didn't break them.
    
    Closes #6421
    zadjii-msft authored Jun 11, 2020
    Configuration menu
    Copy the full SHA
    e8ece16 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2020

  1. Throttle scrollbar updates in TermControl to ~one per 8ms (#4608)

    In addition to the below (original) description, this commit introduces
    a ThrottledFunc template that can throttle _any_ function. It applies
    that type to muffle updates to the scrollbar.
    
    ---
    
    Redo #3531 but without the bug that it caused (#3622) which is why it
    was reverted.
    
    I'm sorry if I explain this badly. If you don't understand a part, make
    sure to let me know and I will explain it better.
    
    ### Explanation
    
    How it worked before: `Terminal` signals that viewport changed ->
    `TermControl::_TerminalScrollPositionChanged` gets called on the
    terminal thread -> it dispatches work for later to be ran the UI thread
    to updates the scrollbar's values
    
    Why it's bad:
    * If we have many viewport changes, it will create a long stack of
      operations to run. Instead, we should just update the scroll bar with
      the most recent information that we know.
    * Imagine if the rate that the work gets pushed on the UI thread is
      greater than the rate that it can handle: it might freeze?
    * No need to be real time, we can wait just a little bit (8ms) to
      accumulate viewport changes before we actually change the scroll bar's
      value because it appears to be expensive (see perf below).
    
    Now: `Terminal` signals that viewport changed ->
    `TermControl::_TerminalScrollPositionChanged` gets called on the
    terminal thread -> it tells the `ScrollBarUpdater` about a new update ->
    the `ScrollBarUpdater` only runs one job (I don't know if that's the
    right term) on the UI thread at a time. If a job is already running but
    hasn't updated the scroll bar yet, it changes the setting in the already
    existing job to update the scroll bar with the new values. A job "waits"
    some time before doing the update to throttle updates because we don't
    need real time scroll bar updates. -> eventually, it updates the scroll
    bar If the user scrolls when a scroll bar update is pending, we keep the
    scroll bar's Maximum and Minimum but let the user choose its new Value
    with the `CancelPendingValueChange` method.
    
    ### Note
    
    Also I changed a little bit the code from the Terminal to notify the
    TermControl less often when possible.
    
    I tried to scroll with the scroll bar, with the mouse wheel. I tried to
    scroll while content is being outputted.
    
    I tried to reproduce the crash from #2248 without success (good).
    
    Co-authored-by: Leonard Hecker <leonard@hecker.io>
    
    Closes #3622
    beviu authored Jun 12, 2020
    Configuration menu
    Copy the full SHA
    25df527 View commit details
    Browse the repository at this point in the history
  2. Add keybinding arg to openSettings (#6299)

    ## Summary of the Pull Request
    Adds the `target` keybinding arg to `openSettings`. Possible values include: `defaultsFile`, `settingsFile`, and `allFiles`.
    
    ## References
    #5915 - mini-spec
    
    ## PR Checklist
    * [x] Closes #2557 
    * [x] Tests added/passed
    
    ## Detailed Description of the Pull Request / Additional comments
    Implemented as discussed in the attached spec. A new enum will be added for the SettingsUI when it becomes available.
    
    ## Validation Steps Performed
    Added the following to my settings.json:
    ```json
    { "command": "openSettings", "keys":... },
    { "command": { "action": "openSettings" }, "keys":... },
    { "command": { "action": "openSettings", "target": "settingsFile" }, "keys":... },
    { "command": { "action": "openSettings", "target": "defaultsFile" }, "keys":... },
    { "command": { "action": "openSettings", "target": "allFiles" }, "keys":... }
    ```
    carlos-zamora authored Jun 12, 2020
    Configuration menu
    Copy the full SHA
    19fcbce View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2020

  1. Add fast path to til::bitmap::translate using bitshifts (#6493)

    This commit adds a fast path to `til::bitmap::translate`: use bit shifts
    when the delta is vertical.
    
    Performance while printing the content of a big file, with the patch
    from #6492 which hasn't been merged yet, in Release mode:
    
    Before:
    * translate represents 13.08% of samples in InvalidateScroll
    
    After:
    * translate represents  0.32% of samples in InvalidateScroll
    
    ## Validation
    
    Tests passed.
    beviu authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    c360b75 View commit details
    Browse the repository at this point in the history
  2. Clear cached runs after translate_y (#6501)

    "While re-reading the code, I found out that I forgot to do clear cached runs
    after translate_y in c360b75."
    beviu authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    c0ffc9b View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2020

  1. Reintroduce the check for VT_INPUT_MODE in AdaptDispatch (#6485)

    This commit reverts the removal of the "SSH hack" in #5383. It was
    originally added as a solution to #4911, when we realized that SSH would
    request the SS3 cursor key encoding but we weren't equipped to handle
    it.
    
    A number of folks have filed issues that, in summary, say "when I use
    SSH, I can't select/copy/paste text". It turns out that SSH will _also_
    pass through requests for mouse input. Terminal dutifully responds to
    those requests, of course, by disabling mouse selection/copy/paste. SSH
    is **NOT** actually in VT_INPUT_MODE, so it will never receive the mouse
    messages.
    
    It's important to note that even with #376 fixed, we are still required
    to keep this check. With the closure of #376, we'll be able to convert
    VT mouse input back into Win32 mouse input for Win32 applications . . .
    but SSH also doesn't know how to handle Win32 mouse input.
    
    Fixes #6476.
    Fixes #6196.
    Fixes #5704.
    Fixes #5608.
    DHowett authored Jun 15, 2020
    Configuration menu
    Copy the full SHA
    5e2c4c6 View commit details
    Browse the repository at this point in the history
  2. Extract ActionAndArgs::FromJson into its own class (#6351)

    ## Summary of the Pull Request
    
    Pulls the `ActionAndArgs` deserializing into its own class, separate from `AppKeyBindings`. Some 2.0 features are going to need to re-use these actions in their json, so we'll want one unified way of deserializing them.
    
    ## References
    
    * Done primarily as part of the work on #2046/#5400/#5674 
    * Also related: #1571/#5888 
    * Will aggressively conflict with any open PRs that introduced keybindings (looking at #6299)
    
    ## PR Checklist
    * [x] Closes nothing, this is code refactoring
    * [x] I work here
    * [x] Current tests passed
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Jun 15, 2020
    Configuration menu
    Copy the full SHA
    6d2fc5d View commit details
    Browse the repository at this point in the history
  3. Fix sending a NUL on alt key up (#6516)

    ## Summary of the Pull Request
    
    Make sure to set the scancode for the manual alt-up's we're sending. If you don't, then terminalInput in the conpty is going to treat that keypress as an actual NUL, and send that to the connected client.
    
    ## References
    * regressed in #6421 
    
    ## PR Checklist
    * [x] Closes #6513
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    
    ## Validation Steps Performed
    Tested `showkeys -a`
    zadjii-msft authored Jun 15, 2020
    Configuration menu
    Copy the full SHA
    332d174 View commit details
    Browse the repository at this point in the history
  4. Only snap on key _downs_ (#6517)

    ## Summary of the Pull Request
    Prior to #6309, we'd only snap on input for non-modifier key_down_ events. #6423 fixed this for modifier keys, but didn't fix this for keyups.
    
    ## References
    * #6423 was an incomplete fix to this problem, which caused this regression
    
    ## PR Checklist
    * [x] Closes #6481
    * [x] I work here
    * [ ] Tests added/passed
    * [n/a] Requires documentation to be updated
    zadjii-msft authored Jun 15, 2020
    Configuration menu
    Copy the full SHA
    888e724 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c1076a8 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. Remove the WinTelnetEngine (#6526)

    Nobody was using it.
    
    Discussed in #2661.
    DHowett authored Jun 17, 2020
    Configuration menu
    Copy the full SHA
    ffaba38 View commit details
    Browse the repository at this point in the history
  2. Spec: Advanced Tab Switcher (#3753)

    <!-- 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 is the spec for the Advanced Tab Switcher. This would allow the user to navigate through a vertical list of tabs through a UI, similar to those found in VSCode and Visual Studio.
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    #1502: Feature Request: Advanced Tab Switcher
    #973: Ctrl+Tab toggling between two tabs
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [x] Spec for #1502
    * [x] CLA signed.
    leonMSFT authored Jun 17, 2020
    Configuration menu
    Copy the full SHA
    6485a2b View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. Introduce JsonUtilsNew as documented in #5875 (#6355)

    Read the [JsonUtils Spec] for more details.
    
    This pull request introduces the next version of JsonUtils. It is in a
    separate file for ease of review and testing.
    
    JsonUtilsNew will be renamed in a subsequent commit that rewrites our
    JSON deserializers.
    
    ### Implementer's Notes
    
    I went with telescoping exceptions for the key parsing code, because
    it's totally possible that you can be five keys deep and encounter a
    type error. This lets us encode information about all failures in the
    chain instead of just the topmost one.
    
    The original JsonUtilsNew code changed to use `decay` everywhere because
    the tests wouldn't compile. We want to treat `GetValue<const guid>` _the
    same as_ `GetValue<guid>`, and this lets us do so. `decay` is awesome.
    
    I've been developing this with a shim that redirects `JsonUtils.h` to
    `JsonUtilsNew.h`. I am not comfortable deleting the original until we've
    moved off of it, and that _will_ be the subject of a followup PR.
    
    ## Validation Steps Performed
    
    So many tests.
    
    [JsonUtils Spec]: https://github.com/microsoft/terminal/blob/master/doc/cascadia/Json-Utility-API.md
    
    Refs #2550
    DHowett authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    10bc1a6 View commit details
    Browse the repository at this point in the history
  2. Fixed #6377: TerminalCore::_altGrAliasing is undefined by default (#6571

    )
    
    ## Summary of the Pull Request
    
    Fixes #6377. `TerminalCore` does not initialize `_altGrAliasing`. The impact is minimized in WT because it defaults to `true` in higher layers. It's not initialized when WPF is driving.
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [x] Closes #6377
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [x] Tests added/passed
    * [ ] Requires documentation to be 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
    lhecker authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    78ca722 View commit details
    Browse the repository at this point in the history
  3. Use early returns in TermControl::_KeyHandler (#6575)

    ## Summary of the Pull Request
    
    This PR changes `TermControl::_KeyHandler` to use early returns, which you can think of as "guard clauses".
    This has the benefit of a reduced nesting level, easier to understand control flow and opens op the way to more complex conditions.
    
    ## 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
    * [ ] Requires documentation to be 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
    
    Everything still works as expected.
    lhecker authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    4eaa0b8 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2020

  1. Configuration menu
    Copy the full SHA
    1fdceb0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e337faa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    acd3ba7 View commit details
    Browse the repository at this point in the history
  4. Improved ATTR_ROW::ReplaceAttrs performance (#6573)

    ## Summary of the Pull Request
    
    Improve `ATTR_ROW::ReplaceAttrs` performance by only reserving the necessary capacity instead of resizing the new run.
    That way `TextAttributeRun`s are only instantiated once instead of twice.
    
    ## 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
    * [ ] Requires documentation to be 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
    
    ## Detailed Description of the Pull Request / Additional comments
    
    Performance could be further improved by directly moving `TextAttributeRun`s into the new vector, but I considered this out of scope for this PR.
    
    ## Validation Steps Performed
    
    CPU usage when running `cacafire` is slightly reduced.
    lhecker authored Jun 19, 2020
    Configuration menu
    Copy the full SHA
    4f55568 View commit details
    Browse the repository at this point in the history
  5. Add schema check to PR template (#6599)

    This adds a check for updating the schema, and rewords the documentation checkbox to match the wording of the others.
    carlos-zamora authored Jun 19, 2020
    Configuration menu
    Copy the full SHA
    dc5baab View commit details
    Browse the repository at this point in the history
  6. Enable hot reload of renderer settings that aren't already hot reload…

    … capable (#6551)
    
    ## Summary of the Pull Request
    
    ## PR Checklist
    * [x] Closes #3927
    * [x] I work here.
    * [x] Tested manually.
    * [x] Requires documentation to be updated: (generate doc bug here)
    * [x] Am core contributor.
    
    ## Detailed Description of the Pull Request / Additional comments
    - I found four settings that weren't hot reloadable with the 3927 comment above them:
    1. Experimental retro terminal effect
    2. Experimental software rendering
    3. Experimental full repaint rendering
    4. Antialiasing settings for text
    
    I made them all hot reloadable by telling the `TermControl` to propagate them on settings change to the `DxEngine`.
    Then I set up the `DxEngine` inside the setters to only set them if they changed. And if they do change, to trigger a full repaint and/or a complete drop and recreate of the entire DX device chain (as would happen if it were lost for another reason like a user-mode graphics failure, disconnected display, etc.)
    I made the boolean an atomic because the settings can be coming in off of another thread (the XAML eventing one) and the renderer is picking the status up on its thread at the top of the BeginPaint frame.
    
    ## Validation Steps Performed
    - [x] Opened it up and toggled all the settings while staring at PowerShell
    - [x] Opened it up and toggled all the settings while staring at something intensive like a `cacafire` fire
    miniksa authored Jun 19, 2020
    Configuration menu
    Copy the full SHA
    b91430b View commit details
    Browse the repository at this point in the history
  7. Improve bitmap::_calculateArea performance (#6572)

    `bitmap::_calculateArea` performance can be improved by leveraging the
    optimized `find_first`/`find_next` methods instead of iterating through
    the bitmap manually.
    lhecker authored Jun 19, 2020
    Configuration menu
    Copy the full SHA
    15f2535 View commit details
    Browse the repository at this point in the history
  8. Use D2DDeviceContext and friends over D2DRenderTarget (#6527)

    I was told that the DeviceContext version supercedes the RenderTarget
    one. This moves us to it so we can gain access to a higher level of
    control over the various pieces in our pipeline as we continue to evolve
    the renderer.
    
    The underlying motivation here is to potentially use a
    `ID2D1CommandList` to batch our commands and run them all later outside
    the lock. That can only really be done with this more granular level of
    control over the pipeline. So this moves to that in a single step that
    is easily findable in history should we have problems
    
    I discussed this with @NiklasBorson of the Direct2D/DirectWrite team as
    well as with @DHowett before doing it.
    
    ## Validation
    - [x] Checked docs to make sure that these work on Windows 7 with
      Platform Update
    - [x] Manual smoke test real quick
    - [ ] Try running on Win7 + Platform Update after change
    - [x] Probably do more than just a smoke test manually or otherwise
    
    Closes #6525
    miniksa authored Jun 19, 2020
    Configuration menu
    Copy the full SHA
    951f389 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. Configuration menu
    Copy the full SHA
    26d6a37 View commit details
    Browse the repository at this point in the history
  2. Recycle assorted rendering components to accelerate drawing (#6483)

    This saves an awful lot of construction/destruction and memory
    allocation, especially with text that changes a lot (see: cacafire).
    
    Three things:
    1. Recycling the text layouts. This holds onto the `CustomTextLayout` so
       all the things that don't change related to drawing targets and
       whatnot aren't freed and recreated every frame.
    2. Reordering the runs in place. This saves a vector
       allocation/copy/delete every time OrderRuns is called. They can be
       rearranged in place.
    3. Only clip once per row. This reduces the clip push/pop to only one
       time per row. Since we're always redrawing an entire row at a time,
       this saves a lot of alloc/free of the clip frame, dramatically
       reduces queued commands, and makes less work on the flush since
       clipping requires staging the drawing and then bringing it back to
       the main surface.
    miniksa authored Jun 22, 2020
    Configuration menu
    Copy the full SHA
    e7d3dc5 View commit details
    Browse the repository at this point in the history
  3. Double-click a tab to rename it (#6628)

    <!-- 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
    
    When the user double clicks on a tab, show the tab rename box
    as if they right clicked on the tab and clicked on "Rename".
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [x] Closes #6600
    * [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
    
    I added a handler for the `DoubleTapped` event on the tab view item
    when we are constructing it for the tab (in `Tab::_MakeTabViewItem`).
    
    The code for that handler was copied the "rename tab menu item" click
    handler.
    
    I did not extract the code into a member function because it is very
    short (only 2 lines of code) and only used twice so it is not worth
    it IMO.
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    beviu authored Jun 22, 2020
    Configuration menu
    Copy the full SHA
    073e732 View commit details
    Browse the repository at this point in the history
  4. Spec for unified keybindings and commands, and synthesized action nam…

    …es (#6532)
    
    ## Summary of the Pull Request
    
    This is another iteration on the Command Palette spec, from #5674. These were some ideas that were tossed around by @DHowett, @cinnamon-msft and myself, formalized here. I proposed this as an addendum to the original spec, since I think the first made sense atomically, and this only makes sense as a set of changes to the original. I didn't want to go hacking up the original doc to add this set of changes. 
    
    **There are two proposals in this spec - they should be viewed as two atomic units. They can be accepted or rejected independently. I'm suggesting we approve both. They work _together_. I'm realizing now that this is worded confusingly, and it's on me to fix that.**
    
    ## PR Checklist
    * [x] Another spec in the #2046 / #5400 saga
    * [x] I work here
    * [x] _is a doc_
    
    > ## Abstract
    > 
    > This document is intended to serve as an addition to the [Command Palette Spec].
    > While that spec is complete in it's own right, subsequent discussion revealed
    > additional ways to improve the functionality and usability of the command
    > palette. This document builds largely on the topics already introduced in the
    > original spec, so readers should first familiarize themselves with that
    > document.
    > 
    > One point of note from the original document was that the original specification
    > was entirely too verbose when defining both keybindings and commands for
    > actions. Consider, for instance, a user that wants to bind the action "duplicate
    > the current pane". In that spec, they need to add both a keybinding and a
    > command:
    > 
    > ```json
    > {
    >     "keybindings": [
    >         { "keys": [ "ctrl+alt+t" ], "command": { "action": "splitPane", "split":"auto", "splitMode": "duplicate" } },
    >     ],
    >     "commands": [
    >         { "name": "Duplicate Pane", "action": { "action": "splitPane", "split":"auto", "splitMode": "duplicate" }, "icon": null },
    >     ]
    > }
    > ```
    > 
    > These two entries are practically the same, except for two key differentiators:
    > * the keybinding has a `keys` property, indicating which key chord activates the
    >   action.
    > * The command has a `name` property, indicating what name to display for the
    >   command in the Command Palette.
    > 
    > What if the user didn't have to duplicate this action? What if the user could
    > just add this action once, in their `keybindings` or `commands`, and have it
    > work both as a keybinding AND a command?
    >
    zadjii-msft authored Jun 22, 2020
    Configuration menu
    Copy the full SHA
    81eb135 View commit details
    Browse the repository at this point in the history
  5. Optimize booleans (#6548)

    <!-- 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
    Many places in this codebase has an equality comparison to the boolean FALSE. This adds unneeded complexity as C and C++ has a NOT operand for use of these in if statements. This makes the code more readable in those areas.
    
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [X] Tests added/passed
    * [ ] Requires documentation to be 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
    One boolean being compared to FALSE was only used once, with the boolean name being "b", so it is better off not existing at all.
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    Unit Testing passed, compiler refactoring
    pi1024e authored Jun 22, 2020
    Configuration menu
    Copy the full SHA
    ff23be0 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2020

  1. Replace std::map with std::unordered_map (#6640)

    Replace std::map with std::unordered_map when the order doesn't matter
    and hash functions are provided. Simple optimizations, but I expect the
    performance should be strictly better, especially for
    CodepointWidthDetector.hpp.
    ZhaoMJ authored Jun 23, 2020
    Configuration menu
    Copy the full SHA
    b24dbf7 View commit details
    Browse the repository at this point in the history
  2. Update _TerminalCursorPositionChanged to use ThrottledFunc (#6492)

    * Update _TerminalCursorPositionChanged to use ThrottledFunc.
    * Rename previous ThrottledFunc to ThrottledArgFunc because now
      ThrottledFunc is for functions that do not take an argument.
    * Update ThrottledFunc and ThrottledArgFunc to accept a CoreDispatcher
      on which the function should be called for convenience.
    * Don't use coroutines/winrt::fire_and_forget in
      ThrottledFunc/ThrottledArgFunc because they are too slow (see PR).
    
    _AdjustCursorPosition went from 17% of samples to 3% in performance
    testing.
    beviu authored Jun 23, 2020
    Configuration menu
    Copy the full SHA
    58f5d7c View commit details
    Browse the repository at this point in the history
  3. Merged PR 4838632: Merge OSS up to 58f5d7c

    Related work items: MSFT:27172323
    DHowett committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    0845b3c View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2020

  1. Configuration menu
    Copy the full SHA
    d8810f2 View commit details
    Browse the repository at this point in the history
  2. Add keybinding to rename tab (#6557)

    <!-- 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 keybinding for renaming a tab
    <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
    ## References
    
    <!-- Please review the items on the PR checklist before submitting-->
    ## PR Checklist
    * [X] Fulfills format requirements set by #6567 
    * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
    * [X] Tests passed
    * [X] Requires documentation to be 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: #6567 and here (#6557)
    
    This no longer c loses #6256, as the spec changed. 
    <!-- 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
    
    <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
    ## Validation Steps Performed
    ggadget6 authored Jun 24, 2020
    Configuration menu
    Copy the full SHA
    4027ba3 View commit details
    Browse the repository at this point in the history
  3. Revert "Skip ... analysis when the ... text is simple (6206)" (#6665)

    This reverts commit 94eab6e.
    
    We'll reintroduce this again after making sure it plays nicely with
    recycling and box drawing glyphs.
    
    Fixes #6488
    Fixes #6664
    DHowett authored Jun 24, 2020
    Configuration menu
    Copy the full SHA
    cffd4eb View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2020

  1. Implement Shift+MultiClick Selection Expansion (#6322)

    This pull request implements shift+double/triple click. Proper behavior
    (as described in #4557) is to only expand one selection point, not both.
    
    Adding the `bool targetStart` was a bit weird. I decided on this being
    the cleanest approach though because I still want `PivotSelection` to be
    its own helper function. Otherwise, the concept of "pivoting" gets kinda
    messy.
    
    ## Validation Steps Performed
    Manual testing as described on attached issue.
    Tests were added for Shift+Click and pivoting the selection too.
    
    Closes #4557
    carlos-zamora authored Jun 25, 2020
    Configuration menu
    Copy the full SHA
    9215b52 View commit details
    Browse the repository at this point in the history
  2. Add setTabColor and openTabColorPicker actions (#6567)

    ## Summary of the Pull Request
    
    Adds a pair of `ShortcutAction`s for setting the tab color.
    * `setTabColor`: This changes the color of the current tab to the provided color, or can be used to clear the color.
    * `openTabColorPicker`: This keybinding immediately activates the tab color picker for the currently focused tab.
    
    ## References
    
    ## PR Checklist
    * [x] scratches my own itch
    * [x] I work here
    * [x] Tests added/passed
    * [x] MicrosoftDocs/terminal#69
    
    ## Detailed Description of the Pull Request / Additional comments
    
    ## Validation Steps Performed
    * hey look there are tests
    * Tested with the following:
    ```json
    
            // { "command": "setTabColor", "keys": [ "alt+c" ] },
            { "keys": "ctrl+alt+c", "command": { "action": "setTabColor", "color": "#123456" } },
            { "keys": "alt+shift+c", "command": { "action": "setTabColor", "color": null} },
            { "keys": "alt+c", "command": "openTabColorPicker" },
    ```
    zadjii-msft authored Jun 25, 2020
    Configuration menu
    Copy the full SHA
    a3a9df8 View commit details
    Browse the repository at this point in the history
  3. When we add a new tab in compact mode, re-enforce Compact mode (#6670)

    This workaround was suggested by @chingucoding in
    microsoft/microsoft-ui-xaml#2711
    
    Fixes #6570
    
    ## References
    
    microsoft/microsoft-ui-xaml#2711
    #6570
    
    ## PR Checklist
    * [x] Closes an issue
    * [x] CLA
    * [x] Tested
    * [x] Docs not required
    * [x] Schema not required
    DHowett authored Jun 25, 2020
    Configuration menu
    Copy the full SHA
    fefd140 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. Hardcode the paths to Windows PowerShell and CMD (#6684)

    Occasionally, we get users with corrupt PATH environment variables: they
    can't lauch PowerShell, because for some reason it's dropped off their
    PATH. We also get users who have stray applications named
    `powershell.exe` just lying around in random system directories.
    
    We can combat both of these issues by simply hardcoding where we expect
    PowerShell and CMD to live. %SystemRoot% was chosen over %WINDIR%
    because apparently (according to Stack Overflow), SystemPath is
    read-only and WINDIR isn't.
    
    Refs #6039, #4390, #4228 (powershell was not found)
    Refs #4682, Fixes #6082 (stray powershell.exe)
    DHowett authored Jun 26, 2020
    Configuration menu
    Copy the full SHA
    2fc1ef0 View commit details
    Browse the repository at this point in the history
  2. Add support for the Command Palette (#6635)

    ## Summary of the Pull Request
    
    ![command-palette-001](https://user-images.githubusercontent.com/18356694/85313480-b6dbef00-b47d-11ea-8a8f-a802d26c2f9b.gif)
    
    
    This adds a first iteration on the command palette. Notable missing features are:
    * Commandline mode: This will be a follow-up PR, following the merge of #6537
    * nested and iterable commands: These will additionally be a follow-up PR.
    
    This is also additionally based off the addenda in #6532. 
    
    This does not bind a key for the palette by default. That will be done when the above follow-ups are completed.
    
    ## References
    * #2046 - The original command palette thread
    * #5400 - This is the megathread for all command palette issues, which is tracking a bunch of additional follow up work 
    * #5674 and #6532 - specs
    * #6537 - related
    
    ## PR Checklist
    * [x] Closes #2046
      - incidentally also closes #6645
    * [x] I work here
    * [x] Tests added/passed
    * [ ] Requires documentation to be updated - delaying this until it's more polished.
    
    
    ## Detailed Description of the Pull Request / Additional comments
    
    * There's a lot of code for autogenerating command names. That's all in `ActionArgs.cpp`, because each case is so _not_ boilerplate, unlike the rest of the code in `ActionArgs.h`.
    
    ## Validation Steps Performed
    
    * I've been playing with this for months.
    * Tests
    * Selfhost with the team
    zadjii-msft authored Jun 26, 2020
    Configuration menu
    Copy the full SHA
    aa1ed0a View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2020

  1. Restore simple text runs, correct for crashes (#6695)

    Restores the simple text run analysis and skipping of most of the
    shaping/layout steps. Corrects one of the fast-path steps to ensure that
    offsets and clusters are assigned.
    
    ## References
    - Bug #6488 
    - Bug #6664
    - Simple run PR #6206 
    - Simple run revert PR #6665
    - Recycle glyph runs PR #6483
    
    The "correction" functions, by which box drawing analysis is one of
    them, is dependent on the steps coming before it properly assigning the
    four main vectors of the text layout glyphs: indices, advances, offsets,
    and clusters. When the fast path is identified by the code from #6206,
    only two of those are fully updated: indices and advances. The offsets
    doesn't tend to cause a problem because offsets are rarely used so
    they're pretty much always 0 already (but this PR enforces that they're
    zero for the simple/fast path.) The clusters, however, were not mapped
    for the fast path. This showed itself in one of two ways:
    1. Before the recycled runs PR #6483, the cluster map had a 0 in every
       field for the stock initialized vector.
    2. After the recycled runs PR #6483, the cluster map had the previous
       run's mapping in it.
    
    This meant that when we reached the steps where glyph runs were
    potentially split during the correction phase for box drawing
    characters, unexpected values were present to map the glyph indices to
    clusters and were corrected, adjusted, or split in an unexpected
    fashion. 
    
    For instance, the index out of range bug could appear when the default 0
    values appended to the end of the clusters vector were decremented down
    to a negative value during the run splitter as the true DWrite cluster
    mapper doesn't generate that sort of pattern in the slow path case
    without also breaking the run itself.
    
    The resolution here is therefore to ensure that all of the fields
    related to glyph layout are populated even in the fast path. This
    doesn't affect the slow path because that one always populated all
    fields by asking DWrite to do it. The fast path just skips a bunch of
    DWrite steps because it can implicitly identify patterns and save a
    bunch of time.
    
    I've also identified a few vectors that weren't cleared on reset/reuse
    of the layout. I'm clearing those now so the `.resize()` operations
    performed on them to get to the correct lengths will fill them with
    fresh and empty values instead of hanging on to ones that may have been
    from the previous. This should be OK memory perf wise because the act of
    `.clear()` on a vector shouldn't free anything, just mark it invalid.
    And doing `.resize()` from an empty one should just default construct
    them into already allocated space (which ought to be super quick).
    
    ## Validation
    * [x] Far.exe doesn't crash and looks fine
    * [x] "\e[30;47m\u{2500} What \u{2500}\e[m" from #6488 appears
      appropriately antialiased
    * [x] Validate the "\e[30;47m\u{2500} What \u{2500}\e[m" still works
      when `FillGeometry` is nerfed as a quick test that the runs are split
      correctly.
    * [x] Put `u{fffd} into Powershell Core to make a replacement char in
      the output. Then press enter a few times and see that shrunken initial
      characters on random rows. Verify this is gone.
    
    Closes #6668
    Closes #6669
    
    Co-Authored-By: Chester Liu <skyline75489@outlook.com>
    miniksa and skyline75489 authored Jun 29, 2020
    Configuration menu
    Copy the full SHA
    c4885f1 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2020

  1. Configuration menu
    Copy the full SHA
    bbf2c70 View commit details
    Browse the repository at this point in the history
  2. Add support for OSC 52 (copy-to-clipboard) (#5823)

    With this commit, terminal will be able to copy text to the system
    clipboard by using OSC 52 MANIPULATE SELECTION DAATA.
    
    We chose not to implement the clipboard querying functionality offered
    by OSC 52, as sending the clipboard text to an application without the
    user's knowledge or consent is an immense security hole.
    
    We do not currently support the clipboard specifier Pc to specify which
    clipboard buffer should be filled
    
    # Base64 encoded `foo`
    $ echo -en "\e]52;;Zm9v\a"
    
    # Multiple lines
    # Base64 encoded `foo\r\nbar`
    $ echo -en "\e]52;;Zm9vDQpiYXI=\a"
    
    Closes #2946.
    uzxmx authored Jun 30, 2020
    Configuration menu
    Copy the full SHA
    b24579d View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2020

  1. Configuration menu
    Copy the full SHA
    02d5f90 View commit details
    Browse the repository at this point in the history
  2. Improve conpty rendering of default colors in legacy apps (#6698)

    Essentially what this does is map the default legacy foreground and
    background attributes (typically white on black) to the `IsDefault`
    color type in the `TextColor` class. As a result, we can now initialize
    the buffer for "legacy" shells (like PowerShell and cmd.exe) with
    default colors, instead of white on black. This fixes the startup
    rendering in conpty clients, which expect an initial default background
    color. It also makes these colors update appropriately when the default
    palette values change.
    
    One complication in getting this to work, is that the console permits
    users to change which color indices are designated as defaults, so we
    can't assume they'll always be white on black. This means that the
    legacy-to-`TextAttribute` conversion will need access to those default
    values.
    
    Unfortunately the defaults are stored in the conhost `Settings` class
    (the `_wFillAttribute` field), which isn't easily accessible to all the
    code that needs to construct a `TextAttribute` from a legacy value. The
    `OutputCellIterator` is particularly problematic, because some iterator
    types need to generate a new `TextAttribute` on every iteration.
    
    So after trying a couple of different approaches, I decided that the
    least worst option would be to add a pair of static properties for the
    legacy defaults in the `TextAttribute` class itself, then refresh those
    values from the `Settings` class whenever the defaults changed (this
    only happens on startup, or when the conhost _Properties_ dialog is
    edited).
    
    And once the `TextAttribute` class had access to those defaults, it was
    fairly easy to adapt the constructor to handle the conversion of default
    values to the `IsDefault` color type. I could also then simplify the
    `TextAttribute::GetLegacyAttributes` method which does the reverse
    mapping, and which previously required the default values to be passed
    in as a parameter 
    
    VALIDATION
    
    I had to make one small change to the `TestRoundtripExhaustive` unit
    test which assumed that all legacy attributes would convert to legacy
    color types, which is no longer the case, but otherwise all the existing
    tests passed as is. I added a new unit test verifying that the default
    legacy attributes correctly mapped to default color types, and the
    default color types were mapped back to the correct legacy attributes.
    
    I've manually confirmed that this fixed the issue raised in #5952,
    namely that the conhost screen is cleared with the correct default
    colors, and also that it is correctly refreshed when changing the
    palette from the properties dialog. And I've combined this PR with
    #6506, and confirmed that the PowerShell and the cmd shell renderings in
    Windows Terminal are at least improved, if not always perfect.
    
    This is a prerequisite for PR #6506
    Closes #5952
    j4james authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    f0df154 View commit details
    Browse the repository at this point in the history
  3. Improve the propagation of color attributes over ConPTY (#6506)

    This PR reimplements the VT rendering engines to do a better job of
    preserving the original color types when propagating attributes over
    ConPTY. For the 16-color renderers it provides better support for
    default colors and improves the efficiency of the color narrowing
    conversions. It also fixes problems with the ordering of character
    renditions that could result in attributes being dropped.
    
    Originally the base renderer would calculate the RGB color values and
    legacy/extended attributes up front, passing that data on to the active
    engine's `UpdateDrawingBrushes` method. With this new implementation,
    the renderer now just passes through the original `TextAttribute` along
    with an `IRenderData` interface, and leaves it to the engines to extract
    the information they need.
    
    The GDI and DirectX engines now have to lookup the RGB colors themselves
    (via simple `IRenderData` calls), but have no need for the other
    attributes. The VT engines extract the information that they need from
    the `TextAttribute`, instead of having to reverse engineer it from
    `COLORREF`s.
    
    The process for the 256-color Xterm engine starts with a check for
    default colors. If both foreground and background are default, it
    outputs a SGR 0 reset, and clears the `_lastTextAttribute` completely to
    make sure any reset state is reapplied. With that out the way, the
    foreground and background are updated (if changed) in one of 4 ways.
    They can either be a default value (SGR 39 and 49), a 16-color index
    (using ANSI or AIX sequences), a 256-color index, or a 24-bit RGB value
    (both using SGR 38 and 48 sequences).
    
    Then once the colors are accounted for, there is a separate step that
    handles the character rendition attributes (bold, italics, underline,
    etc.) This step must come _after_ the color sequences, in case a SGR
    reset is required, which would otherwise have cleared any character
    rendition attributes if it came last (which is what happened in the
    original implementation).
    
    The process for the 16-color engines is a little different. The target
    client in this case (Windows telnet) is incapable of setting default
    colors individually, so we need to output an SGR 0 reset if _either_
    color has changed to default. With that out the way, we use the
    `TextColor::GetLegacyIndex` method to obtain an approximate 16-color
    index for each color, and apply the bold attribute by brightening the
    foreground index (setting bit 8) if the color type permits that.
    
    However, since Windows telnet only supports the 8 basic ANSI colors, the
    best we can do for bright colors is to output an SGR 1 attribute to get
    a bright foreground. There is nothing we can do about a bright
    background, so after that we just have to drop the high bit from the
    colors. If the resulting index values have changed from what they were
    before, we then output ANSI 8-color SGR sequences to update them.
    
    As with the 256-color engine, there is also a final step to handle the
    character rendition attributes. But in this case, the only supported
    attributes are underline and reversed video.
    
    Since the VT engines no longer depend on the active color table and
    default color values, there was quite a lot of code that could now be
    removed. This included the `IDefaultColorProvider` interface and
    implementations, the `Find(Nearest)TableIndex` functions, and also the
    associated HLS conversion and difference calculations.
    
    VALIDATION
    
    Other than simple API parameter changes, the majority of updates
    required in the unit tests were to correct assumptions about the way the
    colors should be rendered, which were the source of the narrowing bugs
    this PR was trying to fix. Like passing white on black to the
    `UpdateDrawingBrushes` API, and expecting it to output the default `SGR
    0` sequence, or passing an RGB color and expecting an indexed SGR
    sequence.
    
    In addition to that, I've added some VT renderer tests to make sure the
    rendition attributes (bold, underline, etc) are correctly retained when
    a default color update causes an `SGR 0` sequence to be generated (the
    source of bug #3076). And I've extended the VT renderer color tests
    (both 256-color and 16-color) to make sure we're covering all of the
    different color types (default, RGB, and both forms of indexed colors).
    
    I've also tried to manually verify that all of the test cases in the
    linked bug reports (and their associated duplicates) are now fixed when
    this PR is applied.
    
    Closes #2661
    Closes #3076
    Closes #3717
    Closes #5384
    Closes #5864
    
    This is only a partial fix for #293, but I suspect the remaining cases
    are unfixable.
    j4james authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    ddbe370 View commit details
    Browse the repository at this point in the history
  4. Refactor TerminalDispatch (graphics) to match AdaptDispatch (#6728)

    This is essentially a rewrite of the
    `TerminalDispatch::SetGraphicsRendition` method, bringing it into closer
    alignment with the `AdaptDispatch` implementation, simplifying the
    `ITerminalApi` interface, and making the code easier to extend. It adds
    support for a number of attributes which weren't previously implemented.
    
    REFERENCES
    
    * This is a mirror of the `AdaptDispatch` refactoring in PR #5758.
    * The closer alignment with `AdaptDispatch` is a small step towards
      solving issue #3849.
    * The newly supported attributes should help a little with issues #5461
      (italics) and #6205 (strike-through).
    
    DETAILS
    
    I've literally copied and pasted the `SetGraphicsRendition`
    implementation from `AdaptDispatch` into `TerminalDispatch`, with only
    few minor changes:
    
    * The `SetTextAttribute` and `GetTextAttribute` calls are slightly
      different in the `TerminalDispatch` version, since they don't return a
      pointless `success` value, and in the case of the getter, the
      `TextAttribute` is returned directly instead of by reference.
      Ultimately I'd like to move the `AdaptDispatch` code towards that way
      of doing things too, but I'd like to deal with that later as part of a
      wider refactoring of the `ConGetSet` interface.
    * The `SetIndexedForeground256` and `SetIndexedBackground256` calls
      required the color indices to be remapped in the `AdaptDispatch`
      implementation, because the conhost color table is in a different
      order to the XTerm standard. `TerminalDispatch` doesn't have that
      problem, so doesn't require the mapping.
    * The index color constants used in the 16-color `SetIndexedForeground`
      and `SetIndexedBackground` calls are also slightly different for the
      same reason.
    
    VALIDATION
    
    I cherry-picked this code on top of the #6506 and #6698 PRs, since
    that's only way to really get the different color formats passed-through
    to the terminal. I then ran a bunch of manual tests with various color
    coverage scripts that I have, and confirmed that all the different color
    formats were being rendered as expected.
    
    Closes #6725
    j4james authored Jul 1, 2020
    Configuration menu
    Copy the full SHA
    6b43ace View commit details
    Browse the repository at this point in the history
  5. 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
  6. 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
  7. 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
  8. 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 <jtippet@microsoft.com>
    Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
    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 <jtippet@microsoft.com>
    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 <zadjii@gmail.com>
    
    ## 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. Add startOnUserLogin & fullscreen launchMode to schema (#7300)

    Fixes #7294
    
    Co-authored-by: Mike Griese <migrie@microsoft.com>
    jcabot21 and zadjii-msft authored Aug 18, 2020
    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 <duhowett@microsoft.com>
    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