summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c2
-rw-r--r--src/bufwrite.c8
-rw-r--r--src/fileio.c3
-rw-r--r--src/proto/bufwrite.pro1
-rw-r--r--src/testdir/dumps/Test_popup_textprop_corn_5.dump2
-rw-r--r--src/testdir/dumps/Test_start_with_tabs.dump2
-rw-r--r--src/version.c2
7 files changed, 15 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 66b0050a6..f928412e8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3651,7 +3651,7 @@ fileinfo(
#ifdef FEAT_QUICKFIX
&& !bt_dontwrite(curbuf)
#endif
- ? _("[New file]") : "",
+ ? new_file_message() : "",
(curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "",
curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]")
: _("[readonly]")) : "",
diff --git a/src/bufwrite.c b/src/bufwrite.c
index f1895518b..4be48e28e 100644
--- a/src/bufwrite.c
+++ b/src/bufwrite.c
@@ -598,6 +598,12 @@ set_file_time(
}
#endif // UNIX
+ char *
+new_file_message(void)
+{
+ return shortmess(SHM_NEW) ? _("[New]") : _("[New File]");
+}
+
/*
* buf_write() - write to file "fname" lines "start" through "end"
*
@@ -2347,7 +2353,7 @@ restore_backup:
}
else if (newfile)
{
- STRCAT(IObuff, shortmess(SHM_NEW) ? _("[New]") : _("[New File]"));
+ STRCAT(IObuff, new_file_message());
c = TRUE;
}
if (no_eol)
diff --git a/src/fileio.c b/src/fileio.c
index 06a4c51a3..3896ba8a6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -506,7 +506,8 @@ readfile(
}
}
if (dir_of_file_exists(fname))
- filemess(curbuf, sfname, (char_u *)_("[New File]"), 0);
+ filemess(curbuf, sfname,
+ (char_u *)new_file_message(), 0);
else
filemess(curbuf, sfname,
(char_u *)_("[New DIRECTORY]"), 0);
diff --git a/src/proto/bufwrite.pro b/src/proto/bufwrite.pro
index 5d7b4a2a7..72c08daf3 100644
--- a/src/proto/bufwrite.pro
+++ b/src/proto/bufwrite.pro
@@ -1,3 +1,4 @@
/* bufwrite.c */
+char *new_file_message(void);
int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_T end, exarg_T *eap, int append, int forceit, int reset_changed, int filtering);
/* vim: set ft=c : */
diff --git a/src/testdir/dumps/Test_popup_textprop_corn_5.dump b/src/testdir/dumps/Test_popup_textprop_corn_5.dump
index c79e8986a..59bae7845 100644
--- a/src/testdir/dumps/Test_popup_textprop_corn_5.dump
+++ b/src/testdir/dumps/Test_popup_textprop_corn_5.dump
@@ -9,4 +9,4 @@
|~+0#4040ff13&| @35||+1#0000000&|5+0&&|3| @21|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0
|~+0#4040ff13&| @35||+1#0000000&|5+0&&|4| @34
|f+3&&|o@1| @15|0|,|0|-|1| @9|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|4|6|,|1| @10|4|8|%
-|"+0&&|f|o@1|"| |[|N|e|w| |F|i|l|e|]| @58
+|"+0&&|f|o@1|"| |[|N|e|w|]| @63
diff --git a/src/testdir/dumps/Test_start_with_tabs.dump b/src/testdir/dumps/Test_start_with_tabs.dump
index 5490805c8..06594663d 100644
--- a/src/testdir/dumps/Test_start_with_tabs.dump
+++ b/src/testdir/dumps/Test_start_with_tabs.dump
@@ -17,4 +17,4 @@
|~| @73
|~| @73
|~| @73
-|"+0#0000000&|a|"| |[|N|e|w| |F|i|l|e|]| @42|0|,|0|-|1| @8|A|l@1|
+|"+0#0000000&|a|"| |[|N|e|w|]| @47|0|,|0|-|1| @8|A|l@1|
diff --git a/src/version.c b/src/version.c
index bc4cc43f2..fc2269c2d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 966,
+/**/
965,
/**/
964,