Skip to content

Commit d570ab9

Browse files
committed
patch 8.1.1971: manually enabling features causes build errors
Problem: Manually enabling features causes build errors. (John Marriott) Solution: Adjust #ifdefs.
1 parent 19e8ac7 commit d570ab9

6 files changed

Lines changed: 28 additions & 37 deletions

File tree

src/buffer.c

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file);
4545
static void free_buffer(buf_T *);
4646
static void free_buffer_stuff(buf_T *buf, int free_options);
4747
static void clear_wininfo(buf_T *buf);
48-
#if defined(FEAT_JOB_CHANNEL) \
49-
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
50-
static int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
51-
#endif
5248

5349
#ifdef UNIX
5450
# define dev_T dev_t
@@ -5457,7 +5453,24 @@ buf_spname(buf_T *buf)
54575453
#if defined(FEAT_JOB_CHANNEL) \
54585454
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
54595455
|| defined(PROTO)
5460-
# define SWITCH_TO_WIN
5456+
/*
5457+
* Find a window for buffer "buf".
5458+
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
5459+
* If not found FAIL is returned.
5460+
*/
5461+
static int
5462+
find_win_for_buf(
5463+
buf_T *buf,
5464+
win_T **wp,
5465+
tabpage_T **tp)
5466+
{
5467+
FOR_ALL_TAB_WINDOWS(*tp, *wp)
5468+
if ((*wp)->w_buffer == buf)
5469+
goto win_found;
5470+
return FAIL;
5471+
win_found:
5472+
return OK;
5473+
}
54615474

54625475
/*
54635476
* Find a window that contains "buf" and switch to it.
@@ -5497,27 +5510,6 @@ restore_win_for_buf(
54975510
}
54985511
#endif
54995512

5500-
#if defined(FEAT_QUICKFIX) || defined(SWITCH_TO_WIN) || defined(PROTO)
5501-
/*
5502-
* Find a window for buffer "buf".
5503-
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
5504-
* If not found FAIL is returned.
5505-
*/
5506-
static int
5507-
find_win_for_buf(
5508-
buf_T *buf,
5509-
win_T **wp,
5510-
tabpage_T **tp)
5511-
{
5512-
FOR_ALL_TAB_WINDOWS(*tp, *wp)
5513-
if ((*wp)->w_buffer == buf)
5514-
goto win_found;
5515-
return FAIL;
5516-
win_found:
5517-
return OK;
5518-
}
5519-
#endif
5520-
55215513
/*
55225514
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
55235515
*/

src/popupmnu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,9 @@ pum_set_selected(int n, int repeat UNUSED)
760760
# else
761761
# define use_popup 0
762762
# endif
763+
# ifdef FEAT_TEXT_PROP
763764
has_info = TRUE;
764-
765+
# endif
765766
// Open a preview window. 3 lines by default. Prefer
766767
// 'previewheight' if set and smaller.
767768
g_do_tagpreview = 3;

src/proto.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void
181181
# if defined(FEAT_PROFILE) || defined(FEAT_RELTIME)
182182
# include "profiler.pro"
183183
# endif
184-
# ifdef FEAT_QUICKFIX
185-
# include "quickfix.pro"
186-
# endif
184+
# include "quickfix.pro"
187185
# include "regexp.pro"
188186
# include "scriptfile.pro"
189187
# include "screen.pro"

src/quickfix.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3381,9 +3381,7 @@ qf_jump_newwin(qf_info_T *qi,
33813381
int prev_winid;
33823382
int opened_window = FALSE;
33833383
int print_message = TRUE;
3384-
#ifdef FEAT_FOLDING
33853384
int old_KeyTyped = KeyTyped; // getting file may reset it
3386-
#endif
33873385
int retval = OK;
33883386

33893387
if (qi == NULL)
@@ -3427,7 +3425,7 @@ qf_jump_newwin(qf_info_T *qi,
34273425
goto theend;
34283426

34293427
retval = qf_jump_to_buffer(qi, qf_index, qf_ptr, forceit, prev_winid,
3430-
&opened_window, old_KeyTyped, print_message);
3428+
&opened_window, old_KeyTyped, print_message);
34313429
if (retval == NOTDONE)
34323430
{
34333431
// Quickfix/location list is freed by an autocmd

src/ui.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3637,6 +3637,8 @@ mouse_find_win(int *rowp, int *colp, mouse_find_T popup UNUSED)
36373637
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
36383638
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_TERM_POPUP_MENU) \
36393639
|| defined(PROTO)
3640+
# define NEED_VCOL2COL
3641+
36403642
/*
36413643
* Translate window coordinates to buffer position without any side effects
36423644
*/
@@ -3678,10 +3680,8 @@ get_fpos_of_mouse(pos_T *mpos)
36783680
}
36793681
#endif
36803682

3681-
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
3682-
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
3683-
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_BEVAL) \
3684-
|| defined(FEAT_TERM_POPUP_MENU) || defined(PROTO)
3683+
#if defined(NEED_VCOL2COL) || defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP) \
3684+
|| defined(PROTO)
36853685
/*
36863686
* Convert a virtual (screen) column to a character column.
36873687
* The first column is one.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1971,
764766
/**/
765767
1970,
766768
/**/

0 commit comments

Comments
 (0)