Skip to content

Commit

Permalink
[silmarillion] Wow, we didn't need _recentlyDetached at all, did we
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Mar 29, 2023
1 parent 3152ff9 commit 3f5a559
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
12 changes: 0 additions & 12 deletions src/cascadia/TerminalApp/ContentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ namespace winrt::TerminalApp::implementation
if (const auto& content{ TryLookupCore(contentId) })
{
control.Detach();
content.Attached({ get_weak(), &ContentManager::_finalizeDetach });
_recentlyDetachedContent.emplace(contentId, content);
}
}

void ContentManager::_finalizeDetach(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable&)
{
if (const auto& content{ sender.try_as<winrt::Microsoft::Terminal::Control::ControlInteractivity>() })
{
_recentlyDetachedContent.erase(content.Id());
}
}

Expand All @@ -66,7 +55,6 @@ namespace winrt::TerminalApp::implementation
{
const auto& contentId{ content.Id() };
_content.erase(contentId);
_recentlyDetachedContent.erase(contentId);
}
}
}
4 changes: 0 additions & 4 deletions src/cascadia/TerminalApp/ContentManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ namespace winrt::TerminalApp::implementation

private:
std::unordered_map<uint64_t, Microsoft::Terminal::Control::ControlInteractivity> _content;
std::unordered_map<uint64_t, Microsoft::Terminal::Control::ControlInteractivity> _recentlyDetachedContent;

void _finalizeDetach(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& e);

void _closedHandler(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& e);
Expand Down

0 comments on commit 3f5a559

Please sign in to comment.