summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-22 23:16:33 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-22 23:16:33 +0200
commitc61a48d25995e5ee2a3813f64c531b91bb23e9b9 (patch)
tree830a49b721d71dcb58b67a243e886cff90416f27
parent29b7d7a9aac591f920edb89241c8cde27378e50b (diff)
downloadvim-git-c61a48d25995e5ee2a3813f64c531b91bb23e9b9.tar.gz
patch 8.1.1735: can't build with tiny featuresv8.1.1735
Problem: Can't build with tiny features. Solution: Add missing #ifdefs.
-rw-r--r--src/highlight.c28
-rw-r--r--src/json.c2
-rw-r--r--src/version.c2
3 files changed, 19 insertions, 13 deletions
diff --git a/src/highlight.c b/src/highlight.c
index c962c7373..6eadcd1d2 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -3948,7 +3948,10 @@ get_match(win_T *wp, int id)
cur = cur->next;
return cur;
}
+#endif
+#if defined(FEAT_EVAL) || defined(PROTO)
+# ifdef FEAT_SEARCH_EXTRA
static int
matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win)
{
@@ -3984,7 +3987,7 @@ matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win)
void
f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_SEARCH_EXTRA
+# ifdef FEAT_SEARCH_EXTRA
dict_T *dict;
matchitem_T *cur;
int i;
@@ -4031,7 +4034,7 @@ f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
dict_add_string(dict, "group", syn_id2name(cur->hlg_id));
dict_add_number(dict, "priority", (long)cur->priority);
dict_add_number(dict, "id", (long)cur->id);
-# if defined(FEAT_CONCEAL)
+# if defined(FEAT_CONCEAL)
if (cur->conceal_char)
{
char_u buf[MB_MAXBYTES + 1];
@@ -4039,11 +4042,11 @@ f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
buf[(*mb_char2bytes)((int)cur->conceal_char, buf)] = NUL;
dict_add_string(dict, "conceal", (char_u *)&buf);
}
-# endif
+# endif
list_append_dict(rettv->vval.v_list, dict);
cur = cur->next;
}
-#endif
+# endif
}
/*
@@ -4052,7 +4055,7 @@ f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
void
f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_SEARCH_EXTRA
+# ifdef FEAT_SEARCH_EXTRA
char_u buf[NUMBUFLEN];
char_u *grp = tv_get_string_buf_chk(&argvars[0], buf); /* group */
char_u *pat = tv_get_string_buf_chk(&argvars[1], buf); /* pattern */
@@ -4087,7 +4090,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL,
conceal_char);
-#endif
+# endif
}
/*
@@ -4096,7 +4099,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
void
f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_SEARCH_EXTRA
+# ifdef FEAT_SEARCH_EXTRA
char_u buf[NUMBUFLEN];
char_u *group;
int prio = 10;
@@ -4145,7 +4148,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
rettv->vval.v_number = match_add(win, group, NULL, prio, id, l,
conceal_char);
-#endif
+# endif
}
/*
@@ -4156,7 +4159,7 @@ f_matcharg(typval_T *argvars UNUSED, typval_T *rettv)
{
if (rettv_list_alloc(rettv) == OK)
{
-#ifdef FEAT_SEARCH_EXTRA
+# ifdef FEAT_SEARCH_EXTRA
int id = (int)tv_get_number(&argvars[0]);
matchitem_T *m;
@@ -4174,7 +4177,7 @@ f_matcharg(typval_T *argvars UNUSED, typval_T *rettv)
list_append_string(rettv->vval.v_list, NULL, -1);
}
}
-#endif
+# endif
}
}
@@ -4184,7 +4187,7 @@ f_matcharg(typval_T *argvars UNUSED, typval_T *rettv)
void
f_matchdelete(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_SEARCH_EXTRA
+# ifdef FEAT_SEARCH_EXTRA
win_T *win = get_optional_window(argvars, 1);
if (win == NULL)
@@ -4192,5 +4195,6 @@ f_matchdelete(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
else
rettv->vval.v_number = match_delete(win,
(int)tv_get_number(&argvars[0]), TRUE);
-#endif
+# endif
}
+#endif
diff --git a/src/json.c b/src/json.c
index c9a6230d2..2a5b5e482 100644
--- a/src/json.c
+++ b/src/json.c
@@ -1126,7 +1126,6 @@ json_find_end(js_read_T *reader, int options)
reader->js_used = used_save;
return ret;
}
-#endif
/*
* "js_decode()" function
@@ -1176,3 +1175,4 @@ f_json_encode(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_STRING;
rettv->vval.v_string = json_encode(&argvars[0], 0);
}
+#endif
diff --git a/src/version.c b/src/version.c
index f3493f2d6..e8f5d7fc3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1735,
+/**/
1734,
/**/
1733,