From 7baa96b71753baa0b9c0f1c60c9a697c40bd58e7 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 11 Nov 2016 10:59:01 -0500 Subject: vim-patch:7.4.1591 Problem: The quickfix title is truncated. Solution: Save the command before it is truncated. (Anton Lindqvist) https://github.com/vim/vim/commit/5584df65a0ca2315d1eebc13c54a448bee4d0758 --- test/functional/legacy/quickfix_spec.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/functional/legacy/quickfix_spec.lua') diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua index 7657b8641b..8faaa7b535 100644 --- a/test/functional/legacy/quickfix_spec.lua +++ b/test/functional/legacy/quickfix_spec.lua @@ -389,6 +389,23 @@ describe('helpgrep', function() augroup! testgroup endfunction + + func Test_vimgreptitle() + augroup QfBufWinEnter + au! + au BufWinEnter * :let g:a=get(w:, 'quickfix_title', 'NONE') + augroup END + try + vimgrep /pattern/j file + catch /E480/ + endtry + copen + call assert_equal(': vimgrep /pattern/j file', g:a) + augroup QfBufWinEnter + au! + augroup END + augroup! QfBufWinEnter + endfunc ]]) end) @@ -447,6 +464,11 @@ describe('helpgrep', function() eq(':setqflist()', eval('g:foo')) end) + it('does not truncate quickfix title', function() + call('Test_vimgreptitle') + expected_empty() + end) + it('errors when an autocommand closes the location list\'s window', function() call('Test_locationlist_curwin_was_closed') expected_empty() -- cgit