patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'

Commit: 
https://github.com/vim/vim/commit/9db39b0ec90600bb41faec3a12b934b17c298b1f
Author: Shougo Matsushita <[email protected]>
Date:   Wed Mar 6 20:58:41 2024 +0100

    patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'
    
    Problem:  shm=F not respected when reloading buffer with 'autoread'
    Solution: Check SHM_FILEINFO in buf_check_timestamp()
              (Shougo Matsushita)
    
    closes: #14144
    
    Signed-off-by: Shougo Matsushita <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index e38aa81a8..9af7411d9 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2024 Mar 03
+*options.txt*  For Vim version 9.1.  Last change: 2024 Mar 06
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7253,7 +7253,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
          q     use "recording" instead of "recording @a"               *shm-q*
          F     don't give the file info when editing a file, like      *shm-F*
                `:silent` was used for the command; note that this also
-               affects messages from autocommands
+               affects messages from autocommands and 'autoread' reloading
          S     do not show search count message when searching, e.g.   *shm-S*
                "[1/5]"
 
diff --git a/src/fileio.c b/src/fileio.c
index d293d713d..344c819e7 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4294,7 +4294,7 @@ buf_check_timestamp(
 #endif
     }
 
-    if (mesg != NULL)
+    if (mesg != NULL && !shortmess(SHM_FILEINFO))
     {
        path = home_replace_save(buf, buf->b_fname);
        if (path != NULL)
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 908f0da12..fa65f5c19 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -1293,6 +1293,26 @@ func Test_shortmess_F2()
   call assert_fails('call test_getvalue("abc")', 'E475:')
 endfunc
 
+func Test_shortmess_F3()
+  defer delete('X_dummy')
+
+  set hidden
+  set autoread
+  e X_dummy
+  e file
+
+  set shortmess+=F
+  call writefile(["foo"], 'X_dummy')
+  call assert_true(empty(execute('bn', '')))
+  call assert_true(empty(execute('bn', '')))
+
+  set shortmess&
+  set autoread&
+  set hidden&
+  bwipe
+  bwipe
+endfunc
+
 func Test_local_scrolloff()
   set so=5
   set siso=7
diff --git a/src/version.c b/src/version.c
index 8ada6585d..0e02ea2aa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    154,
 /**/
     153,
 /**/

-- 
-- 
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/E1rhxfL-003ZCW-G1%40256bit.org.

Raspunde prin e-mail lui