]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.102 v7.3.102
authorBram Moolenaar <Bram@vim.org>
Mon, 17 Jan 2011 19:08:11 +0000 (20:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 17 Jan 2011 19:08:11 +0000 (20:08 +0100)
Problem:    When using ":make", typing the next command and then getting the
            "reload" prompt the next command is (partly) eaten by the reload
            prompt.
Solution:   Accept ':' as a special character at the reload prompt to accept
            the default choice and execute the command.

23 files changed:
src/eval.c
src/fileio.c
src/gui.c
src/gui_athena.c
src/gui_gtk.c
src/gui_mac.c
src/gui_motif.c
src/gui_photon.c
src/gui_w16.c
src/gui_w32.c
src/gui_xmdlg.c
src/memline.c
src/message.c
src/os_mswin.c
src/proto/gui_athena.pro
src/proto/gui_gtk.pro
src/proto/gui_mac.pro
src/proto/gui_motif.pro
src/proto/gui_photon.pro
src/proto/gui_w16.pro
src/proto/gui_w32.pro
src/proto/message.pro
src/version.c

index a73731198b642967d0958a4f90ee0a569360aa57..a46789fdf0567f3eab76a3961bd8ff1e9e93d3e1 100644 (file)
@@ -9323,7 +9323,7 @@ f_confirm(argvars, rettv)
 
     if (!error)
        rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
-                                                                  def, NULL);
+                                                           def, NULL, FALSE);
 #endif
 }
 
@@ -12744,7 +12744,7 @@ f_inputdialog(argvars, rettv)
            IObuff[0] = NUL;
        if (message != NULL && defstr != NULL
                && do_dialog(VIM_QUESTION, NULL, message,
-                               (char_u *)_("&OK\n&Cancel"), 1, IObuff) == 1)
+                         (char_u *)_("&OK\n&Cancel"), 1, IObuff, FALSE) == 1)
            rettv->vval.v_string = vim_strsave(IObuff);
        else
        {
index fcfb8cd308005a5d4548b6d6d15e1a10e975ad1e..0c7b00c2c31f781a1fd6cfafa0f5ed6b0c7d5288 100644 (file)
@@ -7008,7 +7008,7 @@ buf_check_timestamp(buf, focus)
                    STRCAT(tbuf, mesg2);
                }
                if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf,
-                               (char_u *)_("&OK\n&Load File"), 1, NULL) == 2)
+                         (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2)
                    reload = TRUE;
            }
            else
index 89d8d5a883684ae0bbbf3a4bae1ae486e6a2ce04..041d6339c4a40a58408ef72f559c742b60eb1146 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -4903,7 +4903,7 @@ display_errors()
                if (STRLEN(p) > 2000)
                    STRCPY(p + 2000 - 14, "...(truncated)");
                (void)do_dialog(VIM_ERROR, (char_u *)_("Error"),
-                                             p, (char_u *)_("&Ok"), 1, NULL);
+                                      p, (char_u *)_("&Ok"), 1, NULL, FALSE);
                break;
            }
        ga_clear(&error_ga);
index 7cd08c6e36a7e001fb0d83a61725b05531dfe167..c8d8e98df00d261722b742c30333306255eee381 100644 (file)
@@ -2117,13 +2117,14 @@ dialog_wm_handler(w, client_data, event, dum)
 }
 
     int
-gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
+gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd)
     int                type UNUSED;
     char_u     *title;
     char_u     *message;
     char_u     *buttons;
     int                dfltbutton UNUSED;
     char_u     *textfield;
+    int                ex_cmd UNUSED;
 {
     char_u             *buts;
     char_u             *p, *next;
index b95f46a7f9c37bcac029559ed71a934b39308e68..94cebd471b6d1d064bdf3bd7841e7e40e2a9cdb4 100644 (file)
@@ -1268,7 +1268,8 @@ gui_mch_dialog(int        type,       /* type of dialog */
               char_u   *message,   /* message text */
               char_u   *buttons,   /* names of buttons */
               int      def_but,    /* default button */
-              char_u   *textfield) /* text for textfield or NULL */
+              char_u   *textfield, /* text for textfield or NULL */
+              int      ex_cmd UNUSED)
 {
     GtkWidget  *dialog;
     GtkWidget  *entry = NULL;
index 2fcd8a209b22f229bfd3fbd6d26a5111c37dc8b8..4357c89250d0715659f7e47a26e45bf919149cd5 100644 (file)
@@ -5583,7 +5583,8 @@ gui_mch_dialog(
     char_u     *message,
     char_u     *buttons,
     int                dfltbutton,
-    char_u     *textfield)
+    char_u     *textfield,
+    int                ex_cmd)
 {
     Handle     buttonDITL;
     Handle     iconDITL;
index 51e6112ccd2004ce0e80479e67e5e28d51c0b7ac..7cac8ee6a231c2dfa5baa4862b89e3ec510b783c 100644 (file)
@@ -2549,13 +2549,14 @@ create_pixmap_label(parent, name, data, args, arg)
 #endif
 
     int
-gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
+gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield, ex_cmd)
     int                type UNUSED;
     char_u     *title;
     char_u     *message;
     char_u     *button_names;
     int                dfltbutton;
     char_u     *textfield;             /* buffer of size IOSIZE */
+    int                ex_cmd UNUSED;
 {
     char_u             *buts;
     char_u             *p, *next;
index 42b124281a239472136874140a76e3cf88a862b3..d9017989abd6f83a42f79bee1476a81ce7fa1a3d 100644 (file)
@@ -1502,7 +1502,8 @@ gui_mch_dialog(
        char_u  *message,
        char_u  *buttons,
        int     default_button,
-       char_u  *textfield)
+       char_u  *textfield,
+       int     ex_cmd)
 {
     char_u     *str;
     char_u     **button_array;
index 68667846b9d9bc813818652ebe447b68a222fd7e..5ef8c103124745c2a56a7af9587b6b6a82cb297d 100644 (file)
@@ -1098,7 +1098,8 @@ gui_mch_dialog(
     char_u     *message,
     char_u     *buttons,
     int                 dfltbutton,
-    char_u     *textfield)
+    char_u     *textfield,
+    int                ex_cmd)
 {
     FARPROC    dp;
     LPWORD     p, pnumitems;
index f3b9c5bb68b4508e32c7bf1cf897cc89640647a9..cdb1abb58321d676fcd7316ad05301440144e161 100644 (file)
@@ -3005,7 +3005,8 @@ gui_mch_dialog(
     char_u     *message,
     char_u     *buttons,
     int                 dfltbutton,
-    char_u     *textfield)
+    char_u     *textfield,
+    int                ex_cmd)
 {
     WORD       *p, *pdlgtemplate, *pnumitems;
     DWORD      *dwp;
index 1ae755e822f5fbe2609e2b89d0588e2a5c3cb43c..73142e28c90b2ea884c1164ff13fd7c12f7944f8 100644 (file)
@@ -688,7 +688,7 @@ do_choice(Widget w,
            do_dialog(VIM_ERROR,
                    (char_u *)_("Error"),
                    (char_u *)_("Invalid font specification"),
-                   (char_u *)_("&Dismiss"), 1, NULL);
+                   (char_u *)_("&Dismiss"), 1, NULL, FALSE);
 
        return True;
     }
@@ -807,7 +807,7 @@ ok_callback(Widget w UNUSED,
        do_dialog(VIM_ERROR,
                (char_u *)_("Error"),
                (char_u *)_("Invalid font specification"),
-               (char_u *)_("&Dismiss"), 1, NULL);
+               (char_u *)_("&Dismiss"), 1, NULL, FALSE);
        XFreeFontNames(name);
     }
     else
index 0beaf54722c85523d17951643cbab90c199b6491..410b1161b6886d9b9988b7bdf4859225d59a9cba 100644 (file)
@@ -4516,7 +4516,7 @@ findswapname(buf, dirp, old_fname)
                                    process_still_running
                                        ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
 # endif
-                                       (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL);
+                                       (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
 
 # if defined(UNIX) || defined(__EMX__) || defined(VMS)
                        if (process_still_running && choice >= 4)
index 930fca117cb441710175abfc587adca1f0afba2e..00947250489cdde4ec8bc121d6618dbfc0be1652 100644 (file)
@@ -3315,7 +3315,7 @@ msg_advance(col)
  * different letter.
  */
     int
-do_dialog(type, title, message, buttons, dfltbutton, textfield)
+do_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd)
     int                type UNUSED;
     char_u     *title UNUSED;
     char_u     *message;
@@ -3323,6 +3323,8 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield)
     int                dfltbutton;
     char_u     *textfield UNUSED;      /* IObuff for inputdialog(), NULL
                                           otherwise */
+    int                ex_cmd;     /* when TRUE pressing : accepts default and starts
+                              Ex command */
 {
     int                oldState;
     int                retval = 0;
@@ -3341,7 +3343,7 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield)
     if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL)
     {
        c = gui_mch_dialog(type, title, message, buttons, dfltbutton,
-                                                                  textfield);
+                                                          textfield, ex_cmd);
        /* avoid a hit-enter prompt without clearing the cmdline */
        need_wait_return = FALSE;
        emsg_on_display = FALSE;
@@ -3388,6 +3390,13 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield)
            default:            /* Could be a hotkey? */
                if (c < 0)      /* special keys are ignored here */
                    continue;
+               if (c == ':' && ex_cmd)
+               {
+                   retval = dfltbutton;
+                   ins_char_typebuf(':');
+                   break;
+               }
+
                /* Make the character lowercase, as chars in "hotkeys" are. */
                c = MB_TOLOWER(c);
                retval = 1;
@@ -3661,7 +3670,7 @@ vim_dialog_yesno(type, title, message, dflt)
     if (do_dialog(type,
                title == NULL ? (char_u *)_("Question") : title,
                message,
-               (char_u *)_("&Yes\n&No"), dflt, NULL) == 1)
+               (char_u *)_("&Yes\n&No"), dflt, NULL, FALSE) == 1)
        return VIM_YES;
     return VIM_NO;
 }
