diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-03-08 06:53:43 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2024-03-08 07:04:39 +0800 |
| commit | c38764182a966f12b91bdc9b9ff6228621238483 (patch) | |
| tree | 3f115a3662f867f701f025f01c2ca50b524538ae /test | |
| parent | d741e5d1629948876cf8bdcacf6c8bc8a4924f94 (diff) | |
| download | rneovim-c38764182a966f12b91bdc9b9ff6228621238483.tar.gz rneovim-c38764182a966f12b91bdc9b9ff6228621238483.tar.bz2 rneovim-c38764182a966f12b91bdc9b9ff6228621238483.zip | |
vim-patch:9.1.0158: 'shortmess' "F" flag doesn't work properly with 'autoread'
Problem: 'shortmess' "F" flag doesn't work properly with 'autoread'
(after 9.1.0154)
Solution: Hide the file info message instead of the warning dialog
(zeertzjq)
closes: vim/vim#14159
closes: vim/vim#14158
https://github.com/vim/vim/commit/8a01744c563f615ae7f6b3ab7f5208214a45a8e2
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/autocmd/focus_spec.lua | 2 | ||||
| -rw-r--r-- | test/old/testdir/test_options.vim | 34 |
2 files changed, 27 insertions, 9 deletions
diff --git a/test/functional/autocmd/focus_spec.lua b/test/functional/autocmd/focus_spec.lua index b9bab206fc..4f4a036ba8 100644 --- a/test/functional/autocmd/focus_spec.lua +++ b/test/functional/autocmd/focus_spec.lua @@ -86,7 +86,7 @@ describe('autoread TUI FocusGained/FocusLost', function() line 3 | line 4 | {5:xtest-foo }| - "xtest-foo" 4L, 28B | + :edit xtest-foo | {3:-- TERMINAL --} | ]], } diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim index 97af202128..7786f82af2 100644 --- a/test/old/testdir/test_options.vim +++ b/test/old/testdir/test_options.vim @@ -1284,23 +1284,41 @@ func Test_shortmess_F2() endfunc func Test_shortmess_F3() - defer delete('X_dummy') + call writefile(['foo'], 'X_dummy', 'D') set hidden set autoread e X_dummy - e file - + e Xotherfile + call assert_equal(['foo'], getbufline('X_dummy', 1, '$')) set shortmess+=F - call writefile(["foo"], 'X_dummy') - call assert_true(empty(execute('bn', ''))) - call assert_true(empty(execute('bn', ''))) + echo '' + + if has('nanotime') + sleep 10m + else + sleep 2 + endif + call writefile(['bar'], 'X_dummy') + bprev + call assert_equal('', Screenline(&lines)) + call assert_equal(['bar'], getbufline('X_dummy', 1, '$')) + + if has('nanotime') + sleep 10m + else + sleep 2 + endif + call writefile(['baz'], 'X_dummy') + checktime + call assert_equal('', Screenline(&lines)) + call assert_equal(['baz'], getbufline('X_dummy', 1, '$')) set shortmess& set autoread& set hidden& - bwipe - bwipe + bwipe X_dummy + bwipe Xotherfile endfunc func Test_local_scrolloff() |