* added another method to scroll with keyboard
* set lastscrolloffset to 0
* fixed unused variable
* renamed ViewPort to Viewport
* changed keyBoard to keyboard in the functions, and added expliantion for function
* set identifying environment variable for new connections
Set a new 'WT_SESSION' environment variable when creating new terminal
connections to allow shells to detect a unique Windows Terminal session.
The value of the variable is a stringified GUID as returned by
CoCreateGuid.
How verified:
- "razzle" & vs debug build
- runut
- manual inspection
* * use winrt::guid type for connection guid
* use Utils::GuidToString for guid stringification
* expose guid parameter in ITerminalConnection idl
* - poke guid through ITerminalConnection
- misc. review fixes
- throw if CreateConPty fails in ConhostConnection::Start
- apply [[nodiscard]] and noexcept in various places
* - simplify environment variable extraction in UpdateEnvironmentMapW
* - use Utils::CreateGuid instead of CoCreateGuid in ConHostConnection()
This commit introduces a handful of default icons whose paths will be
emitted into the default profiles.
Icons are named after the profile GUIDs, which for the default profiles
are stable v5 UUIDs based on the name of the profile. The plan is that
we'll never have a duplicate default profile, and if the user wants to
duplicate it they'll need to issue it a new GUID.
Eventually, when icons can be inserted through the settings UI, we can
keep the GUID name (to unique them among all icons for all profiles) and
move them into ms-appdata:///roaming/.
The currently included icons are named for the following profiles:
"cmd" `{0caa0dad-35be-5f56-a8ff-afceeeaa6101}`
"PowerShell Core" `{574e775e-4f2a-5b96-ac1e-a2962a402336}`
"Windows PowerShell" `{61c54bbd-c2c6-5271-96e7-009a87ff44bf}`
"WSL" `{9acb9455-ca41-5af7-950f-6bca1bc9722f}`
The PowerShell profile names aren't being used yet, but this is in
preparation for #918 merging.
Fixes#933.
* Adding vsconfig file for VS2019 help to prompt for missing components requried.
* Adding a keybinding for launching the settings. Suggested fix for #683
* Modified to comma per PR feedback
* Implements 791 for profile and settings shortcuts (most frequent and have shortcuts)
* Quick change for consistency (missed in first checkin due to using ENUM) on using 'Ctrl' instead of 'Control'
* Adding UI shortcut generation to new keybinding mappings. Resolving #791
* Making a few changes on reviewer feedback for shortcut UI.
* Additional reviewer feedback on variable name change (not a member var)
This commit switches the GUIDs for default profiles from being randomly generated to being version 5 UUIDs. More info in #870.
## PR Checklist
* [x] Closes#870
* [x] CLA signed
* [x] Tests added/passed
* [x] Requires documentation to be updated (#883)
* [x] I've discussed this with core contributors already.
## Detailed Description of the Pull Request / Additional comments
This commit has a number of changes that seem ancillary, but they're general goodness. Let me explain:
* I've added a whole new Types test library with only two tests in
* Since UUIDv5 generation requires SHA1, we needed to take a dependency on bcrypt
* I honestly don't think we should have to link bcrypt in conhost, but LTO should take care of that
* I considered adding a new Terminal-specific Utils/Types library, but that seemed like a waste
* The best way to link bcrypt turned out to be in line with a discussion @miniksa and I had, where we decided we both love APISets and think that the console should link against them exclusively... so I've added `onecore_apiset.lib` to the front of the link line, where it will deflect the linker away from most of the other libs automagically.
```
StartGroup: UuidTests::TestV5UuidU8String
Verify: AreEqual(uuidExpected, uuidActual)
EndGroup: UuidTests::TestV5UuidU8String [Passed]
StartGroup: UuidTests::TestV5UuidU16String
Verify: AreEqual(uuidExpected, uuidActual)
EndGroup: UuidTests::TestV5UuidU16String [Passed]
```
* Added focus tracking to TermControl to prevent clicks which refocus the terminal window from selecting text.
* Moved open brace to a new line per repo code style.
* Moved the TermControl's _MouseClickHandler's focus check into the Mouse specific block of code. This lets any touch and drag events scroll the terminal's contents.
Fixes#670.
* fix for historySize=32767 hang (except for historySize=0 case); tests still in progress
* tests run and almost pass - failure is a real bug in my change
* fixed bug that caused tests to fail, but it seems another bug causes the app to crash with a zero row count
* fix the additional bug (at a higher layer) mentioned in previous commit description
* Fix chk build assertion failures in new tests
It seems C++/WinRT doesn't like it when you implement a Windows Runtime
interface but then create instances of the implementing class
with function-call lifetime (aka stack allocation). That makes sense
given that WinRT objects are COM objects, but in my defense I was following
this example where they are just fine instantiating the `App` object
on the stack:
https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/author-apis#if-youre-not-authoring-a-runtime-class
* tabs to spaces
* CR feedback
* fix minor CR feedback (incorrect test log message)
* Amend Color array to typed values
* Re-add the original deserialization code.
* Re-added original deserialization
* Update comment spacing
Co-Authored-By: Michael Niksa <miniksa@microsoft.com>
* Replace tabs with spaces
* Replace array definition and update for loops.
* swapped _table calls to use .at()
* added keybindings
* untabfied the files
* fixed spacing issues and renamed termheight
* changed function names and other improvements
* made some auto variables const auto
* fixed tabs
* another try for the broken spacing
* Add One Half Dark & Light color schemes
* WIP: Add One Half Dark/Lite schemes to settings
* Address PR feedback - use gsl::narrow()
* Fix reversed OneHalfLight fg/bg colors
Added in customized colortool scheme colors for last 8 colors
* Improve `startingDirectory` functionality
This commit adds the `startingDirectory` property to the default-created
`cmd` and `powershell` profiles, with the default value
`%HOMEDRIVE%%HOMEPATH%`.
Signed-off-by: Fred Miller <fghzxm@outlook.com>
* Use %USERPROFILE% to replace %HOMEDRIVE%%HOMEPATH%
This commit changes `%USERPROFILE%` in the default profiles to
`%HOMEDRIVE%%HOMEPATH%`.
https://stackoverflow.com/posts/36392591/revisions says `%USERPROFILE%`
is better than `%HOMEDRIVE%%HOMEPATH%`, so changed it.
Signed-off-by: Fred Miller <fghzxm@outlook.com>
* Improve `startingDirectory` functionality
This commit adds the `startingDirectory` property to the default-created
`cmd` and `powershell` profiles, with the default value
`%HOMEDRIVE%%HOMEPATH%`.
Signed-off-by: Fred Miller <fghzxm@outlook.com>
* Use %USERPROFILE% to replace %HOMEDRIVE%%HOMEPATH%
This commit changes `%USERPROFILE%` in the default profiles to
`%HOMEDRIVE%%HOMEPATH%`.
https://stackoverflow.com/posts/36392591/revisions says `%USERPROFILE%`
is better than `%HOMEDRIVE%%HOMEPATH%`, so changed it.
Signed-off-by: Fred Miller <fghzxm@outlook.com>
* Consolidate constant
Refer to the externally defined constant in code.
Signed-off-by: Fred Miller <fghzxm@outlook.com>
* Make powershell the default profile
Sets powershell as the default profile.
* Apply suggestions from code review
Co-Authored-By: Gabriel <gabriel@potter.fr>
* Update src/cascadia/TerminalApp/CascadiaSettings.cpp
Co-Authored-By: Gabriel <gabriel@potter.fr>
* Change profile order
* Add a dev manifest, which will be used by default
To build a package named Microsoft.WindowsTerminal, you must build with
/p:WindowsTerminalReleaseBuild=true. This is to improve the SxS
developer/user scenario.
* Change dev manifest version to 0.0.1.0.
This encompasses a handful of problems with column counting.
The Terminal project didn't set a fallback column counter. Oops. I've fixed this to use the `DxEngine` as the fallback.
The `DxEngine` didn't implement its fallback method. Oops. I've fixed this to use the `CustomTextLayout` to figure out the advances based on the same font and fallback pattern as the real final layout, just without "rounding" it into cells yet.
- `CustomTextLayout` has been updated to move the advance-correction into a separate phase from glyph shaping. Previously, we corrected the advances to nice round cell counts during shaping, which is fine for drawing, but hard for column count analysis.
- Now that there are separate phases, an `Analyze` method was added to the `CustomTextLayout` which just performs the text analysis steps and the glyph shaping, but no advance correction to column boundaries nor actual drawing.
I've taken the caching code that I was working on to improve chafa, and I've brought it into this. Now that we're doing a lot of fallback and heavy lifting in terms of analysis via the layout, we should cache the results until the font changes.
I've adjusted how column counting is done overall. It's always been in these phases:
1. We used a quick-lookup of ranges of characters we knew to rapidly decide `Narrow`, `Wide` or `Invalid` (a.k.a. "I dunno")
2. If it was `Invalid`, we consulted a table based off of the Unicode standard that has either `Narrow`, `Wide`, or `Ambiguous` as a result.
3. If it's still `Ambiguous`, we consult a render engine fallback (usually GDI or now DX) to see how many columns it would take.
4. If we still don't know, then it's `Wide` to be safe.
- I've added an additional flow here. The quick-lookup can now return `Ambiguous` off the bat for some glyph characters in the x2000-x3000 range that used to just be simple shapes but have been retroactively recategorized as emoji and are frequently now using full width color glyphs.
- This new state causes the lookup to go immediately to the render engine if it is available instead of consulting the Unicode standard table first because the half/fullwidth table doesn't appear to have been updated for this nuance to reclass these characters as ambiguous, but we'd like to keep that table as a "generated from the spec" sort of table and keep our exceptions in the "quick lookup" function.
I have confirmed the following things "just work" now:
- The windows logo flag from the demo. (⚫⚪💖✅🌌😊)
- The dotted chart on the side of crossterm demo (•)
- The powerline characters that make arrows with the Consolas patched font (██)
- An accented é
- The warning and checkmark symbols appearing same size as the X. (✔⚠🔥)
Related work items: #21167256, #21237515, #21243859, #21274645, #21296827