File tree 10 files changed +72
-54
lines changed
10 files changed +72
-54
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,6 @@ class Microsoft::Terminal::Core::Terminal final :
132
132
Microsoft::Console::VirtualTerminal::StateMachine& GetStateMachine () noexcept override ;
133
133
BufferState GetBufferAndViewport () noexcept override ;
134
134
void SetViewportPosition (const til::point position) noexcept override ;
135
- void SetTextAttributes (const TextAttribute& attrs) noexcept override ;
136
135
void SetSystemMode (const Mode mode, const bool enabled) noexcept override ;
137
136
bool GetSystemMode (const Mode mode) const noexcept override ;
138
137
void ReturnAnswerback () override ;
Original file line number Diff line number Diff line change 54
54
}
55
55
CATCH_LOG ()
56
56
57
- void Terminal::SetTextAttributes(const TextAttribute& attrs) noexcept
58
- {
59
- _activeBuffer ().SetCurrentAttributes (attrs);
60
- }
61
-
62
57
void Terminal::SetSystemMode(const Mode mode, const bool enabled) noexcept
63
58
{
64
59
_assertLocked ();
Original file line number Diff line number Diff line change @@ -88,18 +88,6 @@ void ConhostInternalGetSet::SetViewportPosition(const til::point position)
88
88
info.UpdateBottom ();
89
89
}
90
90
91
- // Method Description:
92
- // - Sets the current TextAttribute of the active screen buffer. Text
93
- // written to this buffer will be written with these attributes.
94
- // Arguments:
95
- // - attrs: The new TextAttribute to use
96
- // Return Value:
97
- // - <none>
98
- void ConhostInternalGetSet::SetTextAttributes (const TextAttribute& attrs)
99
- {
100
- _io.GetActiveOutputBuffer ().SetAttributes (attrs);
101
- }
102
-
103
91
// Routine Description:
104
92
// - Sets the state of one of the system modes.
105
93
// Arguments:
Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ class ConhostInternalGetSet final : public Microsoft::Console::VirtualTerminal::
35
35
BufferState GetBufferAndViewport () override ;
36
36
void SetViewportPosition (const til::point position) override ;
37
37
38
- void SetTextAttributes (const TextAttribute& attrs) override ;
39
-
40
38
void SetSystemMode (const Mode mode, const bool enabled) override ;
41
39
bool GetSystemMode (const Mode mode) const override ;
42
40
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ namespace Microsoft::Console::VirtualTerminal
52
52
53
53
virtual bool IsVtInputEnabled () const = 0;
54
54
55
- virtual void SetTextAttributes (const TextAttribute& attrs) = 0;
56
-
57
55
enum class Mode : size_t
58
56
{
59
57
AutoWrap,
Original file line number Diff line number Diff line change @@ -40,16 +40,9 @@ const TextAttribute& Page::Attributes() const noexcept
40
40
return _buffer.GetCurrentAttributes ();
41
41
}
42
42
43
- void Page::SetAttributes (const TextAttribute& attr, ITerminalApi* api ) const
43
+ void Page::SetAttributes (const TextAttribute& attr) const noexcept
44
44
{
45
45
_buffer.SetCurrentAttributes (attr);
46
- // If the api parameter was specified, we need to pass the new attributes
47
- // through to the api. This occurs when there's a potential for the colors
48
- // to be changed, which may require some legacy remapping in conhost.
49
- if (api)
50
- {
51
- api->SetTextAttributes (attr);
52
- }
53
46
}
54
47
55
48
til::size Page::Size () const noexcept
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace Microsoft::Console::VirtualTerminal
25
25
til::CoordType Number () const noexcept ;
26
26
Cursor& Cursor () const noexcept ;
27
27
const TextAttribute& Attributes () const noexcept ;
28
- void SetAttributes (const TextAttribute& attr, ITerminalApi* api = nullptr ) const ;
28
+ void SetAttributes (const TextAttribute& attr) const noexcept ;
29
29
til::size Size () const noexcept ;
30
30
til::CoordType Top () const noexcept ;
31
31
til::CoordType Bottom () const noexcept ;
Original file line number Diff line number Diff line change @@ -555,7 +555,7 @@ bool AdaptDispatch::CursorRestoreState()
555
555
}
556
556
557
557
// Restore text attributes.
558
- page.SetAttributes (savedCursorState.Attributes , &_api );
558
+ page.SetAttributes (savedCursorState.Attributes );
559
559
560
560
// Restore designated character sets.
561
561
_termOutput.RestoreFrom (savedCursorState.TermOutput );
Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ bool AdaptDispatch::SetGraphicsRendition(const VTParameters options)
425
425
const auto page = _pages.ActivePage ();
426
426
auto attr = page.Attributes ();
427
427
_ApplyGraphicsOptions (options, attr);
428
- page.SetAttributes (attr, &_api );
428
+ page.SetAttributes (attr);
429
429
return true ;
430
430
}
431
431
@@ -487,6 +487,6 @@ bool AdaptDispatch::PopGraphicsRendition()
487
487
{
488
488
const auto page = _pages.ActivePage ();
489
489
const auto & currentAttributes = page.Attributes ();
490
- page.SetAttributes (_sgrStack.Pop (currentAttributes), &_api );
490
+ page.SetAttributes (_sgrStack.Pop (currentAttributes));
491
491
return true ;
492
492
}
You can’t perform that action at this time.
0 commit comments