diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-06-07 23:12:33 -0700 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2016-06-09 11:12:51 +0200 |
commit | 06bbb79e63c24a29334b4ed52333ff32a97e84fb (patch) | |
tree | 10931c7009391e61b6942adc4bcddbdd3310e447 /test/functional/legacy/quickfix_spec.lua | |
parent | 38d98bba6808fcdd97717d1ce0d4df3589cb9ff7 (diff) | |
download | rneovim-06bbb79e63c24a29334b4ed52333ff32a97e84fb.tar.gz rneovim-06bbb79e63c24a29334b4ed52333ff32a97e84fb.tar.bz2 rneovim-06bbb79e63c24a29334b4ed52333ff32a97e84fb.zip |
vim-patch:7.4.1153
Problem: Autocommands triggered by quickfix cannot always get the current
title value.
Solution: Call qf_fill_buffer() later. (Christian Brabandt)
https://github.com/vim/vim/commit/6920c72d4d62c8dc5596e9f392e38204f561d7af
Helped by @mhinz
Diffstat (limited to 'test/functional/legacy/quickfix_spec.lua')
-rw-r--r-- | test/functional/legacy/quickfix_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua index 315b8ca682..9c378aef60 100644 --- a/test/functional/legacy/quickfix_spec.lua +++ b/test/functional/legacy/quickfix_spec.lua @@ -3,6 +3,8 @@ local helpers = require('test.functional.helpers') local source, clear = helpers.source, helpers.clear local eq, nvim, call = helpers.eq, helpers.meths, helpers.call +local eval = helpers.eval +local execute = helpers.execute local function expected_empty() eq({}, nvim.get_vvar('errors')) @@ -306,4 +308,11 @@ describe('helpgrep', function() call('XbufferTests', 'l') expected_empty() end) + + it('autocommands triggered by quickfix can get title', function() + execute('au FileType qf let g:foo = get(w:, "quickfix_title", "NONE")') + execute('call setqflist([])') + execute('copen') + eq(':setqflist()', eval('g:foo')) + end) end) |