mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
refactor(extmarks): some minor internal API changes
extranges and a bunch of other improvements are coming for 0.10 This gets in some minor surrounding API changes to avoid rebase conflicts until then. - decorations will be able to be specific to windows - adjust deletion API to fit with extranges
This commit is contained in:
@@ -22,21 +22,26 @@ typedef struct {
|
||||
int32_t row;
|
||||
int32_t col;
|
||||
} mtpos_t;
|
||||
#define mtpos_t(r, c) ((mtpos_t){ .row = (r), .col = (c) })
|
||||
|
||||
typedef struct mtnode_s mtnode_t;
|
||||
typedef struct {
|
||||
int oldcol;
|
||||
int i;
|
||||
} iterstate_t;
|
||||
|
||||
typedef struct {
|
||||
mtpos_t pos;
|
||||
int lvl;
|
||||
mtnode_t *node;
|
||||
int i;
|
||||
iterstate_t s[MT_MAX_DEPTH];
|
||||
struct {
|
||||
int oldcol;
|
||||
int i;
|
||||
} s[MT_MAX_DEPTH];
|
||||
|
||||
size_t intersect_idx;
|
||||
mtpos_t intersect_pos;
|
||||
} MarkTreeIter;
|
||||
|
||||
#define marktree_itr_valid(itr) ((itr)->node != NULL)
|
||||
|
||||
// Internal storage
|
||||
//
|
||||
// NB: actual marks have flags > 0, so we can use (row,col,0) pseudo-key for
|
||||
@@ -123,8 +128,6 @@ struct mtnode_s {
|
||||
mtnode_t *ptr[];
|
||||
};
|
||||
|
||||
// TODO(bfredl): the iterator is pretty much everpresent, make it part of the
|
||||
// tree struct itself?
|
||||
typedef struct {
|
||||
mtnode_t *root;
|
||||
size_t n_keys, n_nodes;
|
||||
|
Reference in New Issue
Block a user