diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-07 21:09:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-07 21:09:25 +0000 |
commit | 82cf9b6851bcd4d28f65df8d95c2bcabc780b810 (patch) | |
tree | 0f5cb1fa0fb34ab46fa0d51c92087dee7ecaafc8 /src/gui_gtk.c | |
parent | c4a06d34471d21532a3e0535e547b3d797992350 (diff) | |
download | vim-git-82cf9b6851bcd4d28f65df8d95c2bcabc780b810.tar.gz |
updated for version 7.0082
Diffstat (limited to 'src/gui_gtk.c')
-rw-r--r-- | src/gui_gtk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui_gtk.c b/src/gui_gtk.c index b23792555..641f784b8 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -2241,8 +2241,12 @@ dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) DialogInfo *di = (DialogInfo *)data; /* Ignore hitting "Enter" if there is no default button. */ - if (di->ignore_enter && event->keyval == GDK_Return) + if (event->keyval == GDK_Return) + { + if (!di->ignore_enter) + gtk_dialog_response(di->dialog, GTK_RESPONSE_ACCEPT); return TRUE; + } /* Close the dialog when hitting "Esc". */ if (event->keyval == GDK_Escape) @@ -2326,6 +2330,8 @@ gui_mch_dialog(int type, /* type of dialog */ /* GTK_RESPONSE_NONE means the dialog was programmatically destroyed. */ if (response != GTK_RESPONSE_NONE) { + if (response == GTK_RESPONSE_ACCEPT) /* Enter pressed */ + response = def_but; if (textfield != NULL) { text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry)); |