#include <assert.h>
#include <inttypes.h>
#include <string.h>
#include <limits.h>
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/mark.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
#include "nvim/diff.h"
#include "nvim/eval.h"
#include "nvim/ex_cmds.h"
#include "nvim/fileio.h"
#include "nvim/fold.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/normal.h"
#include "nvim/option.h"
#include "nvim/path.h"
#include "nvim/quickfix.h"
#include "nvim/search.h"
#include "nvim/sign.h"
#include "nvim/strings.h"
#include "nvim/ui.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
#include "nvim/os/input.h"
Macros | |
#define | one_adjust(add) |
#define | one_adjust_nodel(add) |
#define | col_adjust(pp) |
Functions | |
int | setmark (int c) |
void | free_fmark (fmark_T fm) |
Free fmark_T item. More... | |
void | free_xfmark (xfmark_T fm) |
Free xfmark_T item. More... | |
void | clear_fmark (fmark_T *fm) FUNC_ATTR_NONNULL_ALL |
Free and clear fmark_T item. More... | |
int | setmark_pos (int c, pos_T *pos, int fnum) |
void | setpcmark (void) |
void | checkpcmark (void) |
pos_T * | movemark (int count) |
pos_T * | movechangelist (int count) |
pos_T * | getmark_buf (buf_T *buf, int c, bool changefile) |
pos_T * | getmark (int c, bool changefile) |
pos_T * | getmark_buf_fnum (buf_T *buf, int c, bool changefile, int *fnum) |
pos_T * | getnextmark (pos_T *startpos, int dir, int begin_line) |
void | fmarks_check_names (buf_T *buf) |
int | check_mark (pos_T *pos) |
void | clrallmarks (buf_T *const buf) FUNC_ATTR_NONNULL_ALL |
char_u * | fm_getname (fmark_T *fmark, int lead_len) |
void | ex_marks (exarg_T *eap) |
void | ex_delmarks (exarg_T *eap) |
void | ex_jumps (exarg_T *eap) |
void | ex_clearjumps (exarg_T *eap) |
void | ex_changes (exarg_T *eap) |
void | mark_adjust (linenr_T line1, linenr_T line2, long amount, long amount_after, bool end_temp, ExtmarkOp op) |
void | mark_adjust_nofold (linenr_T line1, linenr_T line2, long amount, long amount_after, bool end_temp, ExtmarkOp op) |
void | mark_col_adjust (linenr_T lnum, colnr_T mincol, long lnum_amount, long col_amount, int spaces_removed, ExtmarkOp op) |
void | cleanup_jumplist (win_T *wp, bool checktail) |
void | copy_jumplist (win_T *from, win_T *to) |
const void * | mark_jumplist_iter (const void *const iter, const win_T *const win, xfmark_T *const fm) FUNC_ATTR_NONNULL_ARG(2 |
if (iter_mark==&(win->w_jumplist[win->w_jumplistlen-1])) | |
const void * | mark_global_iter (const void *const iter, char *const name, xfmark_T *const fm) FUNC_ATTR_NONNULL_ARG(2 |
while ((size_t)(iter_mark-&(namedfm[0]))< ARRAY_SIZE(namedfm)&&!iter_mark->fmark.mark.lnum) | |
if ((size_t)(iter_mark-&(namedfm[0]))==ARRAY_SIZE(namedfm)||!iter_mark->fmark.mark.lnum) | |
while ((size_t)(++iter_mark-&(namedfm[0]))< ARRAY_SIZE(namedfm)) | |
const void * | mark_buffer_iter (const void *const iter, const buf_T *const buf, char *const name, fmark_T *const fm) FUNC_ATTR_NONNULL_ARG(2 |
while (iter_mark!=NULL &&iter_mark->mark.lnum==0) | |
if (mark_name) | |
return (const void *) | |
bool | mark_set_local (const char name, buf_T *const buf, const fmark_T fm, const bool update) FUNC_ATTR_NONNULL_ALL |
void | free_jumplist (win_T *wp) |
void | set_last_cursor (win_T *win) |
void | mark_mb_adjustpos (buf_T *buf, pos_T *lp) FUNC_ATTR_NONNULL_ALL |
Variables | |
const void | FUNC_ATTR_WARN_UNUSED_RESULT |
* | fm = *iter_mark |
else | |
const xfmark_T * | iter_mark |
size_t | iter_off = (size_t) (iter_mark - &(namedfm[0])) |
* | name |
return | NULL |
char | mark_name |
#define col_adjust | ( | pp | ) |
#define one_adjust | ( | add | ) |
#define one_adjust_nodel | ( | add | ) |
int check_mark | ( | pos_T * | pos | ) |
void checkpcmark | ( | void | ) |
void cleanup_jumplist | ( | win_T * | wp, |
bool | checktail | ||
) |
void clear_fmark | ( | fmark_T * | fm | ) |
Free and clear fmark_T item.
void clrallmarks | ( | buf_T *const | buf | ) |
Clear all marks and change list in the given buffer
Used mainly when trashing the entire buffer during ":e" type commands.
[out] | buf | Buffer to clear marks in. |
void ex_changes | ( | exarg_T * | eap | ) |
void ex_clearjumps | ( | exarg_T * | eap | ) |
void ex_delmarks | ( | exarg_T * | eap | ) |
void ex_jumps | ( | exarg_T * | eap | ) |
void ex_marks | ( | exarg_T * | eap | ) |
void fmarks_check_names | ( | buf_T * | buf | ) |
void free_fmark | ( | fmark_T | fm | ) |
Free fmark_T item.
void free_jumplist | ( | win_T * | wp | ) |
void free_xfmark | ( | xfmark_T | fm | ) |
Free xfmark_T item.
pos_T* getmark | ( | int | c, |
bool | changefile | ||
) |
if | ( | iter_mark | = = &(win->w_jumplist[win->w_jumplistlen - 1]) | ) |
if | ( | (size_t)(iter_mark-&(namedfm[0])) | = = ARRAY_SIZE(namedfm) || !iter_mark->fmark.mark.lnum | ) |
if | ( | mark_name | ) |
void mark_adjust | ( | linenr_T | line1, |
linenr_T | line2, | ||
long | amount, | ||
long | amount_after, | ||
bool | end_temp, | ||
ExtmarkOp | op | ||
) |
void mark_adjust_nofold | ( | linenr_T | line1, |
linenr_T | line2, | ||
long | amount, | ||
long | amount_after, | ||
bool | end_temp, | ||
ExtmarkOp | op | ||
) |
const void* mark_buffer_iter | ( | const void *const | iter, |
const buf_T *const | buf, | ||
char *const | name, | ||
fmark_T *const | fm | ||
) |
Iterate over buffer marks
[in] | iter | Iterator. Pass NULL to start iteration. |
[in] | buf | Buffer. |
[out] | name | Mark name. |
[out] | fm | Mark definition. |
mark_buffer_iter
call or NULL if iteration is over. void mark_col_adjust | ( | linenr_T | lnum, |
colnr_T | mincol, | ||
long | lnum_amount, | ||
long | col_amount, | ||
int | spaces_removed, | ||
ExtmarkOp | op | ||
) |
const void* mark_global_iter | ( | const void *const | iter, |
char *const | name, | ||
xfmark_T *const | fm | ||
) |
Iterate over global marks
[in] | iter | Iterator. Pass NULL to start iteration. |
[out] | name | Mark name. |
[out] | fm | Mark definition. |
mark_global_iter
call or NULL if iteration is over. const void* mark_jumplist_iter | ( | const void *const | iter, |
const win_T *const | win, | ||
xfmark_T *const | fm | ||
) |
Iterate over jumplist items
[in] | iter | Iterator. Pass NULL to start iteration. |
[in] | win | Window for which jump list is processed. |
[out] | fm | Item definition. |
mark_jumplist_iter
call or NULL if iteration is over. Adjust position to point to the first byte of a multi-byte character
If it points to a tail byte it is move backwards to the head byte.
[in] | buf | Buffer to adjust position in. |
[out] | lp | Position to adjust. |
Set local mark
[in] | name | Mark name. |
[in] | buf | Pointer to the buffer to set mark in. |
[in] | fm | Mark to be set. |
[in] | update | If true then only set global mark if it was created later then existing one. |
pos_T* movechangelist | ( | int | count | ) |
pos_T* movemark | ( | int | count | ) |
return | ( | const void * | ) |
void set_last_cursor | ( | win_T * | win | ) |
int setmark | ( | int | c | ) |
int setmark_pos | ( | int | c, |
pos_T * | pos, | ||
int | fnum | ||
) |
void setpcmark | ( | void | ) |
while | ( | (size_t)(iter_mark-&(namedfm[0]))< ARRAY_SIZE(namedfm)&&!iter_mark->fmark.mark. | lnum | ) |
while | ( | ) |
* fm = *iter_mark |
const void FUNC_ATTR_WARN_UNUSED_RESULT |
const fmark_T * iter_mark |
size_t iter_off = (size_t) (iter_mark - &(namedfm[0])) |
char mark_name |
* name |
return NULL |