Mercurial > vim
diff src/buffer.c @ 17950:bb0e25a8b5d7 v8.1.1971
patch 8.1.1971: manually enabling features causes build errors
Commit: https://github.com/vim/vim/commit/d570ab95d9ab0616f7d7cff59302617e612eae41
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 3 23:20:05 2019 +0200
patch 8.1.1971: manually enabling features causes build errors
Problem: Manually enabling features causes build errors. (John Marriott)
Solution: Adjust #ifdefs.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Sep 2019 23:30:04 +0200 |
parents | 7e6b7a4f13bc |
children | cf8e0c7e0cb9 |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -45,10 +45,6 @@ static int append_arg_number(win_T *wp, 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. */