To: vim-dev@vim.org Subject: Patch 5.5.024 (extra) Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.024 (extra) Problem: Win32 GUI: When using confirm() to put up a dialog without a default button, the dialog would not have keyboard focus. (Krishna) Solution: Always set focus to the dialog window. Only set focus to a button when a default one is specified. Files: src/gui_w32.c *** ../vim-5.5.23/src/gui_w32.c Wed Sep 22 10:06:24 1999 --- src/gui_w32.c Sun Oct 17 14:50:41 1999 *************** *** 4488,4494 **** if (message == WM_INITDIALOG) { CenterWindow(hwnd, GetWindow(hwnd, GW_OWNER)); ! SetFocus(GetDlgItem(hwnd, dialog_default_button + IDCANCEL)); return FALSE; } --- 4509,4518 ---- if (message == WM_INITDIALOG) { CenterWindow(hwnd, GetWindow(hwnd, GW_OWNER)); ! /* Set focus to the dialog. Set the default button, if specified. */ ! (void)SetFocus(hwnd); ! if (dialog_default_button > 0) ! (void)SetFocus(GetDlgItem(hwnd, dialog_default_button + IDCANCEL)); return FALSE; } *** ../vim-5.5.23/src/version.c Sun Oct 17 12:49:24 1999 --- src/version.c Sun Oct 17 14:57:17 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 24, -- BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O Lord bless this thy hand grenade that with it thou mayest blow thine enemies to tiny bits, in thy mercy. "and the Lord did grin and people did feast upon the lambs and sloths and carp and anchovies and orang-utans and breakfast cereals and fruit bats and... BROTHER MAYNARD: Skip a bit brother ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /