summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-06 18:37:51 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-06 18:37:51 +0200
commitadc17a5f9d207fd1623fd923457a46efc9214777 (patch)
tree9c80498c748b98ef43576c925ee9646a78cecb53 /src/structs.h
parentd8df304c59040ef6689a1e4af1dac27ce566909e (diff)
downloadvim-git-adc17a5f9d207fd1623fd923457a46efc9214777.tar.gz
patch 8.2.0915: search() cannot skip over matches like searchpair() canv8.2.0915
Problem: Search() cannot skip over matches like searchpair() can. Solution: Add an optional "skip" argument. (Christian Brabandt, closes #861)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 80b7cff1e..eafed960f 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -4130,6 +4130,21 @@ typedef struct
int sa_wrapped; // search wrapped around
} searchit_arg_T;
+/*
+ * Function argument that can be a string, funcref or partial.
+ * - declare: evalarg_T name;
+ * - init: CLEAR_FIELD(name);
+ * - set: evalarg_get(&argvars[3], &name);
+ * - use: if (evalarg_valid(&name)) res = evalarg_call(&name);
+ * - cleanup: evalarg_clean(&name);
+ */
+typedef struct
+{
+ char_u eva_buf[NUMBUFLEN]; // buffer for get_tv_string_buf()
+ char_u *eva_string;
+ callback_T eva_callback;
+} evalarg_T;
+
#define WRITEBUFSIZE 8192 // size of normal write buffer
#define FIO_LATIN1 0x01 // convert Latin1