Patch 8.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)
Files:      src/bufwrite.c, src/proto/bufwrite.pro, src/buffer.c,
            src/fileio.c, src/testdir/dumps/Test_popup_textprop_corn_5.dump,
            src/testdir/dumps/Test_start_with_tabs.dump


*** ../vim-8.2.0965/src/bufwrite.c      2019-12-15 12:54:14.464144568 +0100
--- src/bufwrite.c      2020-06-12 22:19:25.739848052 +0200
***************
*** 598,603 ****
--- 598,609 ----
  }
  #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,2353 ****
        }
        else if (newfile)
        {
!           STRCAT(IObuff, shortmess(SHM_NEW) ? _("[New]") : _("[New File]"));
            c = TRUE;
        }
        if (no_eol)
--- 2353,2359 ----
        }
        else if (newfile)
        {
!           STRCAT(IObuff, new_file_message());
            c = TRUE;
        }
        if (no_eol)
*** ../vim-8.2.0965/src/proto/bufwrite.pro      2019-12-12 12:55:37.000000000 
+0100
--- src/proto/bufwrite.pro      2020-06-12 22:20:35.783508033 +0200
***************
*** 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 : */
*** ../vim-8.2.0965/src/buffer.c        2020-06-10 21:46:56.387670023 +0200
--- src/buffer.c        2020-06-12 22:23:42.846772223 +0200
***************
*** 3651,3657 ****
  #ifdef FEAT_QUICKFIX
                    && !bt_dontwrite(curbuf)
  #endif
!                                       ? _("[New file]") : "",
            (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "",
            curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]")
                                                      : _("[readonly]")) : "",
--- 3651,3657 ----
  #ifdef FEAT_QUICKFIX
                    && !bt_dontwrite(curbuf)
  #endif
!                                          ? new_file_message() : "",
            (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "",
            curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]")
                                                      : _("[readonly]")) : "",
*** ../vim-8.2.0965/src/fileio.c        2020-06-10 15:55:33.355088114 +0200
--- src/fileio.c        2020-06-12 22:21:36.607213416 +0200
***************
*** 506,512 ****
                        }
                    }
                    if (dir_of_file_exists(fname))
!                       filemess(curbuf, sfname, (char_u *)_("[New File]"), 0);
                    else
                        filemess(curbuf, sfname,
                                           (char_u *)_("[New DIRECTORY]"), 0);
--- 506,513 ----
                        }
                    }
                    if (dir_of_file_exists(fname))
!                       filemess(curbuf, sfname,
!                                             (char_u *)new_file_message(), 0);
                    else
                        filemess(curbuf, sfname,
                                           (char_u *)_("[New DIRECTORY]"), 0);
*** ../vim-8.2.0965/src/testdir/dumps/Test_popup_textprop_corn_5.dump   
2019-08-29 19:57:17.000000000 +0200
--- src/testdir/dumps/Test_popup_textprop_corn_5.dump   2020-06-12 
22:25:04.634512005 +0200
***************
*** 9,12 ****
  |~+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
--- 9,12 ----
  |~+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|]| @63
*** ../vim-8.2.0965/src/testdir/dumps/Test_start_with_tabs.dump 2019-04-21 
15:51:45.000000000 +0200
--- src/testdir/dumps/Test_start_with_tabs.dump 2020-06-12 22:26:08.910295872 
+0200
***************
*** 17,20 ****
  |~| @73
  |~| @73
  |~| @73
! |"+0#0000000&|a|"| |[|N|e|w| |F|i|l|e|]| @42|0|,|0|-|1| @8|A|l@1| 
--- 17,20 ----
  |~| @73
  |~| @73
  |~| @73
! |"+0#0000000&|a|"| |[|N|e|w|]| @47|0|,|0|-|1| @8|A|l@1| 
*** ../vim-8.2.0965/src/version.c       2020-06-12 22:15:26.617016573 +0200
--- src/version.c       2020-06-12 22:30:34.429318901 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     966,
  /**/

-- 
DEAD PERSON:  I don't want to go in the cart!
CUSTOMER:     Oh, don't be such a baby.
MORTICIAN:    I can't take him...
DEAD PERSON:  I feel fine!
CUSTOMER:     Oh, do us a favor...
MORTICIAN:    I can't.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202006122031.05CKVPCJ418058%40masaka.moolenaar.net.

Raspunde prin e-mail lui