diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-10-15 19:28:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-10-15 19:28:13 +0200 |
commit | 0a9046fbcb33770517ab0220b8100c4494bddab2 (patch) | |
tree | 01b083530330ab35d6ac8e74d67707fdbaac6f24 | |
parent | 97792de2762cc79cc365a8a0b858f27753179577 (diff) | |
download | vim-git-0a9046fbcb33770517ab0220b8100c4494bddab2.tar.gz |
patch 8.0.0037v8.0.0037
Problem: Get E924 when switching tabs. ()
Solution: Use win_valid_any_tab() instead of win_valid(). (Martin Vuille,
closes #1167, closes #1171)
-rw-r--r-- | src/quickfix.c | 2 | ||||
-rw-r--r-- | src/testdir/test_quickfix.vim | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 913966348..5bd125720 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2266,7 +2266,7 @@ win_found: ok = buflist_getfile(qf_ptr->qf_fnum, (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit); - if (qi != &ql_info && !win_valid(oldwin)) + if (qi != &ql_info && !win_valid_any_tab(oldwin)) { EMSG(_("E924: Current window was closed")); is_abort = TRUE; diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 73ca7ca8a..022c12a29 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -617,6 +617,22 @@ function Test_locationlist_curwin_was_closed() augroup! testgroup endfunction +function Test_locationlist_cross_tab_jump() + call writefile(['loclistfoo'], 'loclistfoo') + call writefile(['loclistbar'], 'loclistbar') + set switchbuf=usetab + + edit loclistfoo + tabedit loclistbar + silent lgrep loclistfoo loclist* + call assert_equal(1, tabpagenr()) + + enew | only | tabonly + set switchbuf&vim + call delete('loclistfoo') + call delete('loclistbar') +endfunction + " More tests for 'errorformat' function! Test_efm1() if !has('unix') diff --git a/src/version.c b/src/version.c index 61e6979d5..95115f823 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 37, +/**/ 36, /**/ 35, |