]> granicus.if.org Git - vim/commitdiff
patch 8.0.0037 v8.0.0037
authorBram Moolenaar <Bram@vim.org>
Sat, 15 Oct 2016 17:28:13 +0000 (19:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 15 Oct 2016 17:28:13 +0000 (19:28 +0200)
Problem:    Get E924 when switching tabs. ()
Solution:   Use win_valid_any_tab() instead of win_valid(). (Martin Vuille,
            closes #1167, closes #1171)

src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c

index 9139663483f624dba1086de3cee4340d474dc443..5bd1257200d1f6c95f17be5019273812492548cf 100644 (file)
@@ -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;
index 73ca7ca8a65d4892872b6f4e7da5319db2ff657c..022c12a292fa4af22e743379f0638663dc0ac56b 100644 (file)
@@ -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')
index 61e6979d5fc3be8cf1673f17bf980a8e4dc2b867..95115f8233acadfb522271bb87301e94f59f6da3 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    37,
 /**/
     36,
 /**/