Skip to content

Commit

Permalink
actually do the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Jan 21, 2025
1 parent e62f8b9 commit 4359168
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cascadia/TerminalCore/Terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ void Terminal::UpdateSettings(ICoreSettings settings)
_trimBlockSelection = settings.TrimBlockSelection();
_autoMarkPrompts = settings.AutoMarkPrompts();
_rainbowSuggestions = settings.RainbowSuggestions();
_clipboardOperationsAllowed = settings.AllowVtClipboardWrite();

if (_stateMachine)
{
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalCore/Terminal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ class Microsoft::Terminal::Core::Terminal final :
Microsoft::Console::Types::Viewport _mutableViewport;
til::CoordType _scrollbackLines = 0;
bool _detectURLs = false;
bool _clipboardOperationsAllowed = true;

til::size _altBufferSize;
std::optional<til::size> _deferredResize;
Expand Down
5 changes: 4 additions & 1 deletion src/cascadia/TerminalCore/TerminalApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ unsigned int Terminal::GetInputCodePage() const noexcept

void Terminal::CopyToClipboard(wil::zwstring_view content)
{
_pfnCopyToClipboard(content);
if (_clipboardOperationsAllowed)
{
_pfnCopyToClipboard(content);
}
}

// Method Description:
Expand Down

0 comments on commit 4359168

Please sign in to comment.