Skip to content

Commit 430669f

Browse files
conflict
2 parents 64c6676 + 756fd44 commit 430669f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+688
-1533
lines changed

.github/actions/spelling/excludes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ SUMS$
6767
^src/terminal/parser/ft_fuzzer/run\.bat$
6868
^src/terminal/parser/ft_fuzzer/VTCommandFuzzer\.cpp$
6969
^src/terminal/parser/ft_fuzzwrapper/run\.bat$
70+
^src/terminal/parser/ut_parser/Base64Test.cpp$
7071
^src/terminal/parser/ut_parser/run\.bat$
7172
^src/tools/integrity/packageuwp/ConsoleUWP\.appxSources$
7273
^src/tools/lnkd/lnkd\.bat$

.github/actions/spelling/expect/expect.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ GTP
938938
guc
939939
gui
940940
guidatom
941+
guiddef
941942
GValue
942943
GWL
943944
GWLP
@@ -1535,6 +1536,7 @@ NOCOLOR
15351536
NOCOMM
15361537
NOCONTEXTHELP
15371538
NOCOPYBITS
1539+
nodefaultlib
15381540
nodiscard
15391541
NODUP
15401542
noexcept
@@ -2232,6 +2234,7 @@ STARTWPARMSW
22322234
Statusline
22332235
stdafx
22342236
STDAPI
2237+
stdc
22352238
stdcall
22362239
stdcpp
22372240
stderr

custom.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
66
<XesBaseYearForStoreVersion>2021</XesBaseYearForStoreVersion>
77
<VersionMajor>1</VersionMajor>
8-
<VersionMinor>12</VersionMinor>
8+
<VersionMinor>13</VersionMinor>
99
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
1010
</PropertyGroup>
1111
</Project>

doc/EXCEPTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Introducing exceptions to an existing non-exception-based codebase can be perilous. The console was originally written
55
in C at a time when C++ was relatively unused in the Windows operating system. As part of our project to modernize the
66
Windows console, we converted to use C++, but still had an aversion to using exception-based error handling in
7-
our code for fear that it introduce unexpected failures. However, the STL and other libraries like it are so useful that
7+
our code for fear that it might introduce unexpected failures. However, the STL and other libraries like it are so useful that
88
sometimes it's significantly simpler to use them. Given that, we have a set of rules that we follow when considering
99
exception use.
1010

doc/terminal-v2-roadmap.md

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This document outlines the roadmap towards delivering Windows Terminal 2.0 by Winter 2021.
5+
This document outlines the roadmap towards delivering Windows Terminal 2.0.
66

77
## Milestones
88

@@ -31,9 +31,9 @@ Below is the schedule for when milestones will be included in release builds of
3131
| 2021-05-31 | [1.9] in Windows Terminal Preview<br>[1.8] in Windows Terminal | [Windows Terminal Preview 1.9 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-9-release/) |
3232
| 2021-07-14 | [1.10] in Windows Terminal Preview<br>[1.9] in Windows Terminal | [Windows Terminal Preview 1.10 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-10-release/) |
3333
| 2021-08-31 | [1.11] in Windows Terminal Preview<br>[1.10] in Windows Terminal | [Windows Terminal Preview 1.11 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-11-release/) |
34-
| 2021-10-31 | 1.12 in Windows Terminal Preview<br>1.11 in Windows Terminal | |
35-
| 2021-11-30 | 2.0 RC in Windows Terminal Preview<br>2.0 RC in Windows Terminal | |
36-
| 2021-12-31 | [2.0] in Windows Terminal Preview<br>[2.0] in Windows Terminal | |
34+
| 2021-10-20 | [1.12] in Windows Terminal Preview<br>[1.11] in Windows Terminal | [Windows Terminal Preview 1.12 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-12-release/) |
35+
| | 2.0 RC in Windows Terminal Preview<br>2.0 RC in Windows Terminal | |
36+
| | [2.0] in Windows Terminal Preview<br>[2.0] in Windows Terminal | |
3737

3838
## Issue Triage & Prioritization
3939

@@ -49,28 +49,32 @@ The following are a list of the key scenarios we're aiming to deliver for Termin
4949

