Commit graph

2675 commits

Author SHA1 Message Date
Michael Niksa 5984fb92d6
Update common.build.post.props 2021-11-24 20:46:47 -08:00
Michael Niksa 904c529980
Update common.build.pre.props 2021-11-24 20:46:12 -08:00
Michael Niksa 548d3e9bc8
Delete common.pgo.runtime.props 2021-11-24 20:44:09 -08:00
Michael Niksa 24a70629e7
Delete common.pgo.compile.props 2021-11-24 20:43:55 -08:00
Michael Niksa f721a5bd57
Update Terminal.PGO.DB.nuspec 2021-11-24 15:21:23 -08:00
Michael Niksa 42305ab6d6
Update pgo-build-and-publish-nuget-job.yml 2021-11-24 13:24:23 -08:00
Michael Niksa 16de6f803b
Update Terminal.PGO.props 2021-11-24 10:56:50 -08:00
Michael Niksa 1746acdea5 Adjust PgoManager format to better match a default pgosweep format 2021-11-23 16:35:51 -08:00
Michael Niksa 8c1baa8aeb try more stuff 2021-11-23 14:53:41 -08:00
Michael Niksa 4bc9756113 uhhh targets 2021-11-23 13:45:15 -08:00
Michael Niksa 8fbe0f6f02 backoff spellbot 2021-11-15 16:33:41 -08:00
Michael Niksa 2dc31ad235 a bit of path rearrangement 2021-11-15 16:29:52 -08:00
Michael Niksa 392ad1c823 another restore line... 2021-11-15 15:31:34 -08:00
Michael Niksa c4f28583ec works better when you restore the package you want to use... 2021-11-15 14:03:19 -08:00
Michael Niksa e1e12e2b16 use the right path, foo 2021-11-15 11:04:51 -08:00
Michael Niksa e5ca94c78d pull nuget onto this machine too 2021-11-12 15:54:27 -08:00
Michael Niksa e0ee7f1b33 target fiddly bits 2021-11-12 14:36:34 -08:00
Michael Niksa 538c5118d0 do this in the other order. 2021-11-12 12:58:32 -08:00
Michael Niksa 92542ab9e8 try more things 2021-11-12 12:31:30 -08:00
Michael Niksa b6a91691e9 Remove double import and fix version path 2021-11-12 11:29:30 -08:00
Michael Niksa 2b80fab4a5 I messed up both of these paths apparently. 2021-11-10 13:44:44 -08:00
Michael Niksa 1645f7f33d attempt to use PGO nuget 2021-11-10 13:13:37 -08:00
Dustin Howett 7db7ba1ac9 ci: fix spelling for inbox merge 2021-11-09 17:22:55 -06:00
Dustin Howett 89c2b6d580 Merge remote-tracking branch 'openconsole/inbox' 2021-11-09 17:16:59 -06:00
Dustin Howett 92643c1d34 Merged PR 6654362: [Git2Git] OS build fixes for f9b97c488
Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_wdx_dxp_windev 063b86ac10af16cade5c0754adcbf27e7e9ae266

Related work items: MSFT-34534216, MSFT-36986009, MSFT-36986203
2021-11-09 23:16:26 +00:00
Dustin Howett e591d29000 Migrate OSS up to f9b97c488 2021-11-09 13:39:28 -06:00
Dustin Howett 88d58d313a Migrate OSS up to 3f1befb06 (Touch Keyboard Invocation) 2021-11-09 13:39:23 -06:00
Dustin Howett 87182554c8 Migrate OSS up to e5180fe88 2021-11-09 13:39:09 -06:00
Dustin Howett 5ff412fe6e Migrate OSS up to 5deb33260 (A11y Degenerate Word Movement) 2021-11-09 13:33:49 -06:00
Dustin Howett 30f7f2082b Migrate OSS up to 168d28b03 2021-11-09 13:33:29 -06:00
Dustin Howett e6b871da47 Migrate OSS up to d08afc4e8 (A11y End Of Buffer) 2021-11-09 13:32:34 -06:00
Dustin Howett f9c0f86705 Migrate OSS up to 4793541c 2021-11-09 13:32:14 -06:00
Dustin Howett 86da0e041f Migrate OSS up to c53fe1c2b (A11y End Of Buffer) 2021-11-09 13:26:44 -06:00
Dustin Howett a89b66f770 Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest)
A change required significant changes in TAEF published headers. This PR consumes those changes.

Related work items: #20301352
2021-11-09 19:21:35 +00:00
Ikko Ashimine f9b97c4880
doc: Fix typo in #885 - Terminal Settings Model.md (#11657)
Fixed typo: ocurred -> occurred

* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
2021-11-08 12:18:50 -08:00
Mike Griese a74c37bbcd
Don't crash if we fail to BeginBufferedPaint (#11674)
Fixes MSFT:34673647, at least I'm pretty sure. That's only ever hit a few
times externally, and internally it's hitting a lot on 1.9.1942 builds, which
doesn't really make any sense.
2021-11-05 19:26:59 +00:00
Sergey 55dbda02a5
fix build error at 74d21af (#11691)
#11404 and #11653 both added WM_SYSCOMMAND which prevents build. This fixes it.
2021-11-05 19:26:03 +00:00
Sergey 7aae2e9100
Fix missing window border when use "win+arrow down" in fullscreen mode in Terminal (#11653)
Window sends an event that requests exit from fullscreen then SC_RESTORE messages is sent and it is in fullscreen mode.
Closes #10607

## Validation Steps Performed
Border and tabbar now appear after exiting fullscreen via "win+arrow down".
2021-11-04 23:46:57 +00:00
Kai 74d21afacf
README.md: HTTP => HTTPS (#11671)
<!-- 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
Checked the link, skipping the redirect HTTP => HTTPS this way 0:-)

This one
http://azuredevopspodcast.clear-measure.com/kayla-cinnamon-and-rich-turner-on-devops-on-the-windows-terminal-team-episode-54
is still only available via HTTP, sadly.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References
<http://www.runasradio.com/Shows/Show/645> is being redirected to <https://www.runasradio.com/Shows/Show/645>

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* N/A Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* N/A Tests added/passed
* N/A Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* N/A 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~~

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Opened the link.
2021-11-04 22:45:19 +00:00
PankajBhojwani 52b4bb760f
Unify splitting panes and creating new tabs (#11305)
Implements `_MakePane` in `TerminalPage`, which creates a pane that then can be used to pass into another pane to split or to create a new tab with. Places where we split pane or create a new tab now use `_MakePane`. 

## PR Checklist
* [x] Closes #11021
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [x] I work here

## Validation Steps Performed
Stands up to manual testing with multiple new pane/new tab commands as well as startup actions
2021-11-04 22:29:58 +00:00
James Holderness b604117421
Standardize the color table order (#11602)
## Summary of the Pull Request

In the original implementation, we used two different orderings for the color tables. The WT color table used ANSI order, while the conhost color table used a Windows-specific order. This PR standardizes on the ANSI color order everywhere, so the usage of indexed colors is consistent across both parts of the code base, which will hopefully allow more of the code to be shared one day.

## References

This is another small step towards de-duplicating `AdaptDispatch` and `TerminalDispatch` for issue #3849, and is essentially a followup to the SGR dispatch refactoring in PR #6728.

## PR Checklist
* [x] Closes #11461
* [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: #11461

## Detailed Description of the Pull Request / Additional comments

Conhost still needs to deal with legacy attributes using Windows color order, so those values now need to be transposed to ANSI colors order when creating a `TextAttribute` object. This is done with a simple mapping table, which also handles the translation of the default color entries, so it's actually slightly faster than the original code.

And when converting `TextAttribute` values back to legacy console attributes, we were already using a mapping table to handle the narrowing of 256-color values down to 16 colors, so we just needed to adjust that table to account for the translation from ANSI to Windows, and then could make use of the same table for both 256-color and 16-color values.

There are also a few places in conhost that read from or write to the color tables, and those now need to transpose the index values. I've addressed this by creating separate `SetLegacyColorTableEntry` and `GetLegacyColorTableEntry` methods in the `Settings` class which take care of the mapping, so it's now clearer in which cases the code is dealing with legacy values, and which are ANSI values.

These methods are used in the `SetConsoleScreenBufferInfoEx` and `GetConsoleScreenBufferInfoEx` APIs, as well as a few place where color preferences are handled (the registry, shortcut links, and the properties dialog), none of which are particularly sensitive to performance. However, we also use the legacy table when looking up the default colors for rendering (which happens a lot), so I've refactored that code so the default color calculations now only occur once per frame.

The plus side of all of this is that the VT code doesn't need to do the index translation anymore, so we can finally get rid of all the calls to `XTermToWindowsIndex`, and we no longer need a separate color table initialization method for conhost, so I was able to merge a number of color initialization methods into one. We also no longer need to translate from legacy values to ANSI when generating VT sequences for conpty.

The one exception to that is the 16-color VT renderer, which uses the `TextColor::GetLegacyIndex` method to approximate 16-color equivalents for RGB and 256-color values. Since that method returns a legacy index, it still needs to be translated to ANSI before it can be used in a VT sequence. But this should be no worse than it was before.

One more special case is conhost's secret _Color Selection_ feature. That uses `Ctrl`+Number and `Alt`+Number key sequences to highlight parts of the buffer, and the mapping from number to color is based on the Windows color order. So that mapping now needs to be transposed, but that's also not performance sensitive.

The only thing that I haven't bothered to update is the trace logging code in the `Telemetry` class, which logs the first 16 entries in the color table. Those entries are now going to be in a different order, but I didn't think that would be of great concern to anyone.

## Validation Steps Performed

A lot of unit tests needed to be updated to use ANSI color constants when setting indexed colors, where before they might have been expecting values in Windows order. But this replaced a wild mix of different constants, sometimes having to use bit shifting, as well as values mapped with `XTermToWindowsIndex`, so I think the tests are a whole lot clearer now. Only a few cases have been left with literal numbers where that seemed more appropriate.

In addition to getting the unit tests working, I've also manually tested the behaviour of all the console APIs which I thought could be affected by these changes, and confirmed that they produced the same results in the new code as they did in the original implementation.

This includes:
- `WriteConsoleOutput`
- `ReadConsoleOutput`
- `SetConsoleTextAttribute` with `WriteConsoleOutputCharacter`
- `FillConsoleOutputAttribute` and `FillConsoleOutputCharacter` 
- `ScrollConsoleScreenBuffer`
- `GetConsoleScreenBufferInfo`
- `GetConsoleScreenBufferInfoEx`
- `SetConsoleScreenBufferInfoEx`

I've also manually tested changing colors via the console properties menu, the registry, and shortcut links, including setting default colors and popup colors. And I've tested that the "Quirks Mode" is still working as expected in PowerShell.

In terms of performance, I wrote a little test app that filled a 80x9999 buffer with random color combinations using `WriteConsoleOutput`, which I figured was likely to be the most performance sensitive call, and I think it now actually performs slightly better than the original implementation.

I've also tested similar code - just filling the visible window - with SGR VT sequences of various types, and the performance seems about the same as it was before.
2021-11-04 22:13:22 +00:00
PankajBhojwani 761203d95e
Remove unused rendering settings from profile (#11685)
The `ForceFullRepaintRendering` and `SoftwareRendering` are global only and for some reason were in profile. This commit removes them.

Reference: https://github.com/microsoft/terminal/pull/11416#discussion_r742030103
2021-11-04 14:50:59 -05:00
PankajBhojwani 4241d1c19e
Update _OpenSettingsUI to OpenSettingsUI (#11686)
#11404 changed `_OpenSettingsUI` to `OpenSettingsUI` in `TerminalPage`, but there is still one leftover reference to `_OpenSettingsUI`. This commit fixes that.
2021-11-04 14:49:22 -05:00
Sergey ab6ba9bdbb
Add settings entry into titlebar context menu (#11404)
<!-- 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
Adds ability for app to change system context menu

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #9666 
* [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

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2021-11-04 16:47:58 +00:00
Mike Griese 8826cc028b
Make sure to format the error message with an UNSIGNED int (#11667)
Closes #11556
![image](https://user-images.githubusercontent.com/18356694/139715591-b18ef7c1-2967-42a5-9528-2522220aa177.png)
2021-11-03 22:27:41 +00:00
Mike Griese d3ca0e7878
Add trimPaste to the schema, too (#11644)
Closes #11642

  See also https://github.com/MicrosoftDocs/terminal/pull/435
2021-11-03 10:55:16 -05:00
PankajBhojwani 726b428184
Use X-macros to simplify new setting creation in SettingsModel (#11416)
Introduces X-macros to reduce the number of places we need to write essentially the same line of code but for a different setting (declaring it in the header file, in `Copy`, `LayerJson`, `ToJson`, etc).
2021-11-03 15:01:20 +00:00
James Holderness 27e042b784
Default all G-sets to ASCII unless ISO-2022 is requested (#11658)
## Summary of the Pull Request

There is a non-zero subset of applications that randomly output _Locking Shift_ escape sequences which will invoke a character set from G2 or G3 into the left half of the code table. If those G-sets are mapped to Latin1, that can result in the terminal producing output that appears to be broken. This PR now defaults all G-sets to ASCII, to prevent an unintentional _Locking Shift_ from having any effect.

## PR Checklist
* [x] Closes #10408
* [x] CLA signed.
* [ ] Tests added/passed
* [ ] Documentation updated.
* [ ] Schema updated.
* [x] I've discussed this with core contributors already. Issue number where discussion took place: #10408

## Detailed Description of the Pull Request / Additional comments

Most other modern terminals also default to ASCII in all G-sets, so this shouldn't break any modern applications. Legacy 8-bit applications may still expect the G2 and G3 sets mapped to Latin1, but they would also need to have the ISO-2022 encoding enabled, so we can keep them happy by setting G2 and G3 correctly when the ISO-2022 encoding is requested.

## Validation Steps Performed

I've manually confirmed that `echo -e "\en"` and `echo -e "\eo"` no longer have any visible effect on the output (at least without first invoking another character set into G2 or G3). I've also confirmed that they do still work as expected (i.e. selecting Latin1) after enabling the ISO-2022 encoding.
2021-11-03 00:48:05 +00:00
Mike Griese 3667678df1
Fix the cmdpal moving the infobar down (#11670)
Just read the code, it's immediately obvious what I messed up

Closes #11645


@DHowett turns out I was wrong, I could get this one done before 5 😜
2021-11-02 13:45:57 +00:00
PankajBhojwani a7ce93a357
Check that the control exists before we try to focus it (#11635)
## Summary of the Pull Request
When we are on a settings UI tab, `_GetActiveControl` returns a `nullptr`, make sure not to try and focus it in that case

## PR Checklist
* [x] Closes #11633 
* [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 work here

## Validation Steps Performed
No longer crashes
2021-10-29 14:09:41 +00:00