comparison src/quickfix.c @ 1621:82b5078be2dd

updated for version 7.2a
author vimboss
date Tue, 24 Jun 2008 21:56:24 +0000
parents 26d879bcab3a
children 0b796e045c42
comparison
equal deleted inserted replaced
1620:73fe8baea242 1621:82b5078be2dd
1413 colnr_T screen_col; 1413 colnr_T screen_col;
1414 colnr_T char_col; 1414 colnr_T char_col;
1415 char_u *line; 1415 char_u *line;
1416 #ifdef FEAT_WINDOWS 1416 #ifdef FEAT_WINDOWS
1417 char_u *old_swb = p_swb; 1417 char_u *old_swb = p_swb;
1418 unsigned old_swb_flags = swb_flags;
1418 int opened_window = FALSE; 1419 int opened_window = FALSE;
1419 win_T *win; 1420 win_T *win;
1420 win_T *altwin; 1421 win_T *altwin;
1421 #endif 1422 #endif
1422 int print_message = TRUE; 1423 int print_message = TRUE;
1592 usable_win = 1; 1593 usable_win = 1;
1593 break; 1594 break;
1594 } 1595 }
1595 1596
1596 /* 1597 /*
1597 * If no usable window is found and 'switchbuf' is set to 'usetab' 1598 * If no usable window is found and 'switchbuf' contains "usetab"
1598 * then search in other tabs. 1599 * then search in other tabs.
1599 */ 1600 */
1600 if (!usable_win && vim_strchr(p_swb, 'a') != NULL) 1601 if (!usable_win && (swb_flags & SWB_USETAB))
1601 { 1602 {
1602 tabpage_T *tp; 1603 tabpage_T *tp;
1603 win_T *wp; 1604 win_T *wp;
1604 1605
1605 FOR_ALL_TAB_WINDOWS(tp, wp) 1606 FOR_ALL_TAB_WINDOWS(tp, wp)
1623 1624
1624 if (win_split(0, WSP_ABOVE) == FAIL) 1625 if (win_split(0, WSP_ABOVE) == FAIL)
1625 goto failed; /* not enough room for window */ 1626 goto failed; /* not enough room for window */
1626 opened_window = TRUE; /* close it when fail */ 1627 opened_window = TRUE; /* close it when fail */
1627 p_swb = empty_option; /* don't split again */ 1628 p_swb = empty_option; /* don't split again */
1629 swb_flags = 0;
1628 # ifdef FEAT_SCROLLBIND 1630 # ifdef FEAT_SCROLLBIND
1629 curwin->w_p_scb = FALSE; 1631 curwin->w_p_scb = FALSE;
1630 # endif 1632 # endif
1631 if (ll_ref != NULL) 1633 if (ll_ref != NULL)
1632 { 1634 {
1864 if (p_swb != old_swb && opened_window) 1866 if (p_swb != old_swb && opened_window)
1865 { 1867 {
1866 /* Restore old 'switchbuf' value, but not when an autocommand or 1868 /* Restore old 'switchbuf' value, but not when an autocommand or
1867 * modeline has changed the value. */ 1869 * modeline has changed the value. */
1868 if (p_swb == empty_option) 1870 if (p_swb == empty_option)
1871 {
1869 p_swb = old_swb; 1872 p_swb = old_swb;
1873 swb_flags = old_swb_flags;
1874 }
1870 else 1875 else
1871 free_string_option(old_swb); 1876 free_string_option(old_swb);
1872 } 1877 }
1873 #endif 1878 #endif
1874 } 1879 }