Around about 03/05/06 14:38, Bram Moolenaar typed ...
This is a known problem with GTK. When you hit Enter Vim doesn't know what button was highlighted. Clicking with the mouse and using the shortcut key does work.
That may have been the case with GTK1, but under GTK2 it seems to work by itself. The vim code in question is GTK2-specific, so removing the hard-coded '1' return when <Enter> is typed lets GTK2 do the right thing. Seems to work as expected.
Attached patch is against 7.0e07. -- [EMAIL PROTECTED] ~]# rm -f .signature [EMAIL PROTECTED] ~]# ls -l .signature ls: .signature: No such file or directory [EMAIL PROTECTED] ~]# exit
--- src/gui_gtk.c.orig 2006-05-04 14:20:21.000000000 +0100 +++ src/gui_gtk.c 2006-05-04 14:19:28.000000000 +0100 @@ -2221,14 +2221,6 @@ { DialogInfo *di = (DialogInfo *)data; - /* Ignore hitting "Enter" if there is no default button. */ - 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) { @@ -2290,7 +2282,7 @@ dialoginfo.noalt = TRUE; /* Allow activation of mnemonic accelerators without pressing <Alt> when - * there is no textfield. Handle pressing Enter and Esc. */ + * there is no textfield. Handle pressing Esc. (Enter is processed correctly by GTK) */ g_signal_connect(G_OBJECT(dialog), "key_press_event", G_CALLBACK(&dialog_key_press_event_cb), &dialoginfo);