# HG changeset patch # User Bram Moolenaar # Date 1558710005 -7200 # Node ID 8b92f3fea4775eef9978b76bcd6cf346b0a3b815 # Parent d0d3759cbd4d868efa53ffcad8ee3b9c4a8d7c33 patch 8.1.1379: filechanged test hangs commit https://github.com/vim/vim/commit/8239c62067c8d40720560496b25a82662126f2a2 Author: Bram Moolenaar Date: Fri May 24 16:46:01 2019 +0200 patch 8.1.1379: filechanged test hangs Problem: Filechanged test hangs. Solution: Do not check 'autoread'. diff --git a/src/fileio.c b/src/fileio.c --- a/src/fileio.c +++ b/src/fileio.c @@ -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; } diff --git a/src/testdir/test_filechanged.vim b/src/testdir/test_filechanged.vim --- a/src/testdir/test_filechanged.vim +++ b/src/testdir/test_filechanged.vim @@ -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') diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1379, +/**/ 1378, /**/ 1377,