summaryrefslogtreecommitdiff
path: root/src/bufwrite.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-12 22:31:00 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-12 22:31:00 +0200
commit722e505d1a55dfde5ab62241d10da91d2e10c3c1 (patch)
treeb8de9ede4accb9e1fdcafa7a380347c1043ae186 /src/bufwrite.c
parent5055c56cfbedc6326c607d40c7a1241682f7675e (diff)
downloadvim-git-722e505d1a55dfde5ab62241d10da91d2e10c3c1.tar.gz
patch 8.2.0966: 'shortmess' flag "n" not used in two placesv8.2.0966
Problem: 'shortmess' flag "n" not used in two places. Solution: Make use of the "n" flag consistent. (Nick Jensen, closes #6245, closes #6244)
Diffstat (limited to 'src/bufwrite.c')
-rw-r--r--src/bufwrite.c8
1 files changed, 7 insertions, 1 deletions
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)