Commit graph

2270 commits

Author SHA1 Message Date
Dustin L. Howett bfc943aebf Migrate spelling-0.0.19 changes from main 2021-04-27 09:48:59 -05:00
Mike Griese 30a3621ec6 Well this certainly wasn't it 2021-04-27 09:48:59 -05:00
Mike Griese f3c7d9c471 This obviously works but is somehow just as dumb as a Sleep(1) 2021-04-27 09:23:18 -05:00
Mike Griese 530903219e This is now working less well 2021-04-27 09:12:22 -05:00
Mike Griese c78c7aefa2 This is a load bearing call to Sleep(1), which makes me unreasonably unhappy 2021-04-27 08:22:03 -05:00
Mike Griese 5936bd13b3 This works better than dev/migrie/f/quake-toCurrent-experiments 2021-04-27 06:15:07 -05:00
Mike Griese c95a4297cf Give Clint the credit they deserce 2021-04-26 09:21:40 -05:00
Mike Griese 045a8db5e1 fix a build break 2021-04-23 12:26:26 -05:00
Mike Griese 91372ea1f9 more tests, because I like being thorough 2021-04-23 11:14:39 -05:00
Mike Griese 26d5194b0c this test is _fantastic_ 2021-04-23 09:01:51 -05:00
Mike Griese c215a97d09 Merge branch 'dev/migrie/f/653-QUAKE-MODE' into dev/migrie/f/quake-toCurrent-desktop 2021-04-23 06:33:46 -05:00
Mike Griese 4eb1d3a8d6 Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAKE-MODE 2021-04-23 06:02:23 -05:00
Mike Griese aa54de1d64
Add a success dialog to window renaming (#9808)
I added a `RenameSucceededText` property to the `TerminalPage` which returns the
formatted message `Successfully renamed window to "{WindowNameForDisplay()}"`

This _doesn't_ pop the dialog when you `wt -w foo` for the first time. Only
_subsequent_ renames.

## References
* Added in #9662
* Closes #9804
2021-04-22 21:15:58 +00:00
Leonard Hecker cf8ac0eb07
Add myself to the readme's team list (#9916) 2021-04-22 03:43:19 +00:00
Mike Griese 8c6e13d90e
Spec for Quake Mode (#9274)
### ⇒ [doc link](https://github.com/microsoft/terminal/blob/dev/migrie/s/653-quake-mode/doc/specs/%23653%20-%20Quake%20Mode/%23653%20-%20Quake%20Mode.md) ⇐

## Summary of the Pull Request

After reading through 114+ comments in #653 and related issues, I think I've finally wrapped my head around all the possible scenarios for quake mode. <!-- Speak now or forever hold your peace. --> This also includes "minimize to tray", because the two are a powerful combination. With the work already prototyped in [`dev/migrie/f/653-QUAKE-MODE`](https://github.com/microsoft/terminal/tree/dev/migrie/f/653-QUAKE-MODE), [I'm starting to believe](https://j.gifs.com/58vKNx.gif) that we could actually land this in 2.0.


### Abstract

> Many existing terminals support a feature whereby a user can press a keybinding
> anywhere in the OS, and summon their terminal application. Oftentimes the act of
> summoning this window is accompanied by a "dropdown" animation, where the window
> slides in to view from the top of the screen. This global summon action is often
> referred to as "quake mode", a reference to the videogame Quake who's console
> slid in from the top.
> 
> This spec addresses both of the following two issues:
> * "Quake Mode" ([#653])
> * "Minimize to tray" ([#5727])


## PR Checklist
* [x] Specs: #653, #5727
* [x] References: #5000, #4472, #2227, #7240, #8135
* [x] I work here

## Detailed Description of the Pull Request / Additional comments
_\*<sup>\*</sup><sub>\*</sub> read the spec  <sub>\*</sub><sup>\*</sup>\*_
2021-04-21 21:43:42 +00:00
Mike Griese 913cf4b1a8
Initialize the text buffer with the default attributes on a resize (#5792)
When we resize the text buffer, initialize the buffer with the
_default_¹ attributes, not the _current_ ones. If we use the current
attributes, then we can get into scenarios where something like `vim` is
running, and left the attributes set to something other than the
defaults, and when we resized the buffer, we'd fill it up with color, as
opposed to whatever the default would be.

This PR instead initializes the buffers with the default colors. It also
makes sure to set the active attributes of the newly created buffers
back to whatever the current attributes of the old buffer were.

[1]: For the Terminal, the default attributes are "default on default".
For conhost, the default attributes are whatever the result of
`Settings::GetDefaultAttributes` is, which could be any combo of the
legacy indices and the default color.

## PR Checklist
* [x] Closes #3848
* [x] I work here
* [x] Tests added/passed
* [n/a] Requires documentation to be updated

## Validation Steps Performed
* ran tests
2021-04-21 21:34:28 +00:00
Mike Griese 546322b5c1
Enable previewing the color scheme in the command palette (#9794)
## Summary of the Pull Request

Allow schemes to be previewed as the user hovers over them in the Command Palette.

![preview-set-color-scheme](https://user-images.githubusercontent.com/18356694/114557761-9a3cbd80-9c2f-11eb-987f-eb0c89ee1fa6.gif)

## References
* Branched off of #8392, which is why the commit history is so polluted. 330a8e8 : 544b2fd has the interesting commits
* #5400: cmdpal megathread

### Potential follow-ups
* changing the font size
* changing the font face
* changing the opacity of acrylic

## PR Checklist
* [x] Closes #6689, a last straggling FHL PR
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated - I don't think so

## Detailed Description of the Pull Request / Additional comments

This works by inserting a "preview" `TerminalSettings` into the settings hierarchy, before the `TermControl`'s runtime settings, and after the ones from the actual `CascadiaSettings`. This allows us to modify that preview settings object, then discard it when we're done with the preview.

This could also be used for other settings in the future - I built it to be extensible to other `ShortcutAction`s, though I haven't implemented those yet.

## Validation Steps Performed

* Select a colorscheme - it becomes the active one
* `colortool -x <scheme>` after selecting a scheme - colortool overrides the selected scheme
* Select a colorscheme after a `colortool -x <scheme>` after selecting a scheme - the scheme in the palette becomes the active one
* Pressing <kbd>esc</kbd> at any point to dismiss the command palette - scheme returns to the previous one
* reloading the settings - returns to the scheme in the settings
2021-04-21 20:35:06 +00:00
Mike Griese 8370789462 replace todo with comment 2021-04-21 12:02:56 -05:00
Mike Griese 15a8a9cec0 !! THIS NEEDS TO GO TO THE PARENT BRANCH !!
(cherry picked from commit 9f9eacb5d9)
2021-04-21 12:01:46 -05:00
hms5232 d7e176998c
Add URL link to docs text in README.md (#9911)
Add link to "aka.ms/terminal-docs" text in README, thus making more easier to arrive the docs.
2021-04-21 15:53:44 +00:00
Kayra Kaygın dfb48f45c2
doc, tools: Improve docs around using clang-format with VS (#9782)
* Improved the clarity of the extra step involving
generation of a clang-format.exe when using VisualStudio

* Added Get-Format function to OpenConsole.psm1 and
updated the documentation accordingly.

Closes #9777.
2021-04-21 10:51:58 -05:00
Don-Vito 6b4f70e985
Fix tab and hyperlink tooltips to wrap long text (#9913)
## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/issues/9869
* [x] CLA signed. 
* [ ] Tests added/passed
* [ ] Documentation updated. 
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already.
2021-04-21 15:40:17 +00:00
Mike Griese 2eec961a87 All of carlos's feedback 2021-04-21 08:42:15 -05:00
Don-Vito ad625a041d
[Quick and Dirty] Copy runtime tab title when duplicating tabs (#9813)
## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/issues/9723
* [x] CLA signed. 
* [ ] Tests added/passed
* [ ] Documentation updated.
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already.

## Detailed Description of the Pull Request / Additional comments
Quick and dirty. 
A better solution is to allow passing all "runtime settings" upon tab creation.
2021-04-21 10:54:18 +00:00
PankajBhojwani ad34291632
Fix for configuring starting directory in SUI when defaults sets it to null (#9862)
## Summary of the Pull Request
Remove an unnecessary check in `Profiles.cpp` that was preventing us from enabling the text box and browse button when the user unchecks 'use parent process directory'

## PR Checklist
* [x] Closes #9847 
* [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
Played around with it and it works.
2021-04-21 10:53:41 +00:00
MPela 2065fa7b76
Add Close menu items to the context menu flyout (#9859)
## Summary of the Pull Request
Add the "Close other tabs"/"Close tabs to the right" menu items straight to the tab context menu to work around #8238.
We can't add them into a dedicated sub-menu until the upstream crash is fixed.

## References
#8238 

## PR Checklist
* [X] Closes #8238
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. 

## Detailed Description of the Pull Request / Additional comments
Moved the creation of the close menu items to a single function. Once the originating crash is fixed, the sub-menu can be restored by just replacing a few lines of code.

## Validation Steps Performed
![immagine](https://user-images.githubusercontent.com/1140981/115059601-0dbc2480-9ee7-11eb-9889-d9ef8e6e7613.png)
2021-04-21 10:53:19 +00:00
Mike Griese 51617cf6db cache these results 2021-04-20 15:10:04 -05:00
Dustin L. Howett 21b2e01643
Work around a compiler bug w/ coroutines and exceptions (#9893)
There is a bug in the compiler that we trip over when we handle the
exception generated by Package::Current inside a coroutine. It appears
to destruct an invalid instance of winrt::factory_guard_count.

Learned from the compiler folks: "coroutine frame pointer wasn't being
stored ... properly".

Fixes #9821
2021-04-19 20:27:30 +00:00
Mike Griese f71c948554 Add support for summoning to the current virtual desktop
Tested with

  ```json
        { "keys": "ctrl+`", "command": { "action": "quakeMode" } },
        { "keys": "ctrl+1", "command": { "action": "globalSummon" } },
        { "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "toCurrent" } },
        { "keys": "ctrl+3", "command": { "action": "globalSummon", "desktop": "onCurrent" } },
        { "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any" } },
  ```

  And holy god it works so well
2021-04-19 14:44:26 -05:00
Mike Griese 9f9eacb5d9 !! THIS NEEDS TO GO TO THE PARENT BRANCH !! 2021-04-19 14:41:48 -05:00
Mike Griese 305e62708a oh man, this will magic summon the window to the current desktop. I'm shocked that it works, thanks powertoys 2021-04-19 12:05:43 -05:00
jBarrineau 7e2a0e193a
Del 'Community Guidance Req' from CONTRIBUTING.md (#9873)
<!-- 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

CONTRIBUTING.md currently has documentation suggesting to file a 'Community Guidance Request' if a user doesn't know how to do something.  This issue was identified by @hessedoneen in #9765 .  Per @zadjii-msft  this option has never really existed, and should be struck from CONTRIBUTING.md .  This PR does just that.

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

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

Review CONTRIBUTING.md and see that it no longer refers to filing 'Community Guidance Requests'
2021-04-19 16:20:42 +00:00
Mike Griese 1b2e7a7ca1 Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAKE-MODE 2021-04-19 10:11:06 -05:00
Mike Griese 717db8130b Again, nobody's got disk space to build x86. This is a guess 2021-04-19 10:10:54 -05:00
Chester Liu b68ee23bf8
Initial Implementation for tab stops in TerminalDispatch (#9597)
* [x] Supports #1883
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [X] Tests added/passed
2021-04-16 16:26:28 +00:00
Mike Griese 4166afaa98 Okay that was bad pre-emptive spelling 2021-04-16 09:22:40 -05:00
Mike Griese f892752da7 Add some tracelogging to find a heisenbug that might not have ever been there 2021-04-16 09:02:46 -05:00
Mike Griese 71577fcd01 Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAKE-MODE 2021-04-16 06:33:19 -05:00
Don-Vito 05e7ea1423
Delay close tab on middle-click till pointer released (#9842)
## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/issues/9836
* [x] CLA signed. 
* [ ] Tests added/passed
* [ ] Documentation updated.
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. 

Not sure what is the reason for handling right button. 
But delaying it to PointerReleased seems not to regress anything.
2021-04-15 12:45:55 -05:00
Kayla Cinnamon 8bcb47339d
doc: Add tabColor to JSON schema (#9843) 2021-04-15 12:32:18 -05:00
James Holderness 74909c0c65
Prevent the virtual viewport bottom being moved up unintentionally (#9770)
## Summary of the Pull Request

The "virtual bottom" marks the last line of the mutable viewport area, which is the part of the buffer that VT sequences can write to. This region should typically only move downwards, as new lines are added to the buffer, but there were a number of cases where it was incorrectly being moved up. This PR attempts to fix that.

## PR Checklist
* [x] Closes #9754
* [x] CLA signed.
* [x] Tests added/passed
* [ ] Documentation updated.
* [ ] 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: #9754

## Detailed Description of the Pull Request / Additional comments

When a call is made to `UpdateBottom`, we now clamp the value so it's at least as low as the current viewport bottom (i.e. if the viewport has moved down, we want the virtual bottom to move down too), but no lower than the bottom of the buffer (we don't want it to be out of range).

There is one special case where we do actually want the virtual bottom to move up - when the scrollback has been cleared with an `ED3` escape sequence. So in that case we needed a new `ConGetSet` API (`ResetBottom`) to reset the virtual bottom to the top of the buffer (essentially one less than the viewport height, since the virtual bottom points to the last line of the viewport).

## Validation Steps Performed

I had to reset the virtual bottom manually in some parts of the `ScreenBufferTests`, since some of the tests were relying on the virtual bottom being automatically reset when the viewport was reset, which is no longer the case.

I've also added a new test to verify that the virtual bottom doesn't move upwards if an update is triggered while the visible viewport is scrolled up. This essentially reproduces the test case from issue #9754, which I've also manually confirmed is fixed.
2021-04-15 17:07:59 +00:00
Michael Niksa dba66da18d
Add -ForceNoHandoff for compatibility; stop handoff for double-click launches (#9802)
Add flag that will ensure we do not handoff to a registered default console. Also for a bonus, allow double-click launches or explicit command line launches of conhost.exe with a binary argument to open with the inbox one.

## PR Checklist
* [x] Closes #9791 
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* [x] Automated tests for parsing
* [x] Enable defapp, double click conhost.exe, opens as itself
* [x] Enable defapp, run conhost.exe runbox, opens as itself
* [x] Enable defapp, run conhost.exe powershell.exe runbox, opens as itself
* [x] Runbox cmd.exe/pwsh.exe trigger defapp handoff to Terminal
* [x] Shortcut to cmd.exe/pwsh.exe trigger defapp handoff to Terminal
* [x] Use CHOP tool to launch conhost with a server handle triggers handoff to Terminal
* [x] Use CHOP tool to launch conhost with a server handle and -ForceNoHandoff opens as itself
2021-04-15 16:54:04 +00:00
Mike Griese eddb99e9b2
Add support for the win key in keybindings (#9783)
## Summary of the Pull Request

Does what it says on the can. People can now use `win` in a keybinding to
indicate that the chord needs <kbd>win</kbd>.

## References
* Done for #653
* See also #8888

## PR Checklist
* [x] Closes #3184
* [x] I work here
* [ ] Tests added/passed
* [ ] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

For the record, I hate this. But it's great for quake mode, so _meh_. There's
shockingly more win keys claimed then you think - many more than the shortcut
guide even shows.

* `win+b`: Focus the tray?
* `win+t`: Focus the taskbar
* `win+p`: Project...
* `win+c`: The powertoys color picker
* `win+v`: cloud clipboard

So the list of valid combos is vanishingly small. It's all about that <kbd>win+~</kbd>

## Validation Steps Performed

Bound
```json
        { "keys": [ "win+`" ], "command": "commandPalette" },
```

and yea, it works as expected
2021-04-15 16:52:28 +00:00
Mahdi Hosseini 3113d2e535
Update terminal-v2-roadmap.md (#9835)
Co-authored-by: Mike Griese <migrie@microsoft.com>
2021-04-15 09:40:34 -07:00
Mike Griese 2a2f5cb9a5 pre emptive spellbot 2021-04-14 16:37:24 -05:00
Mike Griese 9d76c62dae Some dead code cleanup 2021-04-14 16:21:17 -05:00
Mike Griese b20222f2c0 More comments 2021-04-14 16:16:12 -05:00
Mike Griese 784ec731f8 Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAKE-MODE 2021-04-14 16:03:21 -05:00
Mike Griese 1fdb6b1a3c Tests and doc comments 2021-04-14 16:02:12 -05:00
Don-Vito cdbcc17458
Fix rename window handler to mark action as handled (#9809)
## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/issues/9803
* [x] CLA signed. 
* [ ] Tests added/passed
* [ ] Documentation updated. 
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already.
2021-04-14 20:50:38 +00:00