To: vim_dev@googlegroups.com Subject: Patch 7.4a.030 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4a.030 (after 7.4.027) Problem: Missing find_win_for_buf(). (toothpik) Solution: Add missing changes. Files: src/buffer.c *** ../vim-7.4a.029/src/buffer.c 2013-07-03 15:58:36.000000000 +0200 --- src/buffer.c 2013-07-17 16:39:00.000000000 +0200 *************** *** 5313,5330 **** #if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS) if (bt_quickfix(buf)) { ! win_T *win = NULL; tabpage_T *tp; /* * For location list window, w_llist_ref points to the location list. * For quickfix window, w_llist_ref is NULL. */ ! FOR_ALL_TAB_WINDOWS(tp, win) ! if (win->w_buffer == buf) ! goto win_found; ! win_found: ! if (win != NULL && win->w_llist_ref != NULL) return (char_u *)_(msg_loclist); else return (char_u *)_(msg_qflist); --- 5313,5326 ---- #if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS) if (bt_quickfix(buf)) { ! win_T *win; tabpage_T *tp; /* * For location list window, w_llist_ref points to the location list. * For quickfix window, w_llist_ref is NULL. */ ! if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL) return (char_u *)_(msg_loclist); else return (char_u *)_(msg_qflist); *************** *** 5345,5350 **** --- 5341,5368 ---- return NULL; } + #if (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \ + || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \ + || defined(PROTO) + /* + * Find a window for buffer "buf". + * If found OK is returned and "wp" and "tp" are set to the window and tabpage. + * If not found FAIL is returned. + */ + int + find_win_for_buf(buf, wp, tp) + buf_T *buf; + win_T **wp; + tabpage_T **tp; + { + FOR_ALL_TAB_WINDOWS(*tp, *wp) + if ((*wp)->w_buffer == buf) + goto win_found; + return FAIL; + win_found: + return OK; + } + #endif #if defined(FEAT_SIGNS) || defined(PROTO) /* *** ../vim-7.4a.029/src/version.c 2013-07-17 18:58:06.000000000 +0200 --- src/version.c 2013-07-17 19:11:47.000000000 +0200 *************** *** 729,730 **** --- 729,732 ---- { /* Add new patch number below this line */ + /**/ + 30, /**/ -- Imagine a world without hypothetical situations. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///