File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed
Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -827,11 +827,19 @@ namespace winrt::TerminalApp::implementation
827827 {
828828 auto focusedTab = _GetStrongTabImpl (*index);
829829 const auto & profileGuid = focusedTab->GetFocusedProfile ();
830- if (profileGuid.has_value ())
830+ auto activeControl = focusedTab->GetActiveTerminalControl ();
831+ auto iControlSettings = activeControl.Settings ();
832+ if (profileGuid.has_value () && iControlSettings)
831833 {
832- const auto settings = _settings->BuildSettings (profileGuid.value ());
833- _CreateNewTabFromSettings (profileGuid.value (), settings);
834+ if (auto settings{ iControlSettings.as <TerminalSettings>() })
835+ {
836+ _CreateNewTabFromSettings (profileGuid.value (), settings);
837+ }
834838 }
839+ // if (profileGuid.has_value())
840+ // {
841+ // const auto settings = _settings->BuildSettings(profileGuid.value());
842+ // }
835843 }
836844 CATCH_LOG ();
837845 // TODO: Should we display a dialog when we do nothing because we
Original file line number Diff line number Diff line change @@ -2352,6 +2352,11 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
23522352 e.DragUIOverride ().IsGlyphVisible (false );
23532353 }
23542354
2355+ winrt::Microsoft::Terminal::Settings::IControlSettings TermControl::Settings () const
2356+ {
2357+ return _settings;
2358+ }
2359+
23552360 // -------------------------------- WinRT Events ---------------------------------
23562361 // Winrt events need a method for adding a callback to the event and removing the callback.
23572362 // These macros will define them both for you.
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
9494
9595 static Windows::Foundation::Point GetProposedDimensions (Microsoft::Terminal::Settings::IControlSettings const & settings, const uint32_t dpi);
9696
97+ Settings::IControlSettings Settings () const ;
98+
9799 // clang-format off
98100 // -------------------------------- WinRT Events ---------------------------------
99101 DECLARE_EVENT (TitleChanged, _titleChangedHandlers, TerminalControl::TitleChangedEventArgs);
Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ namespace Microsoft.Terminal.TerminalControl
1212 // If you update this one, please update TerminalApp\IF7Listener.idl.
1313 // If you change this interface, please update the guid.
1414 // If you press F7 and get a runtime error, go make sure both copies are the same.
15- [uuid("339e1a87-5315-4da6-96f0-565549b6472b")]
16- interface IF7Listener
17- {
15+ [uuid("339e1a87-5315-4da6-96f0-565549b6472b")] interface IF7Listener {
1816 Boolean OnF7Pressed();
1917 }
2018
@@ -68,5 +66,7 @@ namespace Microsoft.Terminal.TerminalControl
6866
6967 void AdjustFontSize(Int32 fontSizeDelta);
7068 void ResetFontSize();
69+
70+ Microsoft.Terminal.Settings.IControlSettings Settings { get; };
7171 }
7272}
You can’t perform that action at this time.
0 commit comments