dotnet / interactive-window

Visual Studio Interactive Window
MIT License
64 stars 35 forks source link

Alt+Up and Alt+Down do not control history when interactive window launches pinned. #174

Open JoeRobich opened 3 years ago

JoeRobich commented 3 years ago

Reported at developer community as https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1178927.

Workflow:

  1. Open VS and dock the C# interactive window to one of the edges.
  2. Pin the window so that it collapses to a tab on the edge.
  3. Close VS
  4. Open VS
  5. Show the C# interactive window by clicking the tab
  6. Execute var a = 5;
  7. Press Alt + Up

Expected Outcome:

The current line should match the previous entry and read var a = 5;

Actual Outcome:

No change to the current line. From debugging the CommandFilter, pguidCmdGroup is VsStd12 and the nCmdID is MoveSelLinesUp.

JoeRobich commented 3 years ago

Focusing on a different ToolWindow or Editor then back to the Interactive Window corrects the commands being sent.

JoeRobich commented 3 years ago

My current hunch on the issue seems to be that the CommandUIGuid on the WindowFrame is set to the Interactive Window's guid, but doesn't take effect until there is a Focus change (this is the hunch part). Since a pinned ToolWindow becomes created and focused when unpinned, there is no focus change that allows the CommandUIGuid to take precendence to the MoveSelectedLinesUp command when Alt+Up is pressed.