From efbc33cbbc030df3478d051502d1c14c1c73b3df Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 24 Aug 2018 10:34:48 +0200 Subject: vim-patch:8.1.0310: file info msg with 'F' in 'shortmess' Problem: File info message not always suppressed with 'F' in 'shortmess'. (Asheq Imran) Solution: Save and restore msg_silent. (Christian Brabandt, closes vim/vim#3221) https://github.com/vim/vim/commit/2f0f871159b2cba862fcd41edab65b17da75c422 ref #8840 ref #9027 --- src/nvim/testdir/setup.vim | 1 + src/nvim/testdir/test_options.vim | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index e1006fda3a..c7c3b378cc 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -15,6 +15,7 @@ set nrformats+=octal set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd set listchars=eol:$ set fillchars=vert:\|,fold:- +set shortmess-=F " Prevent Nvim log from writing to stderr. let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log' diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 62d40f71af..921e9fd9f4 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -355,3 +355,24 @@ func Test_shortmess_F() set shortmess& bwipe endfunc + +func Test_shortmess_F2() + e file1 + e file2 + call assert_match('file1', execute('bn', '')) + call assert_match('file2', execute('bn', '')) + set shortmess+=F + call assert_true(empty(execute('bn', ''))) + call assert_true(empty(execute('bn', ''))) + set hidden + call assert_true(empty(execute('bn', ''))) + call assert_true(empty(execute('bn', ''))) + set nohidden + call assert_true(empty(execute('bn', ''))) + call assert_true(empty(execute('bn', ''))) + set shortmess& + call assert_match('file1', execute('bn', '')) + call assert_match('file2', execute('bn', '')) + bwipe + bwipe +endfunc -- cgit