]> granicus.if.org Git - vim/commitdiff
patch 7.4.1570 v7.4.1570
authorBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2016 14:09:29 +0000 (15:09 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2016 14:09:29 +0000 (15:09 +0100)
Problem:    There is no way to avoid the message when editing a file.
Solution:   Add the "F" flag to 'shortmess'. (Shougo, closes #686)

runtime/doc/options.txt
src/buffer.c
src/ex_cmds.c
src/option.h
src/version.c

index 0396011e7b4e4b916ae1fb1f28da65142f80d451..024e621e5dbabc23d0ed2905992e8e162a8f61da 100644 (file)
@@ -6533,7 +6533,9 @@ A jump table for the options with a short description can be found at |Q_op|.
          c     don't give |ins-completion-menu| messages.  For example,
                "-- XXX completion (YYY)", "match 1 of 2", "The only match",
                "Pattern not found", "Back at original", etc.
-         q     use "recording" instead of "recording @a"
+         q     use "recording" instead of "recording @a"
+         F     don't give the file info when editing a file, like `:silent`
+               was used for the command
 
        This gives you the opportunity to avoid that a change between buffers
        requires you to hit <Enter>, but still gives as useful a message as
index 9ef8a5082262f08cfb678383410d20626a12bdc7..543b4a7078fbf7ccdcf5f94378e926c0ed2a6e85 100644 (file)
@@ -139,14 +139,19 @@ open_buffer(
 #endif
        )
     {
+       int old_msg_silent = msg_silent;
+
 #ifdef FEAT_NETBEANS_INTG
        int oldFire = netbeansFireChanges;
 
        netbeansFireChanges = 0;
 #endif
+       if (shortmess(SHM_FILEINFO))
+           msg_silent = 1;
        retval = readfile(curbuf->b_ffname, curbuf->b_fname,
                  (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap,
                  flags | READ_NEW);
+       msg_silent = old_msg_silent;
 #ifdef FEAT_NETBEANS_INTG
        netbeansFireChanges = oldFire;
 #endif
index 6461c3c08f70afad53238228cc76f87e1ec32f08..ae88cc69e869e9b3e66df2f2117b9a60f76b0d9e 100644 (file)
@@ -2605,7 +2605,8 @@ ex_file(exarg_T *eap)
            return;
     }
     /* print full file name if :cd used */
-    fileinfo(FALSE, FALSE, eap->forceit);
+    if (!shortmess(SHM_FILEINFO))
+       fileinfo(FALSE, FALSE, eap->forceit);
 }
 
 /*
@@ -3884,7 +3885,8 @@ do_ecmd(
        msg_scroll = msg_scroll_save;
        msg_scrolled_ign = TRUE;
 
-       fileinfo(FALSE, TRUE, FALSE);
+       if (!shortmess(SHM_FILEINFO))
+           fileinfo(FALSE, TRUE, FALSE);
 
        msg_scrolled_ign = FALSE;
     }
index 6b194bc0d1d1222d904e6a0b6102a3a784eb91c2..460e30084afd7d141878536e9b497f666e8e0b29 100644 (file)
 #define SHM_INTRO      'I'             /* intro messages */
 #define SHM_COMPLETIONMENU  'c'                /* completion menu messages */
 #define SHM_RECORDING  'q'             /* short recording message */
-#define SHM_ALL                "rmfixlnwaWtToOsAIcq" /* all possible flags for 'shm' */
+#define SHM_FILEINFO   'F'             /* no file info messages */
+#define SHM_ALL                "rmfixlnwaWtToOsAIcqF" /* all possible flags for 'shm' */
 
 /* characters for p_go: */
 #define GO_ASEL                'a'             /* autoselect */
index 5695515f55d85400da9b510e588097861377aa93..f6b1f3baa8822f26286a352ba8ab6912b4f5cb3b 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1570,
 /**/
     1569,
 /**/