@@ -3676,7 +3685,7 @@ vim_dialog_yesnocancel(type, title, message, dflt)
     switch (do_dialog(type,
                title == NULL ? (char_u *)_("Question") : title,
                message,
-               (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL))
+               (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL, FALSE))
     {
        case 1: return VIM_YES;
        case 2: return VIM_NO;
@@ -3695,7 +3704,7 @@ vim_dialog_yesnoallcancel(type, title, message, dflt)
                title == NULL ? (char_u *)"Question" : title,
                message,
                (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"),
-                                                                 dflt, NULL))
+                                                          dflt, NULL, FALSE))
     {
        case 1: return VIM_YES;
        case 2: return VIM_NO;
index 0b9dfd91e53a7cb33ef93f9bd65f15d7d1eb039f..8be2d40afcf2a81454e94afae01901252256aef6 100644 (file)
@@ -593,7 +593,7 @@ display_errors()
                                     gui.starting ? (char_u *)_("Message") :
 #endif
                                             (char_u *)_("Error"),
-                                    p, (char_u *)_("&Ok"), 1, NULL);
+                                    p, (char_u *)_("&Ok"), 1, NULL, FALSE);
                break;
            }
        ga_clear(&error_ga);
index 353c33b0753b19a1b3baa125c41397faf24574b3..efc8e40d3c039e6a2b9a2d24018fdc64ae5d5fc0 100644 (file)
@@ -27,5 +27,5 @@ void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
 Window gui_x11_get_wid __ARGS((void));
 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
+int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
 /* vim: set ft=c : */
index 8b883582ad43d259395c448988dd492eea604c8a..2bff89be72520cad1764759ba3fa98b920f49f8d 100644 (file)
@@ -13,7 +13,7 @@ void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
 void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
 char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield));
+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));
 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
 void gui_make_popup __ARGS((char_u *path_name, int mouse_pos));
 void gui_mch_find_dialog __ARGS((exarg_T *eap));
index ba6e2ad42d1067af08b7a0d6e2a93a66abf5e872..2010f978c62face8b5fa63c7c46f39da3d9fa60c 100644 (file)
@@ -81,7 +81,7 @@ int gui_mch_get_mouse_x __ARGS((void));
 int gui_mch_get_mouse_y __ARGS((void));
 void gui_mch_setmouse __ARGS((int x, int y));
 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
+int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
 void gui_mch_set_foreground __ARGS((void));
 void gui_mch_show_tabline __ARGS((int showit));
index 3e08ec9dbd8bcc0ebf745dd988eb48f0067ecd82..e455f0161b5a9bec74417a4ec5067ace4f9f0cea 100644 (file)
@@ -29,7 +29,7 @@ void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
 void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
 Window gui_x11_get_wid __ARGS((void));
 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield));
+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));
 void gui_mch_enable_footer __ARGS((int showit));
 void gui_mch_set_footer __ARGS((char_u *s));
 void gui_mch_show_toolbar __ARGS((int showit));
index 6a3ff04b72ccb8791db9e7e54b859594c83156bd..0a5041e50631f4519ddf6a9f0aa067ba90a38dbc 100644 (file)
@@ -8,7 +8,7 @@ void gui_mch_exit __ARGS((int rc));
 void gui_mch_update __ARGS((void));
 int gui_mch_wait_for_chars __ARGS((int wtime));
 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield));
+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));
 int gui_mch_get_winpos __ARGS((int *x, int *y));
 void gui_mch_set_winpos __ARGS((int x, int y));
 void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
index 0f82c5afe6a16c92598fd41830f275862719cc3f..c8cb06590de496ce442fe8250af7c972b795d11a 100644 (file)
@@ -74,6 +74,6 @@ void gui_make_popup __ARGS((char_u *path_name, int mouse_pos));
 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
+int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
 void gui_mch_set_foreground __ARGS((void));
 /* vim: set ft=c : */
index 657a4c65b4f6a9fe997101406895837b90bda3a6..49690b03e4dc610140fddfb1bbf12beb23c83b97 100644 (file)
@@ -81,7 +81,7 @@ void gui_make_tearoff __ARGS((char_u *path_name));
 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
-int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
+int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
 void gui_mch_set_foreground __ARGS((void));
 void gui_mch_drawsign __ARGS((int row, int col, int typenr));
 void *gui_mch_register_sign __ARGS((char_u *signfile));
index a752ddcf56b759b85dc9cf3bba7482ceeb1a24b4..c59a9165f42aada1ae223cdecfc6e9af661aa18b 100644 (file)
@@ -64,7 +64,7 @@ void verbose_stop __ARGS((void));
 int verbose_open __ARGS((void));
 void give_warning __ARGS((char_u *message, int hl));
 void msg_advance __ARGS((int col));
-int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
+int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
 void display_confirm_msg __ARGS((void));
 int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt));
 int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt));
index abe414ba0d3c4c708cfecf465ed0888942f94a0d..3f6a8a1405adafcb33d202a3524de38f4d2d668a 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    102,
 /**/
     101,
 /**/