1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When using ":make", typing the next command and then getting the
12 "reload" prompt the next command is (partly) eaten by the reload
14 Solution: Accept ':' as a special character at the reload prompt to accept
15 the default choice and execute the command.
16 Files: src/eval.c, src/fileio.c, src/gui.c, src/gui_xmdlg.c,
17 src/memline.c, src/message.c, src/proto/message.pro,
18 src/gui_athena.c, src/gui_gtk.c, src/gui_mac.c, src/gui_motif.c,
19 src/gui_photon.c, src/gui_w16.c, src/gui_w32.c, src/os_mswin.c
20 src/proto/gui_athena.pro, src/proto/gui_gtk.pro,
21 src/proto/gui_mac.pro, src/proto/gui_motif.pro,
22 src/proto/gui_photon.pro, src/proto/gui_w16.pro,
26 *** ../vim-7.3.101/src/eval.c 2011-01-04 19:03:22.000000000 +0100
27 --- src/eval.c 2011-01-16 00:14:21.000000000 +0100
32 rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
40 rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
48 if (message != NULL && defstr != NULL
49 && do_dialog(VIM_QUESTION, NULL, message,
50 ! (char_u *)_("&OK\n&Cancel"), 1, IObuff) == 1)
51 rettv->vval.v_string = vim_strsave(IObuff);
56 if (message != NULL && defstr != NULL
57 && do_dialog(VIM_QUESTION, NULL, message,
58 ! (char_u *)_("&OK\n&Cancel"), 1, IObuff, FALSE) == 1)
59 rettv->vval.v_string = vim_strsave(IObuff);
62 *** ../vim-7.3.101/src/fileio.c 2010-12-17 18:06:00.000000000 +0100
63 --- src/fileio.c 2011-01-16 00:14:37.000000000 +0100
68 if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf,
69 ! (char_u *)_("&OK\n&Load File"), 1, NULL) == 2)
76 if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf,
77 ! (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2)
81 *** ../vim-7.3.101/src/gui.c 2010-10-20 19:17:43.000000000 +0200
82 --- src/gui.c 2011-01-16 00:14:56.000000000 +0100
86 STRCPY(p + 2000 - 14, "...(truncated)");
87 (void)do_dialog(VIM_ERROR, (char_u *)_("Error"),
88 ! p, (char_u *)_("&Ok"), 1, NULL);
94 STRCPY(p + 2000 - 14, "...(truncated)");
95 (void)do_dialog(VIM_ERROR, (char_u *)_("Error"),
96 ! p, (char_u *)_("&Ok"), 1, NULL, FALSE);
100 *** ../vim-7.3.101/src/gui_xmdlg.c 2010-08-15 21:57:32.000000000 +0200
101 --- src/gui_xmdlg.c 2011-01-16 00:15:33.000000000 +0100
105 (char_u *)_("Error"),
106 (char_u *)_("Invalid font specification"),
107 ! (char_u *)_("&Dismiss"), 1, NULL);
113 (char_u *)_("Error"),
114 (char_u *)_("Invalid font specification"),
115 ! (char_u *)_("&Dismiss"), 1, NULL, FALSE);
122 (char_u *)_("Error"),
123 (char_u *)_("Invalid font specification"),
124 ! (char_u *)_("&Dismiss"), 1, NULL);
125 XFreeFontNames(name);
130 (char_u *)_("Error"),
131 (char_u *)_("Invalid font specification"),
132 ! (char_u *)_("&Dismiss"), 1, NULL, FALSE);
133 XFreeFontNames(name);
136 *** ../vim-7.3.101/src/memline.c 2010-12-17 20:23:56.000000000 +0100
137 --- src/memline.c 2011-01-16 00:15:47.000000000 +0100
140 process_still_running
141 ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
143 ! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL);
145 # if defined(UNIX) || defined(__EMX__) || defined(VMS)
146 if (process_still_running && choice >= 4)
148 process_still_running
149 ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
151 ! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
153 # if defined(UNIX) || defined(__EMX__) || defined(VMS)
154 if (process_still_running && choice >= 4)
155 *** ../vim-7.3.101/src/message.c 2011-01-04 19:25:46.000000000 +0100
156 --- src/message.c 2011-01-17 19:57:30.000000000 +0100
162 ! do_dialog(type, title, message, buttons, dfltbutton, textfield)
164 char_u *title UNUSED;
170 ! do_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd)
172 char_u *title UNUSED;
178 char_u *textfield UNUSED; /* IObuff for inputdialog(), NULL
180 + int ex_cmd; /* when TRUE pressing : accepts default and starts
187 if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL)
189 c = gui_mch_dialog(type, title, message, buttons, dfltbutton,
191 /* avoid a hit-enter prompt without clearing the cmdline */
192 need_wait_return = FALSE;
193 emsg_on_display = FALSE;
195 if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL)
197 c = gui_mch_dialog(type, title, message, buttons, dfltbutton,
198 ! textfield, ex_cmd);
199 /* avoid a hit-enter prompt without clearing the cmdline */
200 need_wait_return = FALSE;
201 emsg_on_display = FALSE;
205 default: /* Could be a hotkey? */
206 if (c < 0) /* special keys are ignored here */
208 + if (c == ':' && ex_cmd)
210 + retval = dfltbutton;
211 + ins_char_typebuf(':');
215 /* Make the character lowercase, as chars in "hotkeys" are. */
221 title == NULL ? (char_u *)_("Question") : title,
223 ! (char_u *)_("&Yes\n&No"), dflt, NULL) == 1)
229 title == NULL ? (char_u *)_("Question") : title,
231 ! (char_u *)_("&Yes\n&No"), dflt, NULL, FALSE) == 1)
237 switch (do_dialog(type,
238 title == NULL ? (char_u *)_("Question") : title,
240 ! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL))
242 case 1: return VIM_YES;
243 case 2: return VIM_NO;
245 switch (do_dialog(type,
246 title == NULL ? (char_u *)_("Question") : title,
248 ! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL, FALSE))
250 case 1: return VIM_YES;
251 case 2: return VIM_NO;
254 title == NULL ? (char_u *)"Question" : title,
256 (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"),
259 case 1: return VIM_YES;
260 case 2: return VIM_NO;
262 title == NULL ? (char_u *)"Question" : title,
264 (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"),
265 ! dflt, NULL, FALSE))
267 case 1: return VIM_YES;
268 case 2: return VIM_NO;
269 *** ../vim-7.3.101/src/proto/message.pro 2010-10-20 21:22:17.000000000 +0200
270 --- src/proto/message.pro 2011-01-16 00:22:36.000000000 +0100
273 int verbose_open __ARGS((void));
274 void give_warning __ARGS((char_u *message, int hl));
275 void msg_advance __ARGS((int col));
276 ! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
277 void display_confirm_msg __ARGS((void));
278 int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt));
279 int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt));
281 int verbose_open __ARGS((void));
282 void give_warning __ARGS((char_u *message, int hl));
283 void msg_advance __ARGS((int col));
284 ! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
285 void display_confirm_msg __ARGS((void));
286 int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt));
287 int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt));
288 *** ../vim-7.3.101/src/gui_athena.c 2010-08-15 21:57:25.000000000 +0200
289 --- src/gui_athena.c 2011-01-16 00:18:47.000000000 +0100
295 ! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
300 int dfltbutton UNUSED;
309 ! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd)
314 int dfltbutton UNUSED;
320 *** ../vim-7.3.101/src/gui_gtk.c 2010-12-08 13:11:15.000000000 +0100
321 --- src/gui_gtk.c 2011-01-16 00:24:44.000000000 +0100
324 char_u *message, /* message text */
325 char_u *buttons, /* names of buttons */
326 int def_but, /* default button */
327 ! char_u *textfield) /* text for textfield or NULL */
330 GtkWidget *entry = NULL;
332 char_u *message, /* message text */
333 char_u *buttons, /* names of buttons */
334 int def_but, /* default button */
335 ! char_u *textfield, /* text for textfield or NULL */
339 GtkWidget *entry = NULL;
340 *** ../vim-7.3.101/src/gui_mac.c 2010-09-21 17:34:26.000000000 +0200
341 --- src/gui_mac.c 2011-01-16 00:19:52.000000000 +0100
360 *** ../vim-7.3.101/src/gui_motif.c 2010-08-15 21:57:28.000000000 +0200
361 --- src/gui_motif.c 2011-01-16 00:20:14.000000000 +0100
367 ! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
371 char_u *button_names;
373 char_u *textfield; /* buffer of size IOSIZE */
381 ! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield, ex_cmd)
385 char_u *button_names;
387 char_u *textfield; /* buffer of size IOSIZE */
392 *** ../vim-7.3.101/src/gui_photon.c 2010-08-15 21:57:27.000000000 +0200
393 --- src/gui_photon.c 2011-01-16 00:20:28.000000000 +0100
402 char_u **button_array;
411 char_u **button_array;
412 *** ../vim-7.3.101/src/gui_w16.c 2010-08-15 21:57:28.000000000 +0200
413 --- src/gui_w16.c 2011-01-16 00:20:48.000000000 +0100
432 *** ../vim-7.3.101/src/gui_w32.c 2010-10-27 12:33:12.000000000 +0200
433 --- src/gui_w32.c 2011-01-16 00:21:08.000000000 +0100
441 WORD *p, *pdlgtemplate, *pnumitems;
450 WORD *p, *pdlgtemplate, *pnumitems;
452 *** ../vim-7.3.101/src/os_mswin.c 2010-12-17 20:23:56.000000000 +0100
453 --- src/os_mswin.c 2011-01-16 00:21:41.000000000 +0100
456 gui.starting ? (char_u *)_("Message") :
458 (char_u *)_("Error"),
459 ! p, (char_u *)_("&Ok"), 1, NULL);
464 gui.starting ? (char_u *)_("Message") :
466 (char_u *)_("Error"),
467 ! p, (char_u *)_("&Ok"), 1, NULL, FALSE);
471 *** ../vim-7.3.101/src/proto/gui_athena.pro 2010-08-15 21:57:28.000000000 +0200
472 --- src/proto/gui_athena.pro 2011-01-16 00:23:00.000000000 +0100
475 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
476 Window gui_x11_get_wid __ARGS((void));
477 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
478 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
479 /* vim: set ft=c : */
481 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
482 Window gui_x11_get_wid __ARGS((void));
483 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
484 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
485 /* vim: set ft=c : */
486 *** ../vim-7.3.101/src/proto/gui_gtk.pro 2010-08-15 21:57:28.000000000 +0200
487 --- src/proto/gui_gtk.pro 2011-01-16 00:22:57.000000000 +0100
490 void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
491 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
492 char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir));
493 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield));
494 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
495 void gui_make_popup __ARGS((char_u *path_name, int mouse_pos));
496 void gui_mch_find_dialog __ARGS((exarg_T *eap));
498 void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
499 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
500 char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir));
501 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield, int ex_cmd));
502 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
503 void gui_make_popup __ARGS((char_u *path_name, int mouse_pos));
504 void gui_mch_find_dialog __ARGS((exarg_T *eap));
505 *** ../vim-7.3.101/src/proto/gui_mac.pro 2010-08-15 21:57:28.000000000 +0200
506 --- src/proto/gui_mac.pro 2011-01-16 00:31:46.000000000 +0100
509 int gui_mch_get_mouse_y __ARGS((void));
510 void gui_mch_setmouse __ARGS((int x, int y));
511 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
512 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
513 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
514 void gui_mch_set_foreground __ARGS((void));
515 void gui_mch_show_tabline __ARGS((int showit));
517 int gui_mch_get_mouse_y __ARGS((void));
518 void gui_mch_setmouse __ARGS((int x, int y));
519 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
520 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
521 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
522 void gui_mch_set_foreground __ARGS((void));
523 void gui_mch_show_tabline __ARGS((int showit));
524 *** ../vim-7.3.101/src/proto/gui_motif.pro 2010-08-15 21:57:28.000000000 +0200
525 --- src/proto/gui_motif.pro 2011-01-16 00:22:58.000000000 +0100
528 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
529 Window gui_x11_get_wid __ARGS((void));
530 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
531 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield));
532 void gui_mch_enable_footer __ARGS((int showit));
533 void gui_mch_set_footer __ARGS((char_u *s));
534 void gui_mch_show_toolbar __ARGS((int showit));
536 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
537 Window gui_x11_get_wid __ARGS((void));
538 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
539 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield, int ex_cmd));
540 void gui_mch_enable_footer __ARGS((int showit));
541 void gui_mch_set_footer __ARGS((char_u *s));
542 void gui_mch_show_toolbar __ARGS((int showit));
543 *** ../vim-7.3.101/src/proto/gui_photon.pro 2010-08-15 21:57:28.000000000 +0200
544 --- src/proto/gui_photon.pro 2011-01-16 00:32:33.000000000 +0100
547 void gui_mch_update __ARGS((void));
548 int gui_mch_wait_for_chars __ARGS((int wtime));
549 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter));
550 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield));
551 int gui_mch_get_winpos __ARGS((int *x, int *y));
552 void gui_mch_set_winpos __ARGS((int x, int y));
553 void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
555 void gui_mch_update __ARGS((void));
556 int gui_mch_wait_for_chars __ARGS((int wtime));
557 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter));
558 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield, int ex_cmd));
559 int gui_mch_get_winpos __ARGS((int *x, int *y));
560 void gui_mch_set_winpos __ARGS((int x, int y));
561 void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
562 *** ../vim-7.3.101/src/proto/gui_w16.pro 2010-08-15 21:57:28.000000000 +0200
563 --- src/proto/gui_w16.pro 2011-01-16 00:34:36.000000000 +0100
566 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
567 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
568 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
569 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
570 void gui_mch_set_foreground __ARGS((void));
571 /* vim: set ft=c : */
573 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
574 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
575 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
576 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
577 void gui_mch_set_foreground __ARGS((void));
578 /* vim: set ft=c : */
579 *** ../vim-7.3.101/src/proto/gui_w32.pro 2010-08-15 21:57:28.000000000 +0200
580 --- src/proto/gui_w32.pro 2011-01-16 00:33:12.000000000 +0100
583 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
584 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
585 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
586 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
587 void gui_mch_set_foreground __ARGS((void));
588 void gui_mch_drawsign __ARGS((int row, int col, int typenr));
589 void *gui_mch_register_sign __ARGS((char_u *signfile));
591 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
592 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
593 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
594 ! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
595 void gui_mch_set_foreground __ARGS((void));
596 void gui_mch_drawsign __ARGS((int row, int col, int typenr));
597 void *gui_mch_register_sign __ARGS((char_u *signfile));
598 *** ../vim-7.3.101/src/version.c 2011-01-17 19:53:20.000000000 +0100
599 --- src/version.c 2011-01-17 20:05:02.000000000 +0100
603 { /* Add new patch number below this line */
609 hundred-and-one symptoms of being an internet addict:
610 110. You actually volunteer to become your employer's webmaster.
612 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
613 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
614 \\\ an exciting new programming language -- http://www.Zimbu.org ///
615 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///