summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-17 19:12:57 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-17 19:12:57 +0200
commit4a3aef7b2837a6f8390b36ac49e5c01b4e90e2d1 (patch)
treecf97f5d2a3d1eb24a95388b308ecf24ecfcee5c8
parent9e902190328f5d90305828f10fd0806fc07477e2 (diff)
updated for version 7.4a.030v7.4a.030
Problem: Missing find_win_for_buf(). (toothpik) Solution: Add missing changes.
-rw-r--r--src/buffer.c30
-rw-r--r--src/version.c2
2 files changed, 26 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 3a91719d91..238af14309 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5313,18 +5313,14 @@ buf_spname(buf)
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
if (bt_quickfix(buf))
{
- win_T *win = NULL;
+ 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.
*/
- FOR_ALL_TAB_WINDOWS(tp, win)
- if (win->w_buffer == buf)
- goto win_found;
-win_found:
- if (win != NULL && win->w_llist_ref != 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,6 +5341,28 @@ win_found:
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)
/*
diff --git a/src/version.c b/src/version.c
index dc7c05b9c1..65cd3b08f2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 30,
+/**/
29,
/**/
28,