]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-223 v7.2.223
authorBram Moolenaar <Bram@vim.org>
Thu, 9 Jul 2009 13:55:43 +0000 (13:55 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 9 Jul 2009 13:55:43 +0000 (13:55 +0000)
runtime/doc/various.txt
src/ex_cmds.h
src/ex_docmd.c
src/version.c

index cf4b0c6bcd5596cddd148f95f4a2fe1e1de56a21..ffb9f2682ba2fdc9e7d5d004038f6b6329786113 100644 (file)
@@ -508,6 +508,17 @@ N  *+X11*          Unix only: can restore window title |X11|
                        messages though.  Use ":silent" in the command itself
                        to avoid that: ":silent menu .... :silent command".
 
+                                               *:uns* *:unsilent*
+:uns[ilent] {command}  Execute {command} not silently.  Only makes a
+                       difference when |:silent| was used to get to this
+                       command.
+                       Use this for giving a message even when |:silent| was
+                       used.  In this example |:silent| is used to avoid the
+                       message about reading the file and |:unsilent| to be
+                       able to list the first line of each file. >
+               :silent argdo unsilent echo expand('%') . ": " . getline(1)
+<
+
                                                *:verb* *:verbose*
 :[count]verb[ose] {command}
                        Execute {command} with 'verbose' set to [count].  If
index 49167505c6e2a54e6fce7c8378150e7209f43668..bf66b406193cccf793e01fda4be65ca214d2f3ac 100644 (file)
@@ -991,6 +991,8 @@ EX(CMD_unmap,               "unmap",        ex_unmap,
                        BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
 EX(CMD_unmenu,         "unmenu",       ex_menu,
                        BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
+EX(CMD_unsilent,       "unsilent",     ex_wrongmodifier,
+                       NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN),
 EX(CMD_update,         "update",       ex_update,
                        RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR),
 EX(CMD_vglobal,                "vglobal",      ex_global,
index 47c460cef417daa80058bdb5defde4ae6a42f61d..627e5f88d57ff378e48b21117733cf4c6f0526c0 100644 (file)
@@ -1677,8 +1677,8 @@ do_one_cmd(cmdlinep, sourcing,
     char_u             *errormsg = NULL;       /* error message */
     exarg_T            ea;                     /* Ex command arguments */
     long               verbose_save = -1;
-    int                        save_msg_scroll = 0;
-    int                        did_silent = 0;
+    int                        save_msg_scroll = msg_scroll;
+    int                        save_msg_silent = -1;
     int                        did_esilent = 0;
 #ifdef HAVE_SANDBOX
     int                        did_sandbox = FALSE;
@@ -1856,9 +1856,9 @@ do_one_cmd(cmdlinep, sourcing,
                        }
                        if (!checkforcmd(&ea.cmd, "silent", 3))
                            break;
-                       ++did_silent;
+                       if (save_msg_silent == -1)
+                           save_msg_silent = msg_silent;
                        ++msg_silent;
-                       save_msg_scroll = msg_scroll;
                        if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1]))
                        {
                            /* ":silent!", but not "silent !cmd" */
@@ -1886,6 +1886,13 @@ do_one_cmd(cmdlinep, sourcing,
 #endif
                        continue;
 
+           case 'u':   if (!checkforcmd(&ea.cmd, "unsilent", 3))
+                           break;
+                       if (save_msg_silent == -1)
+                           save_msg_silent = msg_silent;
+                       msg_silent = 0;
+                       continue;
+
            case 'v':   if (checkforcmd(&ea.cmd, "vertical", 4))
                        {
 #ifdef FEAT_VERTSPLIT
@@ -2684,13 +2691,12 @@ doend:
 
     cmdmod = save_cmdmod;
 
-    if (did_silent > 0)
+    if (save_msg_silent != -1)
     {
        /* messages could be enabled for a serious error, need to check if the
         * counters don't become negative */
-       msg_silent -= did_silent;
-       if (msg_silent < 0)
-           msg_silent = 0;
+       if (!did_emsg)
+           msg_silent = save_msg_silent;
        emsg_silent -= did_esilent;
        if (emsg_silent < 0)
            emsg_silent = 0;
@@ -2987,6 +2993,7 @@ static struct cmdmod
     {"silent", 3, FALSE},
     {"tab", 3, TRUE},
     {"topleft", 2, FALSE},
+    {"unsilent", 3, FALSE},
     {"verbose", 4, TRUE},
     {"vertical", 4, FALSE},
 };
index 3a9524256241924f76612c1641de3abc97f57d89..fb0c3435b0db92b22f71259bb376e7caad552f5d 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    223,
 /**/
     222,
 /**/