#include <assert.h>
#include "nvim/api/extmark.h"
#include "nvim/buffer.h"
#include "nvim/buffer_updates.h"
#include "nvim/charset.h"
#include "nvim/decoration.h"
#include "nvim/extmark.h"
#include "nvim/globals.h"
#include "nvim/lib/kbtree.h"
#include "nvim/map.h"
#include "nvim/memline.h"
#include "nvim/pos.h"
#include "nvim/undo.h"
#include "nvim/vim.h"
Functions | |
void | extmark_set (buf_T *buf, uint32_t ns_id, uint32_t *idp, int row, colnr_T col, int end_row, colnr_T end_col, Decoration *decor, bool right_gravity, bool end_right_gravity, ExtmarkOp op) |
bool | extmark_del (buf_T *buf, uint32_t ns_id, uint32_t id) |
bool | extmark_clear (buf_T *buf, uint32_t ns_id, int l_row, colnr_T l_col, int u_row, colnr_T u_col) |
ExtmarkInfoArray | extmark_get (buf_T *buf, uint32_t ns_id, int l_row, colnr_T l_col, int u_row, colnr_T u_col, int64_t amount, bool reverse) |
ExtmarkInfo | extmark_from_id (buf_T *buf, uint32_t ns_id, uint32_t id) |
Lookup an extmark by id. More... | |
void | extmark_free_all (buf_T *buf) |
free extmarks from the buffer More... | |
void | u_extmark_copy (buf_T *buf, int l_row, colnr_T l_col, int u_row, colnr_T u_col) |
void | extmark_apply_undo (ExtmarkUndoObject undo_info, bool undo) |
undo or redo an extmark operation More... | |
void | extmark_adjust (buf_T *buf, linenr_T line1, linenr_T line2, long amount, long amount_after, ExtmarkOp undo) |
Adjust extmark row for inserted/deleted rows (columns stay fixed). More... | |
void | extmark_splice (buf_T *buf, int start_row, colnr_T start_col, int old_row, colnr_T old_col, bcount_t old_byte, int new_row, colnr_T new_col, bcount_t new_byte, ExtmarkOp undo) |
void | extmark_splice_impl (buf_T *buf, int start_row, colnr_T start_col, bcount_t start_byte, int old_row, colnr_T old_col, bcount_t old_byte, int new_row, colnr_T new_col, bcount_t new_byte, ExtmarkOp undo) |
void | extmark_splice_cols (buf_T *buf, int start_row, colnr_T start_col, colnr_T old_col, colnr_T new_col, ExtmarkOp undo) |
void | extmark_move_region (buf_T *buf, int start_row, colnr_T start_col, bcount_t start_byte, int extent_row, colnr_T extent_col, bcount_t extent_byte, int new_row, colnr_T new_col, bcount_t new_byte, ExtmarkOp undo) |
void extmark_adjust | ( | buf_T * | buf, |
linenr_T | line1, | ||
linenr_T | line2, | ||
long | amount, | ||
long | amount_after, | ||
ExtmarkOp | undo | ||
) |
Adjust extmark row for inserted/deleted rows (columns stay fixed).
void extmark_apply_undo | ( | ExtmarkUndoObject | undo_info, |
bool | undo | ||
) |
undo or redo an extmark operation
bool extmark_clear | ( | buf_T * | buf, |
uint32_t | ns_id, | ||
int | l_row, | ||
colnr_T | l_col, | ||
int | u_row, | ||
colnr_T | u_col | ||
) |
Free extmarks in a ns between lines if ns = 0, it means clear all namespaces
Remove an extmark
ExtmarkInfo extmark_from_id | ( | buf_T * | buf, |
uint32_t | ns_id, | ||
uint32_t | id | ||
) |
Lookup an extmark by id.
ExtmarkInfoArray extmark_get | ( | buf_T * | buf, |
uint32_t | ns_id, | ||
int | l_row, | ||
colnr_T | l_col, | ||
int | u_row, | ||
colnr_T | u_col, | ||
int64_t | amount, | ||
bool | reverse | ||
) |
if upper_lnum or upper_col are negative the buffer will be searched to the start, or end dir can be set to control the order of the array amount = amount of marks to find or -1 for all
void extmark_move_region | ( | buf_T * | buf, |
int | start_row, | ||
colnr_T | start_col, | ||
bcount_t | start_byte, | ||
int | extent_row, | ||
colnr_T | extent_col, | ||
bcount_t | extent_byte, | ||
int | new_row, | ||
colnr_T | new_col, | ||
bcount_t | new_byte, | ||
ExtmarkOp | undo | ||
) |
void extmark_set | ( | buf_T * | buf, |
uint32_t | ns_id, | ||
uint32_t * | idp, | ||
int | row, | ||
colnr_T | col, | ||
int | end_row, | ||
colnr_T | end_col, | ||
Decoration * | decor, | ||
bool | right_gravity, | ||
bool | end_right_gravity, | ||
ExtmarkOp | op | ||
) |
Create or update an extmark
must not be used during iteration!
void extmark_splice | ( | buf_T * | buf, |
int | start_row, | ||
colnr_T | start_col, | ||
int | old_row, | ||
colnr_T | old_col, | ||
bcount_t | old_byte, | ||
int | new_row, | ||
colnr_T | new_col, | ||
bcount_t | new_byte, | ||
ExtmarkOp | undo | ||
) |
void extmark_splice_cols | ( | buf_T * | buf, |
int | start_row, | ||
colnr_T | start_col, | ||
colnr_T | old_col, | ||
colnr_T | new_col, | ||
ExtmarkOp | undo | ||
) |
void extmark_splice_impl | ( | buf_T * | buf, |
int | start_row, | ||
colnr_T | start_col, | ||
bcount_t | start_byte, | ||
int | old_row, | ||
colnr_T | old_col, | ||
bcount_t | old_byte, | ||
int | new_row, | ||
colnr_T | new_col, | ||
bcount_t | new_byte, | ||
ExtmarkOp | undo | ||
) |