Skip to content

Commit 1670299

Browse files
committed
Update TerminalTab.cpp
1 parent 7fa1579 commit 1670299

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/cascadia/TerminalApp/TerminalTab.cpp

+1-19
Original file line numberDiff line numberDiff line change
@@ -1593,28 +1593,10 @@ namespace winrt::TerminalApp::implementation
15931593
// the same read-only status.
15941594
void TerminalTab::SetPaneReadOnly(const bool readOnlyState)
15951595
{
1596-
auto hasReadOnly = false;
1597-
auto allReadOnly = true;
1598-
_activePane->WalkTree([&](const auto& p) {
1599-
if (const auto& control{ p->GetTerminalControl() })
1600-
{
1601-
hasReadOnly |= control.ReadOnly();
1602-
allReadOnly &= control.ReadOnly();
1603-
}
1604-
});
16051596
_activePane->WalkTree([&](const auto& p) {
16061597
if (const auto& control{ p->GetTerminalControl() })
16071598
{
1608-
// If all controls have the same read only state then just disable
1609-
if (allReadOnly || !hasReadOnly)
1610-
{
1611-
control.SetReadOnly(readOnlyState);
1612-
}
1613-
// otherwise set to all read only.
1614-
else if (!control.ReadOnly())
1615-
{
1616-
control.SetReadOnly(readOnlyState);
1617-
}
1599+
control.SetReadOnly(readOnlyState);
16181600
}
16191601
});
16201602
}

0 commit comments

Comments
 (0)