]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0966: 'shortmess' flag "n" not used in two places v8.2.0966
authorBram Moolenaar <Bram@vim.org>
Fri, 12 Jun 2020 20:31:00 +0000 (22:31 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 12 Jun 2020 20:31:00 +0000 (22:31 +0200)
Problem:    'shortmess' flag "n" not used in two places.
Solution:   Make use of the "n" flag consistent. (Nick Jensen, closes #6245,
            closes #6244)

src/buffer.c
src/bufwrite.c
src/fileio.c
src/proto/bufwrite.pro
src/testdir/dumps/Test_popup_textprop_corn_5.dump
src/testdir/dumps/Test_start_with_tabs.dump
src/version.c

index 66b0050a65f029039d5f6c7d676f071ab73e6660..f928412e85cbffd018236d6901a4f69488538841 100644 (file)
@@ -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]")) : "",
index f1895518b39f456f0c9917f804664d3864878f9c..4be48e28e084e4afe226eadde0456492306de76a 100644 (file)
@@ -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)
index 06a4c51a3a21a7664521e22162a18f56e4b4e420..3896ba8a63ce8729e4d9021257fa39fec98e44de 100644 (file)
@@ -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);
index 5d7b4a2a7ace83cfe3a91e391b13b31ffffafb15..72c08daf3917513818a9aa928e3b93be47468f28 100644 (file)
@@ -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 : */
index c79e8986a3fef65b85a0b1ce29a02eca76226741..59bae7845ff0b76c6569dbb26c8597186837e7a8 100644 (file)
@@ -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
index 5490805c822b9a0bb761698582eae70dfbbd8b65..06594663dc437d7543edbcbf3d125fe2c7e410ee 100644 (file)
@@ -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| 
index bc4cc43f2e5d39995656740a080c44839658e932..fc2269c2d90a9695c4bc12bc6db20da2ed49b39d 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    966,
 /**/
     965,
 /**/