summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-03 23:20:05 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-03 23:20:05 +0200
commitd570ab95d9ab0616f7d7cff59302617e612eae41 (patch)
tree0224cb7320bbc2a2529de2d2f1cca2d95bf93947 /src/buffer.c
parent19e8ac72e9c17b894a9c74cb8f70feb33567033c (diff)
downloadvim-git-d570ab95d9ab0616f7d7cff59302617e612eae41.tar.gz
patch 8.1.1971: manually enabling features causes build errorsv8.1.1971
Problem: Manually enabling features causes build errors. (John Marriott) Solution: Adjust #ifdefs.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 257ae7d88..c42dece64 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -45,10 +45,6 @@ static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file);
static void free_buffer(buf_T *);
static void free_buffer_stuff(buf_T *buf, int free_options);
static void clear_wininfo(buf_T *buf);
-#if defined(FEAT_JOB_CHANNEL) \
- || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
-static int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
-#endif
#ifdef UNIX
# define dev_T dev_t
@@ -5457,7 +5453,24 @@ buf_spname(buf_T *buf)
#if defined(FEAT_JOB_CHANNEL) \
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
|| defined(PROTO)
-# define SWITCH_TO_WIN
+/*
+ * 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.
+ */
+ static int
+find_win_for_buf(
+ 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;
+}
/*
* Find a window that contains "buf" and switch to it.
@@ -5497,27 +5510,6 @@ restore_win_for_buf(
}
#endif
-#if defined(FEAT_QUICKFIX) || defined(SWITCH_TO_WIN) || 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.
- */
- static int
-find_win_for_buf(
- 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
-
/*
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
*/