Skip to content

Commit

Permalink
Updating comments in CommandPalette.cpp (#8019)
Browse files Browse the repository at this point in the history
Changed wrong comments from the last PR and also added new comments.

* [x] CLA signed
  • Loading branch information
kaihugo authored Oct 23, 2020
1 parent 7a75e50 commit 6928c5a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/cascadia/TerminalApp/CommandPalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ namespace winrt::TerminalApp::implementation
// Method Description:
// - Scrolls the focus up or down the list of commands.
// Arguments:
// - pageDown: if true, we're attempting to move to last visible item in the
// list. Otherwise, we're attempting to move to first visible item.
// - pageDown: if true, we're attempting to move to the last visible item in the
// list. Otherwise, we're attempting to move to the first visible item.
// Return Value:
// - <none>
void CommandPalette::ScrollDown(const bool pageDown)
Expand All @@ -141,10 +141,10 @@ namespace winrt::TerminalApp::implementation
}

// Method Description:
// - Moves the focus either to top item or end item in the list of commands.
// - Moves the focus either to the top item or to the end item in the list of commands.
// Arguments:
// - end: if true, we're attempting to move to last item in the
// list. Otherwise, we're attempting to move to first item.
// - end: if true, we're attempting to move to the last item in the
// list. Otherwise, we're attempting to move to the first item.
// Depends on the pageUpDown argument.
// Return Value:
// - <none>
Expand Down Expand Up @@ -240,23 +240,25 @@ namespace winrt::TerminalApp::implementation
}
else if (key == VirtualKey::PageUp)
{
// Action Mode: Move focus to the previous item in the list.
// Action Mode: Move focus to the first visible item in the list.
ScrollDown(false);
e.Handled(true);
}
else if (key == VirtualKey::PageDown)
{
// Action Mode: Move focus to the previous item in the list.
// Action Mode: Move focus to the last visible item in the list.
ScrollDown(true);
e.Handled(true);
}
else if (key == VirtualKey::Home)
{
// Action Mode: Move focus to the first item in the list.
GoEnd(false);
e.Handled(true);
}
else if (key == VirtualKey::End)
{
// Action Mode: Move focus to the last item in the list.
GoEnd(true);
e.Handled(true);
}
Expand Down

0 comments on commit 6928c5a

Please sign in to comment.