diff src/structs.h @ 18358:34d5cd432cac v8.1.2173

patch 8.1.2173: searchit() has too many arguments Commit: https://github.com/vim/vim/commit/92ea26b925a0835badb0af2d5887238a4198cabb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 18 20:53:34 2019 +0200 patch 8.1.2173: searchit() has too many arguments Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Oct 2019 21:00:04 +0200
parents 506bf60a30a0
children 1848b3e07266
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -3871,6 +3871,19 @@ typedef struct spat
     soffset_T	    off;
 } spat_T;
 
+/*
+ * Optional extra arguments for searchit().
+ */
+typedef struct
+{
+    linenr_T	sa_stop_lnum;	// stop after this line number when != 0
+#ifdef FEAT_RELTIME
+    proftime_T	*sa_tm;		// timeout limit or NULL
+    int		sa_timed_out;	// set when timed out
+#endif
+    int		sa_wrapped;	// search wrapped around
+} searchit_arg_T;
+
 #define WRITEBUFSIZE	8192	// size of normal write buffer
 
 #define FIO_LATIN1	0x01	// convert Latin1