diff options
author | ZyX <kp-pav@yandex.ru> | 2015-04-25 18:47:31 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 21:59:51 +0300 |
commit | 244dbe3a77bf548f73d8781da7327f30e818b08a (patch) | |
tree | 8777a25447be219fe351106cfef37670e0278ddd /src/nvim/ops.h | |
parent | 0fdaab995ed95250b13058a717d5bc562e1834c8 (diff) | |
download | rneovim-244dbe3a77bf548f73d8781da7327f30e818b08a.tar.gz rneovim-244dbe3a77bf548f73d8781da7327f30e818b08a.tar.bz2 rneovim-244dbe3a77bf548f73d8781da7327f30e818b08a.zip |
viminfo: First version of ShaDa file dumping
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
Diffstat (limited to 'src/nvim/ops.h')
-rw-r--r-- | src/nvim/ops.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/nvim/ops.h b/src/nvim/ops.h index 99683165f9..4da5cfc93d 100644 --- a/src/nvim/ops.h +++ b/src/nvim/ops.h @@ -4,6 +4,8 @@ #include <stdbool.h> #include "nvim/types.h" +#include "nvim/api/private/defs.h" +#include "nvim/os/time.h" typedef int (*Indenter)(void); @@ -47,14 +49,6 @@ typedef int (*Indenter)(void); #define OP_FORMAT2 26 /* "gw" format operator, keeps cursor pos */ #define OP_FUNCTION 27 /* "g@" call 'operatorfunc' */ -/// Contents of a yank (read-write) register -typedef struct yankreg { - char_u **y_array; ///< pointer to array of line pointers - linenr_T y_size; ///< number of lines in y_array - char_u y_type; ///< MLINE, MCHAR or MBLOCK - colnr_T y_width; ///< only set if y_type == MBLOCK -} yankreg_T; - /// Flags for get_reg_contents(). enum GRegFlags { kGRegNoExpr = 1, ///< Do not allow expression register. @@ -62,6 +56,16 @@ enum GRegFlags { kGRegList = 4 ///< Return list. }; +/// Definition of one register +typedef struct yankreg { + char_u **y_array; ///< Pointer to an array of line pointers. + linenr_T y_size; ///< Number of lines in y_array. + char_u y_type; ///< Register type: MLINE, MCHAR or MBLOCK. + colnr_T y_width; ///< Register width (only valid for y_type == MBLOCK). + Timestamp timestamp; ///< Time when register was last modified. + Dictionary *additional_data; ///< Additional data from ShaDa file. +} yankreg_T; + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ops.h.generated.h" #endif |