1 | #ifndef NVIM_MARK_DEFS_H |
2 | #define NVIM_MARK_DEFS_H |
3 | |
4 | #include "nvim/pos.h" |
5 | #include "nvim/os/time.h" |
6 | #include "nvim/eval/typval.h" |
7 | |
8 | /* |
9 | * marks: positions in a file |
10 | * (a normal mark is a lnum/col pair, the same as a file position) |
11 | */ |
12 | |
13 | /// Number of possible numbered global marks |
14 | #define ('9' - '0' + 1) |
15 | |
16 | /// Maximum possible number of letter marks |
17 | #define NMARKS ('z' - 'a' + 1) |
18 | |
19 | /// Total possible number of global marks |
20 | #define NGLOBALMARKS (NMARKS + EXTRA_MARKS) |
21 | |
22 | /// Total possible number of local marks |
23 | /// |
24 | /// That are uppercase marks plus '"', '^' and '.'. There are other local marks, |
25 | /// but they are not saved in ShaDa files. |
26 | #define NLOCALMARKS (NMARKS + 3) |
27 | |
28 | /// Maximum number of marks in jump list |
29 | #define JUMPLISTSIZE 100 |
30 | |
31 | /// Maximum number of tags in tag stack |
32 | #define TAGSTACKSIZE 20 |
33 | |
34 | /// Structure defining single local mark |
35 | typedef struct filemark { |
36 | pos_T mark; ///< Cursor position. |
37 | int fnum; ///< File number. |
38 | Timestamp timestamp; ///< Time when this mark was last set. |
39 | dict_T *additional_data; ///< Additional data from ShaDa file. |
40 | } fmark_T; |
41 | |
42 | /// Structure defining extended mark (mark with file name attached) |
43 | typedef struct xfilemark { |
44 | fmark_T fmark; ///< Actual mark. |
45 | char_u *fname; ///< File name, used when fnum == 0. |
46 | } xfmark_T; |
47 | |
48 | #endif // NVIM_MARK_DEFS_H |
49 | |