aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-05 17:00:55 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-05 17:00:55 -0500
commit31b6f1d5a76c9a37da074011866fc6d68b0413d6 (patch)
tree4c743d7b4f220193b6dbd5dd8488522f4f2a012f /src
parentd1a5a7b5699c5533bc89b31a2c281334acf574f4 (diff)
downloadtextadept-31b6f1d5a76c9a37da074011866fc6d68b0413d6.tar.gz
textadept-31b6f1d5a76c9a37da074011866fc6d68b0413d6.zip
Don't hide the find box on ESC if the command entry has focus; src/textadept.c
Diffstat (limited to 'src')
-rw-r--r--src/textadept.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/textadept.c b/src/textadept.c
index cd823e86..62053c11 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -506,7 +506,8 @@ static gbool w_focus(GtkWidget*, GdkEventFocus*, gpointer) {
* - Escape - hides the search frame if it's open.
*/
static gbool w_keypress(GtkWidget*, GdkEventKey *event, gpointer) {
- if (event->keyval == 0xff1b && GTK_WIDGET_VISIBLE(findbox)) {
+ if (event->keyval == 0xff1b && GTK_WIDGET_VISIBLE(findbox) &&
+ !GTK_WIDGET_HAS_FOCUS(command_entry)) {
gtk_widget_hide(findbox);
gtk_widget_grab_focus(focused_editor);
return TRUE;