Repository: microsoft/terminal (language: cpp)

Issue:
[1.15] switchSelectionEndpoint doesn't work
### Windows Terminal version

1.15

### Windows build number

_No response_

### Other Software

_No response_

### Steps to reproduce

I entered mark mode (or just started with a mouse selection), and `switchSelectionEndpoint` doesn't do anything.

It might be important to note that I'm using it from the command palette.

### Expected Behavior

_No response_

### Actual Behavior

![gif](https://drop.howett.net/share/WindowsTerminal_qtKLVUVA97.gif)


Discussion / hints:
(putting this here for if somebody comes by before I do)
The weirdest thing! This doesn't repro on a Debug or Release build of `main`, but it 100% repros on the WT Preview build we're selfhosting! I'll take a closer look after the holidays!

Fix patch:
diff --git a/src/cascadia/TerminalControl/ControlCore.cpp b/src/cascadia/TerminalControl/ControlCore.cpp
index d60f90bd380..89512563e4c 100644
--- a/src/cascadia/TerminalControl/ControlCore.cpp
+++ b/src/cascadia/TerminalControl/ControlCore.cpp
@@ -1094,6 +1094,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
         if (_terminal->IsSelectionActive())
         {
             _terminal->SwitchSelectionEndpoint();
+            _updateSelectionUI();
             return true;
         }
         return false;


Test patch: