Files
neovim/src/nvim/extmark.h
dundargoc a68faed02d refactor: saner options for uncrustify #16196
* refactor: general good option changes
  sp_deref = remove
  sp_not = remove
  sp_inv = remove
  sp_inside_paren_cast = remove
  mod_remove_duplicate_include = true
  sp_after_semi = add
  sp_after_semi_for = force
  sp_sizeof_paren = remove
  nl_return_expr = remove
  nl_else_brace = remove
  nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
2021-10-31 17:03:08 -07:00

86 lines
1.5 KiB
C

#ifndef NVIM_EXTMARK_H
#define NVIM_EXTMARK_H
#include "nvim/buffer_defs.h"
#include "nvim/extmark_defs.h"
#include "nvim/marktree.h"
#include "nvim/pos.h"
EXTERN int extmark_splice_pending INIT(= 0);
typedef struct {
uint64_t ns_id;
uint64_t mark_id;
int row;
colnr_T col;
int end_row;
colnr_T end_col;
Decoration *decor;
} ExtmarkInfo;
typedef kvec_t(ExtmarkInfo) ExtmarkInfoArray;
// TODO(bfredl): good enough name for now.
typedef ptrdiff_t bcount_t;
// delete the columns between mincol and endcol
typedef struct {
int start_row;
colnr_T start_col;
int old_row;
colnr_T old_col;
int new_row;
colnr_T new_col;
bcount_t start_byte;
bcount_t old_byte;
bcount_t new_byte;
} ExtmarkSplice;
// adjust marks after :move operation
typedef struct {
int start_row;
int start_col;
int extent_row;
int extent_col;
int new_row;
int new_col;
bcount_t start_byte;
bcount_t extent_byte;
bcount_t new_byte;
} ExtmarkMove;
// extmark was updated
typedef struct {
uint64_t mark; // raw mark id of the marktree
int old_row;
colnr_T old_col;
int row;
colnr_T col;
} ExtmarkSavePos;
typedef enum {
kExtmarkSplice,
kExtmarkMove,
kExtmarkUpdate,
kExtmarkSavePos,
kExtmarkClear,
} UndoObjectType;
// TODO(bfredl): reduce the number of undo action types
struct undo_object {
UndoObjectType type;
union {
ExtmarkSplice splice;
ExtmarkMove move;
ExtmarkSavePos savepos;
} data;
};
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "extmark.h.generated.h"
#endif
#endif // NVIM_EXTMARK_H