File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -1593,28 +1593,10 @@ namespace winrt::TerminalApp::implementation
1593
1593
// the same read-only status.
1594
1594
void TerminalTab::SetPaneReadOnly (const bool readOnlyState)
1595
1595
{
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
- });
1605
1596
_activePane->WalkTree ([&](const auto & p) {
1606
1597
if (const auto & control{ p->GetTerminalControl () })
1607
1598
{
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);
1618
1600
}
1619
1601
});
1620
1602
}
You can’t perform that action at this time.
0 commit comments