Skip to content

Commit 0a9046f

Browse files
committed
patch 8.0.0037
Problem: Get E924 when switching tabs. () Solution: Use win_valid_any_tab() instead of win_valid(). (Martin Vuille, closes #1167, closes #1171)
1 parent 97792de commit 0a9046f

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/quickfix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,7 @@ qf_jump(
22662266

22672267
ok = buflist_getfile(qf_ptr->qf_fnum,
22682268
(linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
2269-
if (qi != &ql_info && !win_valid(oldwin))
2269+
if (qi != &ql_info && !win_valid_any_tab(oldwin))
22702270
{
22712271
EMSG(_("E924: Current window was closed"));
22722272
is_abort = TRUE;

src/testdir/test_quickfix.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,22 @@ function Test_locationlist_curwin_was_closed()
617617
augroup! testgroup
618618
endfunction
619619

620+
function Test_locationlist_cross_tab_jump()
621+
call writefile(['loclistfoo'], 'loclistfoo')
622+
call writefile(['loclistbar'], 'loclistbar')
623+
set switchbuf=usetab
624+
625+
edit loclistfoo
626+
tabedit loclistbar
627+
silent lgrep loclistfoo loclist*
628+
call assert_equal(1, tabpagenr())
629+
630+
enew | only | tabonly
631+
set switchbuf&vim
632+
call delete('loclistfoo')
633+
call delete('loclistbar')
634+
endfunction
635+
620636
" More tests for 'errorformat'
621637
function! Test_efm1()
622638
if !has('unix')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
37,
767769
/**/
768770
36,
769771
/**/

0 commit comments

Comments
 (0)