diff src/structs.h @ 20725:f4455c71a8aa v8.2.0915

patch 8.2.0915: search() cannot skip over matches like searchpair() can Commit: https://github.com/vim/vim/commit/adc17a5f9d207fd1623fd923457a46efc9214777 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 6 18:37:51 2020 +0200 patch 8.2.0915: search() cannot skip over matches like searchpair() can Problem: Search() cannot skip over matches like searchpair() can. Solution: Add an optional "skip" argument. (Christian Brabandt, closes https://github.com/vim/vim/issues/861)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Jun 2020 18:45:03 +0200
parents d91b8d1e5198
children ab27db64f1fb
line wrap: on
line diff
--- 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