Skip to content

Commit 722e505

Browse files
committed
patch 8.2.0966: 'shortmess' flag "n" not used in two places
Problem: 'shortmess' flag "n" not used in two places. Solution: Make use of the "n" flag consistent. (Nick Jensen, closes vim#6245, closes vim#6244)
1 parent 5055c56 commit 722e505

File tree

7 files changed

+15
-5
lines changed

7 files changed

+15
-5
lines changed

src/buffer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3651,7 +3651,7 @@ fileinfo(
36513651
#ifdef FEAT_QUICKFIX
36523652
&& !bt_dontwrite(curbuf)
36533653
#endif
3654-
? _("[New file]") : "",
3654+
? new_file_message() : "",
36553655
(curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "",
36563656
curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]")
36573657
: _("[readonly]")) : "",

src/bufwrite.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,12 @@ set_file_time(
598598
}
599599
#endif // UNIX
600600

601+
char *
602+
new_file_message(void)
603+
{
604+
return shortmess(SHM_NEW) ? _("[New]") : _("[New File]");
605+
}
606+
601607
/*
602608
* buf_write() - write to file "fname" lines "start" through "end"
603609
*
@@ -2347,7 +2353,7 @@ buf_write(
23472353
}
23482354
else if (newfile)
23492355
{
2350-
STRCAT(IObuff, shortmess(SHM_NEW) ? _("[New]") : _("[New File]"));
2356+
STRCAT(IObuff, new_file_message());
23512357
c = TRUE;
23522358
}
23532359
if (no_eol)

src/fileio.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ readfile(
506506
}
507507
}
508508
if (dir_of_file_exists(fname))
509-
filemess(curbuf, sfname, (char_u *)_("[New File]"), 0);
509+
filemess(curbuf, sfname,
510+
(char_u *)new_file_message(), 0);
510511
else
511512
filemess(curbuf, sfname,
512513
(char_u *)_("[New DIRECTORY]"), 0);

src/proto/bufwrite.pro

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/* bufwrite.c */
2+
char *new_file_message(void);
23
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);
34
/* vim: set ft=c : */

src/testdir/dumps/Test_popup_textprop_corn_5.dump

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
|~+0#4040ff13&| @35||+1#0000000&|5+0&&|3| @21|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0
1010
|~+0#4040ff13&| @35||+1#0000000&|5+0&&|4| @34
1111
|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|%
12-
|"+0&&|f|o@1|"| |[|N|e|w| |F|i|l|e|]| @58
12+
|"+0&&|f|o@1|"| |[|N|e|w|]| @63

src/testdir/dumps/Test_start_with_tabs.dump

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
|~| @73
1818
|~| @73
1919
|~| @73
20-
|"+0#0000000&|a|"| |[|N|e|w| |F|i|l|e|]| @42|0|,|0|-|1| @8|A|l@1|
20+
|"+0#0000000&|a|"| |[|N|e|w|]| @47|0|,|0|-|1| @8|A|l@1|

src/version.c

+2
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
966,
757759
/**/
758760
965,
759761
/**/

0 commit comments

Comments
 (0)