Skip to content

Commit d069ea6

Browse files
carlos-zamoraDHowett
authored andcommitted
Fix selection markers appearing on scroll (#20045)
## Summary of the Pull Request Updates the scroll handler to check the selection mode before updating the markers. Introduced in #19974 ## Validation Steps Performed `ls` --> create selection --> scroll away and back ✅ keyboard selection: markers are present both times ✅ mouse selection: markers are missing both times (cherry picked from commit 3104c8f) Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgo0ICA Service-Version: 1.24
1 parent 36bc972 commit d069ea6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cascadia/TerminalControl/TermControl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,9 +2625,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
26252625

26262626
_updateScrollBar->Run(update);
26272627

2628-
// if we have a selection, update the position of the markers
2629-
// (they may have been hidden when the endpoint scrolled out of view)
2630-
if (_core.HasSelection())
2628+
// If we have a selection with markers (exposed via selection mode),
2629+
// update the position of the markers
2630+
if (_core.HasSelection() && _core.SelectionMode() >= SelectionInteractionMode::Keyboard)
26312631
{
26322632
_updateSelectionMarkers(nullptr, winrt::make<UpdateSelectionMarkersEventArgs>(false));
26332633
}

0 commit comments

Comments
 (0)