summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-18 20:53:34 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-18 20:53:34 +0200
commit92ea26b925a0835badb0af2d5887238a4198cabb (patch)
tree0ed45513ea242aa5c252f84cc00cf59b155b38e3 /src/structs.h
parent7751d1d1a3d447d0d48f57f34e0da9f7c6ac433d (diff)
downloadvim-git-92ea26b925a0835badb0af2d5887238a4198cabb.tar.gz
patch 8.1.2173: searchit() has too many argumentsv8.1.2173
Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 7c0bfce8f..9cc245252 100644
--- 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