extmark.h
Go to the documentation of this file.
1 #ifndef NVIM_EXTMARK_H
2 #define NVIM_EXTMARK_H
3 
4 #include "nvim/buffer_defs.h"
5 #include "nvim/extmark_defs.h"
6 #include "nvim/marktree.h"
7 #include "nvim/pos.h"
8 
9 EXTERN int extmark_splice_pending INIT(= 0);
10 
11 typedef struct {
12  uint64_t ns_id;
13  uint64_t mark_id;
14  int row;
16  int end_row;
19 } ExtmarkInfo;
20 
21 typedef kvec_t(ExtmarkInfo) ExtmarkInfoArray;
22 
23 // TODO(bfredl): good enough name for now.
24 typedef ptrdiff_t bcount_t;
25 
26 
27 // delete the columns between mincol and endcol
28 typedef struct {
29  int start_row;
31  int old_row;
33  int new_row;
39 
40 // adjust marks after :move operation
41 typedef struct {
42  int start_row;
43  int start_col;
46  int new_row;
47  int new_col;
51 } ExtmarkMove;
52 
53 // extmark was updated
54 typedef struct {
55  uint64_t mark; // raw mark id of the marktree
56  int old_row;
58  int row;
61 
62 typedef enum {
69 
70 // TODO(bfredl): reduce the number of undo action types
71 struct undo_object {
73  union {
77  } data;
78 };
79 
80 
81 #ifdef INCLUDE_GENERATED_DECLARATIONS
82 # include "extmark.h.generated.h"
83 #endif
84 
85 #endif // NVIM_EXTMARK_H
ExtmarkMove::start_col
int start_col
Definition: extmark.h:43
ExtmarkInfo::mark_id
uint64_t mark_id
Definition: extmark.h:13
kvec_t
typedef kvec_t(ExtmarkInfo) ExtmarkInfoArray
undo_object::savepos
ExtmarkSavePos savepos
Definition: extmark.h:76
ExtmarkSplice::start_row
int start_row
Definition: extmark.h:29
ExtmarkMove::new_byte
bcount_t new_byte
Definition: extmark.h:50
ExtmarkSplice::new_byte
bcount_t new_byte
Definition: extmark.h:37
ExtmarkSplice
Definition: extmark.h:28
ExtmarkMove::extent_byte
bcount_t extent_byte
Definition: extmark.h:49
ExtmarkMove::new_row
int new_row
Definition: extmark.h:46
ExtmarkMove
Definition: extmark.h:41
UndoObjectType
UndoObjectType
Definition: extmark.h:62
marktree.h
ExtmarkSavePos::col
colnr_T col
Definition: extmark.h:59
ExtmarkSavePos::old_col
colnr_T old_col
Definition: extmark.h:57
ExtmarkSavePos::mark
uint64_t mark
Definition: extmark.h:55
ExtmarkInfo::end_row
int end_row
Definition: extmark.h:16
ExtmarkInfo
Definition: extmark.h:11
ExtmarkSavePos
Definition: extmark.h:54
ExtmarkMove::start_byte
bcount_t start_byte
Definition: extmark.h:48
ExtmarkSplice::start_byte
bcount_t start_byte
Definition: extmark.h:35
kExtmarkMove
@ kExtmarkMove
Definition: extmark.h:64
bcount_t
ptrdiff_t bcount_t
Definition: extmark.h:24
colnr_T
int colnr_T
Column number type.
Definition: pos.h:12
kExtmarkSavePos
@ kExtmarkSavePos
Definition: extmark.h:66
undo_object::move
ExtmarkMove move
Definition: extmark.h:75
ExtmarkSavePos::row
int row
Definition: extmark.h:58
undo_object::splice
ExtmarkSplice splice
Definition: extmark.h:74
ExtmarkMove::new_col
int new_col
Definition: extmark.h:47
kExtmarkClear
@ kExtmarkClear
Definition: extmark.h:67
ExtmarkInfo::end_col
colnr_T end_col
Definition: extmark.h:17
ExtmarkMove::start_row
int start_row
Definition: extmark.h:42
ExtmarkInfo::col
colnr_T col
Definition: extmark.h:15
undo_object::type
UndoObjectType type
Definition: extmark.h:72
ExtmarkSplice::new_row
int new_row
Definition: extmark.h:33
kExtmarkUpdate
@ kExtmarkUpdate
Definition: extmark.h:65
ExtmarkMove::extent_row
int extent_row
Definition: extmark.h:44
ExtmarkSplice::old_row
int old_row
Definition: extmark.h:31
ExtmarkSplice::old_col
colnr_T old_col
Definition: extmark.h:32
extmark_defs.h
ExtmarkInfo::row
int row
Definition: extmark.h:14
INIT
EXTERN handle_T next_namespace_id INIT(=1)
PROF_ values.
EXTERN
#define EXTERN
Definition: macros.h:9
ExtmarkSplice::start_col
colnr_T start_col
Definition: extmark.h:30
ExtmarkInfo::ns_id
uint64_t ns_id
Definition: extmark.h:12
undo_object::data
union undo_object::@39 data
ExtmarkMove::extent_col
int extent_col
Definition: extmark.h:45
ExtmarkInfo::decor
Decoration * decor
Definition: extmark.h:18
undo_object
Definition: extmark.h:71
ExtmarkSplice::new_col
colnr_T new_col
Definition: extmark.h:34
buffer_defs.h
ExtmarkSavePos::old_row
int old_row
Definition: extmark.h:56
kExtmarkSplice
@ kExtmarkSplice
Definition: extmark.h:63
ExtmarkSplice::old_byte
bcount_t old_byte
Definition: extmark.h:36
Decoration
Definition: decoration.h:34
pos.h