summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-15 15:09:29 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-15 15:09:29 +0100
commit426dd0219512af5f4abeb0901b533159253ffba3 (patch)
tree515e63551f20af6f51a2723c4d47ae7ca4c76cbc
parente27dba499aaaf2ffe9f0da45f062450b434cddaa (diff)
patch 7.4.1570v7.4.1570
Problem: There is no way to avoid the message when editing a file. Solution: Add the "F" flag to 'shortmess'. (Shougo, closes #686)
-rw-r--r--runtime/doc/options.txt4
-rw-r--r--src/buffer.c5
-rw-r--r--src/ex_cmds.c6
-rw-r--r--src/option.h3
-rw-r--r--src/version.c2
5 files changed, 16 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 0396011e7b..024e621e5d 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -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
diff --git a/src/buffer.c b/src/buffer.c
index 9ef8a50822..543b4a7078 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 6461c3c08f..ae88cc69e8 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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;
}
diff --git a/src/option.h b/src/option.h
index 6b194bc0d1..460e30084a 100644
--- a/src/option.h
+++ b/src/option.h
@@ -214,7 +214,8 @@
#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 */
diff --git a/src/version.c b/src/version.c
index 5695515f55..f6b1f3baa8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1570,
+/**/
1569,
/**/
1568,