Tightened up how the search query is cleared.

master
Pacman Ghost 5 years ago
parent 176663402b
commit 778610390d
  1. 4
      src/MainForm.ui.cs

@ -395,10 +395,8 @@ public partial class MainForm : Form
// check if we should apply the keypress to the search results // check if we should apply the keypress to the search results
if ( e.KeyCode == Keys.Escape ) { if ( e.KeyCode == Keys.Escape ) {
string prevSearchQuery = mSearchQuery.Text ;
mSearchQuery.Text = "" ; mSearchQuery.Text = "" ;
if ( prevSearchQuery == "" ) e.Handled = true ;
updateSearchResults( "" ) ;
} else if ( e.KeyCode == Keys.Left || e.KeyCode == Keys.Right ) { } else if ( e.KeyCode == Keys.Left || e.KeyCode == Keys.Right ) {
mSearchResults.Focus() ; mSearchResults.Focus() ;
SendKeys.SendWait( "{" + e.KeyCode.ToString() + "}" ) ; SendKeys.SendWait( "{" + e.KeyCode.ToString() + "}" ) ;

Loading…
Cancel
Save