5050
> 👉 Note: There are many other features that don't fit within 2.0, but will be re-assessed and prioritized for 3.0, the plan for which will be published in 2021.
5151
52-
| Priority\* | Scenario | Description/Notes |
53-
| ---------- | -------- | ----------------- |
54-
| 0 | Settings UI | A user interface that connects to settings.json. This provides a way for people to edit their settings without having to edit a JSON file.<br><br>Issue: [#1564]<br>Specs: [#6720], [#6904]<br>Implementation: [#7283], [#7370], [#8048] |
55-
| 0 | Command palette | A popup menu to list possible actions and commands.<br><br>Issues: [#5400], [#2046]<br>Spec: [#2193]<br>Implementation: [#6635] |
56-
| 1 | Tab tear-off | The ability to tear a tab out of the current window and spawn a new window or attach it to a separate window.<br><br>Issue: [#1256], [#5000]<br>Spec: [#2080], [#7240] |
57-
| 1 | Clickable links | Hyperlinking any links that appear in the text buffer. When clicking on the link, the link will open in your default browser.<br><br>Issue: [#574]<br>Implementation: [#7251] |
58-
| 1 | Default terminal | If a command-line application is spawned, it should open in Windows Terminal (if installed) or your preferred terminal<br><br>Issue: [#492]<br>Spec: [#2080], [#7414] |
59-
| 1 | Overall theme support | Tab coloring, title bar coloring, pane border coloring, pane border width, definition of what makes a theme<br><br>Issue: [#3327]<br>Spec: [#5772] |
60-
| 1 | Open profile elevated | Configure profiles to always open elevated (if Terminal was run unelevated)<br><br>Issue: [#5000], [#632]<br>Spec: [#8455] |
61-
| 1 | Open tab in existing window | Open new tabs in existing Terminal windows<br><br>Issue: [#5000], [#4472]<br>Spec: [#8135] |
62-
| 1 | Traditional opacity | Have a transparent background without the acrylic blur.<br><br>Issue: [#603] <br>**Current State**: Blocked on WinUI 3.0 |
63-
| 2 | SnapOnOutput, scroll lock | Pause output or scrolling on click.<br><br>Issue: [#980]<br>Spec: [#2529]<br>Implementation: [#6062] |
64-
| 2 | Infinite scrollback | Have an infinite history for the text buffer.<br><br>Issue: [#1410] |
65-
| 2 | Pane management | All issues listed out in the original issue. Some features include pane resizing with mouse, pane zooming, and opening a pane by prompting which profile to use.<br><br>Issue: [#1000] |
66-
| 2 | Theme marketplace | Marketplace for creation and distribution of themes.<br>Dependent on overall theming |
67-
| 2 | Jump list | Show profiles from task bar (on right click)/start menu.<br><br>Issue: [#576]<br>Implementation: [#7515] |
68-
| 2 | Open with multiple tabs | A setting that allows Windows Terminal to launch with a specific tab configuration (not using only command line arguments).<br><br>Issue: [#756] |
69-
| 3 | Open in Windows Terminal | Functionality to right click on a file or folder and select Open in Windows Terminal.<br><br>Issue: [#1060]<br>Implementation: [#6100] |
70-
| 3 | Session restoration | Launch Windows Terminal and the previous session is restored with the proper tab and pane configuration and starting directories.<br><br>Issues: [#961], [#960], [#766] |
71-
| 3 | Quake mode | Provide a quick launch terminal that appears and disappears when a hotkey is pressed.<br><br>Issue: [#653] |
72-
| 3 | Settings migration infrastructure | Migrate people's settings without breaking them. Hand-in-hand with settings UI. |
73-
| 3 | Pointer bindings | Provide settings that can be bound to the mouse.<br><br>Issue: [#1553] |
52+
| Priority\* | Scenario | Description/Notes | State |
53+
| ---------- | -------- | ----------------- | ----- |
54+
| 0 | Settings UI | A user interface that connects to settings.json. This provides a way for people to edit their settings without having to edit a JSON file.<br><br>Issue: [#1564]<br>Specs: [#6720], [#6904]<br>Implementation: [#7283], [#7370], [#8048] | ✔️ |
55+
| 0 | Command palette | A popup menu to list possible actions and commands.<br><br>Issues: [#5400], [#2046]<br>Spec: [#2193]<br>Implementation: [#6635] | ✔️ |
56+
| 1 | Tab tear-off | The ability to tear a tab out of the current window and spawn a new window or attach it to a separate window.<br><br>Issue: [#1256], [#5000]<br>Spec: [#2080], [#7240] | 📝 |
57+
| 1 | Clickable links | Hyperlinking any links that appear in the text buffer. When clicking on the link, the link will open in your default browser.<br><br>Issue: [#574]<br>Implementation: [#7251] | ✔️ |
58+
| 1 | Default terminal | If a command-line application is spawned, it should open in Windows Terminal (if installed) or your preferred terminal<br><br>Issue: [#492]<br>Spec: [#2080], [#7414] | ✔️ |
59+
| 1 | Overall theme support | Tab coloring, title bar coloring, pane border coloring, pane border width, definition of what makes a theme<br><br>Issue: [#3327]<br>Spec: [#5772] | 🦶 |
60+
| 1 | Open profile elevated | Configure profiles to always open elevated (if Terminal was run unelevated)<br><br>Issue: [#5000], [#632]<br>Spec: [#8455] | 📝 |
61+
| 1 | Open tab in existing window | Open new tabs in existing Terminal windows<br><br>Issue: [#5000], [#4472]<br>Spec: [#8135] | ✔️ |
62+
| 1 | Traditional opacity | Have a transparent background without the acrylic blur.<br><br>Issue: [#603] | ✔️ |
63+
| 2 | SnapOnOutput, scroll lock | Pause output or scrolling on click.<br><br>Issue: [#980]<br>Spec: [#2529]<br>Implementation: [#6062] | ✔️ |
64+
| 2 | Infinite scrollback | Have an infinite history for the text buffer.<br><br>Issue: [#1410] | 🦶 |
65+
| 2 | Pane management | All issues listed out in the original issue. Some features include pane resizing with mouse, pane zooming, and opening a pane by prompting which profile to use.<br><br>Issue: [#1000] | 📝 |
66+
| 2 | Theme marketplace | Marketplace for creation and distribution of themes.<br>Dependent on overall theming | 🦶 |
67+
| 2 | Jump list | Show profiles from task bar (on right click)/start menu.<br><br>Issue: [#576]<br>Implementation: [#7515] | ✔️ |
68+
| 2 | Open with multiple tabs | A setting that allows Windows Terminal to launch with a specific tab configuration (not using only command line arguments).<br><br>Issue: [#756] | ✔️ |
69+
| 3 | Open in Windows Terminal | Functionality to right click on a file or folder and select Open in Windows Terminal.<br><br>Issue: [#1060]<br>Implementation: [#6100] | ✔️ |
70+
| 3 | Session restoration | Launch Windows Terminal and the previous session is restored with the proper tab and pane configuration and starting directories.<br><br>Issues: [#961], [#960], [#766] | ✔️ |
71+
| 3 | Quake mode | Provide a quick launch terminal that appears and disappears when a hotkey is pressed.<br><br>Issue: [#653] | ✔️ |
72+
| 3 | Settings migration infrastructure | Migrate people's settings without breaking them. Hand-in-hand with settings UI. | 🦶 |
73+
| 3 | Pointer bindings | Provide settings that can be bound to the mouse.<br><br>Issue: [#1553] | 🦶 |
74+
75+
* 📝: The feature is currently in progress
76+
* ✔️: The feature is complete and shipped in a Preview build
77+
* 🦶: The feature is at risk of being punted to a future release cycle (beyond 2.0)
7478

7579
Feature Notes:
7680

@@ -91,6 +95,8 @@ Feature Notes:
9195
[1.9]: https://github.com/microsoft/terminal/milestone/34
9296
[1.10]: https://github.com/microsoft/terminal/milestone/35
9397
[1.11]: https://github.com/microsoft/terminal/milestone/36
98+
[1.12]: https://github.com/microsoft/terminal/milestone/38
99+
[1.13]: https://github.com/microsoft/terminal/milestone/39
94100
[2.0]: https://github.com/microsoft/terminal/milestone/22
95101
[#1564]: https://github.com/microsoft/terminal/issues/1564
96102
[#6720]: https://github.com/microsoft/terminal/pull/6720

src/cascadia/LocalTests_SettingsModel/DeserializationTests.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#include "../TerminalSettingsModel/CascadiaSettings.h"
88
#include "JsonTestClass.h"
99
#include "TestUtils.h"
10+
1011
#include <defaults.h>
12+
#include <userDefaults.h>
1113

1214
using namespace Microsoft::Console;
1315
using namespace WEX::Logging;
@@ -70,6 +72,7 @@ namespace SettingsModelLocalTests
7072
TEST_METHOD(TestCloneInheritanceTree);
7173
TEST_METHOD(TestValidDefaults);
7274
TEST_METHOD(TestInheritedCommand);
75+
TEST_METHOD(LoadFragmentsWithMultipleUpdates);
7376

7477
private:
7578
static winrt::com_ptr<implementation::CascadiaSettings> createSettings(const std::string_view& userJSON)
@@ -1979,4 +1982,34 @@ namespace SettingsModelLocalTests
19791982
VERIFY_IS_NULL(actualKeyChord);
19801983
}
19811984
}
1985+
1986+
// This test ensures GH#11597 doesn't regress.
1987+
void DeserializationTests::LoadFragmentsWithMultipleUpdates()
1988+
{
1989+
static constexpr std::wstring_view fragmentSource{ L"fragment" };
1990+
static constexpr std::string_view fragmentJson{ R"({
1991+
"profiles": [
1992+
{
1993+
"updates": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
1994+
"cursorShape": "filledBox"
1995+
},
1996+
{
1997+
"updates": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
1998+
"cursorShape": "filledBox"
1999+
},
2000+
{
2001+
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
2002+
"commandline": "cmd.exe"
2003+
}
2004+
]
2005+
})" };
2006+
2007+
implementation::SettingsLoader loader{ std::string_view{}, DefaultJson };
2008+
loader.MergeInboxIntoUserSettings();
2009+
loader.MergeFragmentIntoUserSettings(winrt::hstring{ fragmentSource }, fragmentJson);
2010+
loader.FinalizeLayering();
2011+
2012+
VERIFY_IS_FALSE(loader.duplicateProfile);
2013+
VERIFY_ARE_EQUAL(3u, loader.userSettings.profiles.size());
2014+
}
19822015
}

src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ namespace SettingsModelLocalTests
9797
"confirmCloseAllTabs": true,
9898
"largePasteWarning": true,
9999
"multiLinePasteWarning": true,
100+
"trimPaste": true,
100101
101102
"experimental.input.forceVT": false,
102103
"experimental.rendering.forceFullRepaint": false,

src/cascadia/TerminalApp/TerminalPage.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,22 @@ namespace winrt::TerminalApp::implementation
18691869
}
18701870
}
18711871

1872+
if (_settings.GlobalSettings().TrimPaste())
1873+
{
1874+
std::wstring_view textView{ text };
1875+
const auto pos = textView.find_last_not_of(L"\t\n\v\f\r ");
1876+
if (pos == textView.npos)
1877+
{
1878+
// Text is all white space, nothing to paste
1879+
co_return;
1880+
}
1881+
else if (const auto toRemove = textView.size() - 1 - pos; toRemove > 0)
1882+
{
1883+
textView.remove_suffix(toRemove);
1884+
text = { textView };
1885+
}
1886+
}
1887+
18721888
bool warnMultiLine = _settings.GlobalSettings().WarnAboutMultiLinePaste();
18731889
if (warnMultiLine)
18741890
{

src/cascadia/TerminalApp/TerminalPage.xaml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,58 @@
1515
<Grid x:Name="Root"
1616
Background="Transparent">
1717
<Grid.RowDefinitions>
18+
<RowDefinition Height="Auto" />
1819
<RowDefinition Height="Auto" />
1920
<RowDefinition Height="*" />
2021
</Grid.RowDefinitions>
2122

2223
<local:TabRowControl x:Name="TabRow"
2324
Grid.Row="0" />
2425

26+
<StackPanel Grid.Row="1">
27+
<mux:InfoBar x:Name="KeyboardServiceWarningInfoBar"
28+
x:Load="False"
29+
IsClosable="True"
30+
IsIconVisible="True"
31+
IsOpen="False"
32+
Message="{x:Bind KeyboardServiceDisabledText, Mode=OneWay}"
33+
Severity="Warning">
34+
<mux:InfoBar.ActionButton>
35+
<Button x:Uid="InfoBarDismissButton"
36+
Click="_KeyboardServiceWarningInfoDismissHandler" />
37+
</mux:InfoBar.ActionButton>
38+
</mux:InfoBar>
39+
40+
<mux:InfoBar x:Name="CloseOnExitInfoBar"
41+
x:Uid="CloseOnExitInfoBar"
42+
x:Load="False"
43+
IsClosable="True"
44+
IsIconVisible="True"
45+
IsOpen="False"
46+
Severity="Informational">
47+
<mux:InfoBar.ActionButton>
48+
<Button x:Uid="InfoBarDismissButton"
49+
Click="_CloseOnExitInfoDismissHandler" />
50+
</mux:InfoBar.ActionButton>
51+
</mux:InfoBar>
52+
53+
<mux:InfoBar x:Name="SetAsDefaultInfoBar"
54+
x:Uid="SetAsDefaultInfoBar"
55+
x:Load="False"
56+
CloseButtonClick="_SetAsDefaultDismissHandler"
57+
IsClosable="True"
58+
IsIconVisible="True"
59+
IsOpen="False"
60+
Severity="Informational">
61+
<mux:InfoBar.ActionButton>
62+
<HyperlinkButton x:Uid="SetAsDefaultTip_OpenSettingsLink"
63+
Click="_SetAsDefaultOpenSettingsHandler" />
64+
</mux:InfoBar.ActionButton>
65+
</mux:InfoBar>
66+
</StackPanel>
67+
2568
<Grid x:Name="TabContent"
26-
Grid.Row="1"
69+
Grid.Row="2"
2770
HorizontalAlignment="Stretch"
2871
VerticalAlignment="Stretch" />
2972

@@ -115,48 +158,6 @@
115158
PreviewKeyDown="_KeyDownHandler"
116159
Visibility="Collapsed" />
117160

118-
<StackPanel>
119-
<mux:InfoBar x:Name="KeyboardServiceWarningInfoBar"
120-
x:Load="False"
121-
IsClosable="True"
122-
IsIconVisible="True"
123-
IsOpen="False"
124-
Message="{x:Bind KeyboardServiceDisabledText, Mode=OneWay}"
125-
Severity="Warning">
126-
<mux:InfoBar.ActionButton>
127-
<Button x:Uid="InfoBarDismissButton"
128-
Click="_KeyboardServiceWarningInfoDismissHandler" />
129-
</mux:InfoBar.ActionButton>
130-
</mux:InfoBar>
131-
132-
<mux:InfoBar x:Name="CloseOnExitInfoBar"
133-
x:Uid="CloseOnExitInfoBar"
134-
x:Load="False"
135-
IsClosable="True"
136-
IsIconVisible="True"
137-
IsOpen="False"
138-
Severity="Informational">
139-
<mux:InfoBar.ActionButton>
140-
<Button x:Uid="InfoBarDismissButton"
141-
Click="_CloseOnExitInfoDismissHandler" />
142-
</mux:InfoBar.ActionButton>
143-
</mux:InfoBar>
144-
145-
<mux:InfoBar x:Name="SetAsDefaultInfoBar"
146-
x:Uid="SetAsDefaultInfoBar"
147-
x:Load="False"
148-
CloseButtonClick="_SetAsDefaultDismissHandler"
149-
IsClosable="True"
150-
IsIconVisible="True"
151-
IsOpen="False"
152-
Severity="Informational">
153-
<mux:InfoBar.ActionButton>
154-
<HyperlinkButton x:Uid="SetAsDefaultTip_OpenSettingsLink"
155-
Click="_SetAsDefaultOpenSettingsHandler" />
156-
</mux:InfoBar.ActionButton>
157-
</mux:InfoBar>
158-
</StackPanel>
159-
160161
<!--
161162
A TeachingTip with IsLightDismissEnabled="True" will immediately
162163
dismiss itself if the window is unfocused (In Xaml Islands). This is

0 commit comments

Comments
 (0)