Skip to content

Commit

Permalink
* Quickswitcher: Enable the "Go" button if the list is populated even…
Browse files Browse the repository at this point in the history
… if the user hasn't typed anything in
  • Loading branch information
iProgramMC committed Aug 24, 2024
1 parent d222af9 commit 48570a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/windows/QuickSwitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,9 @@ INT_PTR QuickSwitcher::DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP

OnUpdateQuery(hWnd, "");

// Go button is disabled by default, enabled when an item is selected
EnableWindow(GetDlgItem(hWnd, IDOK), FALSE);
// Go button is disabled by default, enabled when an item is selected.
// If the list isn't empty, then a selected item exists.
EnableWindow(GetDlgItem(hWnd, IDOK), ListView_GetItemCount(hList) != 0);

ListView_SetExtendedListViewStyle(hList, LVS_EX_FULLROWSELECT);
// Instantly focus on the searcher
Expand Down

0 comments on commit 48570a7

Please sign in to comment.