Merge pull request #4124 from justinmk/vim-7.4.1137

vim-patch:7.4.1137
This commit is contained in:
Justin M. Keyes 2016-01-29 00:06:49 -05:00
commit d671dae58c
3 changed files with 31 additions and 2 deletions

View File

@ -69,6 +69,10 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
1137,
1081,

View File

@ -1913,9 +1913,16 @@ int win_close(win_T *win, int free_buf)
*/
if (win->w_buffer != NULL) {
win->w_closing = true;
close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, TRUE);
if (win_valid(win))
close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, true);
if (win_valid(win)) {
win->w_closing = false;
}
// Make sure curbuf is valid. It can become invalid if 'bufhidden' is
// "wipe".
if (!buf_valid(curbuf)) {
curbuf = firstbuf;
}
}
if (only_one_window() && win_valid(win) && win->w_buffer == NULL

View File

@ -0,0 +1,18 @@
-- Test for the quickfix commands.
local helpers = require('test.functional.helpers')
local insert, source = helpers.insert, helpers.source
local clear, expect = helpers.clear, helpers.expect
describe('helpgrep', function()
before_each(clear)
it('works', function()
source([[
helpgrep quickfix
copen
" This wipes out the buffer, make sure that doesn't cause trouble.
cclose
]])
end)
end)