mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.1971: manually enabling features causes build errors
Problem: Manually enabling features causes build errors. (John Marriott) Solution: Adjust #ifdefs.
This commit is contained in:
44
src/buffer.c
44
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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user