Skip to content

Commit

Permalink
Port clipboard improvements from inbox to oss (#16670)
Browse files Browse the repository at this point in the history
#16618 contained a bug which was fixed inbox. This ports the
changes to the OSS repo manually since the two slightly diverged.
  • Loading branch information
lhecker authored Feb 6, 2024
1 parent ef96e22 commit b70fd5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/interactivity/win32/Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ void Clipboard::StoreSelectionToClipboard(const bool copyFormatting)
}

const auto clipboard = _openClipboard(ServiceLocator::LocateConsoleWindow()->GetWindowHandle());
if (!clipboard)
{
LOG_LAST_ERROR();
return;
}

EmptyClipboard();
// As per: https://learn.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats
Expand Down

0 comments on commit b70fd5e

Please sign in to comment.