aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-10-16 01:54:07 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-10-16 01:54:07 -0400
commit3a970e57dfd48f090f8ccc21567b7974e13d4c68 (patch)
tree5aeaf1cd7a85c17b29276eee88e9881f56ea134c /src/nvim/search.h
parenta3f048ee06dea15490d7b874d295c3fc850cdc51 (diff)
parentdb6cba7d5759e02379005702c7a9d760137f4389 (diff)
downloadrneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.gz
rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.bz2
rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.zip
Merge pull request #2506 from ZyX-I/shada
Replace viminfo with ShaDa files
Diffstat (limited to 'src/nvim/search.h')
-rw-r--r--src/nvim/search.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/search.h b/src/nvim/search.h
index 1bcde2c7ab..6947f79d49 100644
--- a/src/nvim/search.h
+++ b/src/nvim/search.h
@@ -1,6 +1,9 @@
#ifndef NVIM_SEARCH_H
#define NVIM_SEARCH_H
+#include <stdbool.h>
+#include <stdint.h>
+
/* Values for the find_pattern_in_path() function args 'type' and 'action': */
#define FIND_ANY 1
#define FIND_DEFINE 2
@@ -39,6 +42,27 @@
#define RE_BOTH 2 /* save pat in both patterns */
#define RE_LAST 2 /* use last used pattern if "pat" is NULL */
+/// Structure containing offset definition for the last search pattern
+///
+/// @note Only offset for the last search pattern is used, not for the last
+/// substitute pattern.
+typedef struct soffset {
+ char dir; ///< Search direction: forward ('/') or backward ('?')
+ bool line; ///< True if search has line offset.
+ bool end; ///< True if search sets cursor at the end.
+ int64_t off; ///< Actual offset value.
+} SearchOffset;
+
+/// Structure containing last search pattern and its attributes.
+typedef struct spat {
+ char_u *pat; ///< The pattern (in allocated memory) or NULL.
+ bool magic; ///< Magicness of the pattern.
+ bool no_scs; ///< No smartcase for this pattern.
+ Timestamp timestamp; ///< Time of the last change.
+ SearchOffset off; ///< Pattern offset.
+ dict_T *additional_data; ///< Additional data from ShaDa file.
+} SearchPattern;
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "search.h.generated.h"
#endif