]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1379: filechanged test hangs v8.1.1379
authorBram Moolenaar <Bram@vim.org>
Fri, 24 May 2019 14:46:01 +0000 (16:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 24 May 2019 14:46:01 +0000 (16:46 +0200)
Problem:    Filechanged test hangs.
Solution:   Do not check 'autoread'.

src/fileio.c
src/testdir/test_filechanged.vim
src/version.c

index b6a37f522a56bf62d395a9a6d6c548588f84cc5b..57c5f47fc6898f8b3c5f42d18679b1c3c3359579 100644 (file)
@@ -6774,9 +6774,8 @@ buf_check_timestamp(
        // FileChangedShell autocmd)
        if (stat_res < 0)
        {
-           // When 'autoread' is set we'll check the file again to see if it
-           // re-appears.
-           buf->b_mtime = (buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar);
+           // Check the file again later to see if it re-appears.
+           buf->b_mtime = -1;
            buf->b_orig_size = 0;
            buf->b_orig_mode = 0;
        }
index ce786092f9f86ac6e898ba061c1e4e2a33f17247..a937bb8d102644ce1533ebd411e2fc41d4765feb 100644 (file)
@@ -115,8 +115,9 @@ func Test_file_changed_dialog()
   call assert_match('E211:', v:warningmsg)
   call assert_equal(2, line('$'))
   call assert_equal('extra line', getline(2))
+  let v:warningmsg = 'empty'
 
-  " Recreate buffer and reload
+  " change buffer, recreate the file and reload
   call setline(1, 'buffer is changed')
   silent !echo 'new line' >Xchanged_d
   call feedkeys('L', 'L')
index e544f9bd34aba852bd98e3edcda07f0c8a378040..60e6c82f418004f4eb17aad7cc9dc7492582c3f1 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1379,
 /**/
     1378,
 /**/