Skip to content

Commit ef27b7c

Browse files
committed
updated for version 7.3.1213
Problem: Can't build with small features and Python. Solution: Adjust #ifdefs.
1 parent 8461c39 commit ef27b7c

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

src/buffer.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,10 @@ do_bufdel(command, arg, addr_count, start_bnr, end_bnr, forceit)
984984

985985
return errormsg;
986986
}
987+
#endif /* FEAT_LISTCMDS */
988+
989+
#if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \
990+
|| defined(FEAT_PYTHON3) || defined(PROTO)
987991

988992
/*
989993
* Implementation of the commands for the buffer list.
@@ -1364,8 +1368,7 @@ do_buffer(action, start, dir, count, forceit)
13641368

13651369
return OK;
13661370
}
1367-
1368-
#endif /* FEAT_LISTCMDS */
1371+
#endif
13691372

13701373
/*
13711374
* Set current buffer to "buf". Executes autocommands and closes current

src/eval.c

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ static char *e_dictrange = N_("E719: Cannot use [:] with a Dictionary");
112112
static char *e_letwrong = N_("E734: Wrong variable type for %s=");
113113
static char *e_nofunc = N_("E130: Unknown function: %s");
114114
static char *e_illvar = N_("E461: Illegal variable name: %s");
115+
#ifdef FEAT_FLOAT
115116
static char *e_float_as_string = N_("E806: using Float as a String");
117+
#endif
116118

117119
static dictitem_T globvars_var; /* variable used for g: */
118120
#define globvarht globvardict.dv_hashtab
@@ -11882,7 +11884,7 @@ f_getwinposy(argvars, rettv)
1188211884
static win_T *
1188311885
find_win_by_nr(vp, tp)
1188411886
typval_T *vp;
11885-
tabpage_T *tp; /* NULL for current tab page */
11887+
tabpage_T *tp UNUSED; /* NULL for current tab page */
1188611888
{
1188711889
#ifdef FEAT_WINDOWS
1188811890
win_T *wp;
@@ -11932,7 +11934,8 @@ getwinvar(argvars, rettv, off)
1193211934
win_T *win, *oldcurwin;
1193311935
char_u *varname;
1193411936
dictitem_T *v;
11935-
tabpage_T *tp, *oldtabpage;
11937+
tabpage_T *tp = NULL;
11938+
tabpage_T *oldtabpage;
1193611939
int done = FALSE;
1193711940

1193811941
#ifdef FEAT_WINDOWS
@@ -16683,24 +16686,34 @@ f_settabvar(argvars, rettv)
1668316686
typval_T *argvars;
1668416687
typval_T *rettv;
1668516688
{
16689+
#ifdef FEAT_WINDOWS
1668616690
tabpage_T *save_curtab;
16691+
tabpage_T *tp;
16692+
#endif
1668716693
char_u *varname, *tabvarname;
1668816694
typval_T *varp;
16689-
tabpage_T *tp;
1669016695

1669116696
rettv->vval.v_number = 0;
1669216697

1669316698
if (check_restricted() || check_secure())
1669416699
return;
1669516700

16701+
#ifdef FEAT_WINDOWS
1669616702
tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
16703+
#endif
1669716704
varname = get_tv_string_chk(&argvars[1]);
1669816705
varp = &argvars[2];
1669916706

16700-
if (tp != NULL && varname != NULL && varp != NULL)
16707+
if (varname != NULL && varp != NULL
16708+
#ifdef FEAT_WINDOWS
16709+
&& tp != NULL
16710+
#endif
16711+
)
1670116712
{
16713+
#ifdef FEAT_WINDOWS
1670216714
save_curtab = curtab;
1670316715
goto_tabpage_tp(tp, FALSE, FALSE);
16716+
#endif
1670416717

1670516718
tabvarname = alloc((unsigned)STRLEN(varname) + 3);
1670616719
if (tabvarname != NULL)
@@ -16711,9 +16724,11 @@ f_settabvar(argvars, rettv)
1671116724
vim_free(tabvarname);
1671216725
}
1671316726

16727+
#ifdef FEAT_WINDOWS
1671416728
/* Restore current tabpage */
1671516729
if (valid_tabpage(save_curtab))
1671616730
goto_tabpage_tp(save_curtab, FALSE, FALSE);
16731+
#endif
1671716732
}
1671816733
}
1671916734

@@ -16757,7 +16772,7 @@ setwinvar(argvars, rettv, off)
1675716772
char_u *varname, *winvarname;
1675816773
typval_T *varp;
1675916774
char_u nbuf[NUMBUFLEN];
16760-
tabpage_T *tp;
16775+
tabpage_T *tp = NULL;
1676116776

1676216777
if (check_restricted() || check_secure())
1676316778
return;

src/version.c

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

729729
static int included_patches[] =
730730
{ /* Add new patch number below this line */
731+
/**/
732+
1213,
731733
/**/
732734
1212,
733735
/**/

src/window.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6582,11 +6582,11 @@ restore_snapshot_rec(sn, fr)
65826582
*/
65836583
int
65846584
switch_win(save_curwin, save_curtab, win, tp, no_display)
6585-
win_T **save_curwin;
6586-
tabpage_T **save_curtab;
6587-
win_T *win;
6588-
tabpage_T *tp;
6589-
int no_display;
6585+
win_T **save_curwin UNUSED;
6586+
tabpage_T **save_curtab UNUSED;
6587+
win_T *win UNUSED;
6588+
tabpage_T *tp UNUSED;
6589+
int no_display UNUSED;
65906590
{
65916591
# ifdef FEAT_AUTOCMD
65926592
block_autocmds();
@@ -6627,9 +6627,9 @@ switch_win(save_curwin, save_curtab, win, tp, no_display)
66276627
*/
66286628
void
66296629
restore_win(save_curwin, save_curtab, no_display)
6630-
win_T *save_curwin;
6631-
tabpage_T *save_curtab;
6632-
int no_display;
6630+
win_T *save_curwin UNUSED;
6631+
tabpage_T *save_curtab UNUSED;
6632+
int no_display UNUSED;
66336633
{
66346634
# ifdef FEAT_WINDOWS
66356635
if (save_curtab != NULL && valid_tabpage(save_curtab))
@@ -6906,9 +6906,10 @@ get_win_number(win_T *wp, win_T *first_win)
69066906
}
69076907

69086908
int
6909-
get_tab_number(tabpage_T *tp)
6909+
get_tab_number(tabpage_T *tp UNUSED)
69106910
{
69116911
int i = 1;
6912+
# ifdef FEAT_WINDOWS
69126913
tabpage_T *t;
69136914

69146915
for (t = first_tabpage; t != NULL && t != tp; t = t->tp_next)
@@ -6917,6 +6918,7 @@ get_tab_number(tabpage_T *tp)
69176918
if (t == NULL)
69186919
return 0;
69196920
else
6921+
# endif
69206922
return i;
69216923
}
69226924
#endif

0 commit comments

Comments
 (0)