buffer_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_BUFFER_DEFS_H
2 #define NVIM_BUFFER_DEFS_H
3 
4 #include <stdbool.h>
5 #include <stdint.h>
6 // for FILE
7 #include <stdio.h>
8 
9 typedef struct file_buffer buf_T; // Forward declaration
10 
11 // Reference to a buffer that stores the value of buf_free_count.
12 // bufref_valid() only needs to check "buf" when the count differs.
13 typedef struct {
15  int br_fnum;
17 } bufref_T;
18 
19 // for garray_T
20 #include "nvim/garray.h"
21 // for ScreenGrid
22 #include "nvim/grid_defs.h"
23 // for HLF_COUNT
24 #include "nvim/highlight_defs.h"
25 // for pos_T, lpos_T and linenr_T
26 #include "nvim/pos.h"
27 // for the number window-local and buffer-local options
28 #include "nvim/option_defs.h"
29 // for jump list and tag stack sizes in a buffer and mark types
30 #include "nvim/mark_defs.h"
31 // for u_header_T; needs buf_T.
32 #include "nvim/undo_defs.h"
33 // for hashtab_T
34 #include "nvim/hashtab.h"
35 // for dict_T
36 #include "nvim/eval/typval.h"
37 // for proftime_T
38 #include "nvim/profile.h"
39 // for String
40 #include "nvim/api/private/defs.h"
41 // for Map(K, V)
42 #include "nvim/map.h"
43 // for kvec
44 #include "nvim/lib/kvec.h"
45 // for marktree
46 #include "nvim/marktree.h"
47 
48 #define GETFILE_SUCCESS(x) ((x) <= 0)
49 #define MODIFIABLE(buf) (buf->b_p_ma)
50 
51 /*
52  * Flags for w_valid.
53  * These are set when something in a window structure becomes invalid, except
54  * when the cursor is moved. Call check_cursor_moved() before testing one of
55  * the flags.
56  * These are reset when that thing has been updated and is valid again.
57  *
58  * Every function that invalidates one of these must call one of the
59  * invalidate_* functions.
60  *
61  * w_valid is supposed to be used only in screen.c. From other files, use the
62  * functions that set or reset the flags.
63  *
64  * VALID_BOTLINE VALID_BOTLINE_AP
65  * on on w_botline valid
66  * off on w_botline approximated
67  * off off w_botline not valid
68  * on off not possible
69  */
70 #define VALID_WROW 0x01 // w_wrow (window row) is valid
71 #define VALID_WCOL 0x02 // w_wcol (window col) is valid
72 #define VALID_VIRTCOL 0x04 // w_virtcol (file col) is valid
73 #define VALID_CHEIGHT 0x08 // w_cline_height and w_cline_folded valid
74 #define VALID_CROW 0x10 // w_cline_row is valid
75 #define VALID_BOTLINE 0x20 // w_botine and w_empty_rows are valid
76 #define VALID_BOTLINE_AP 0x40 // w_botine is approximated
77 #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
78 
79 // flags for b_flags
80 #define BF_RECOVERED 0x01 // buffer has been recovered
81 #define BF_CHECK_RO 0x02 // need to check readonly when loading file
82  // into buffer (set by ":e", may be reset by
83  // ":buf")
84 #define BF_NEVERLOADED 0x04 // file has never been loaded into buffer,
85  // many variables still need to be set
86 #define BF_NOTEDITED 0x08 // Set when file name is changed after
87  // starting to edit, reset when file is
88  // written out.
89 #define BF_NEW 0x10 // file didn't exist when editing started
90 #define BF_NEW_W 0x20 // Warned for BF_NEW and file created
91 #define BF_READERR 0x40 // got errors while reading the file
92 #define BF_DUMMY 0x80 // dummy buffer, only used internally
93 #define BF_PRESERVED 0x100 // ":preserve" was used
94 
95 // Mask to check for flags that prevent normal writing
96 #define BF_WRITE_MASK (BF_NOTEDITED + BF_NEW + BF_READERR)
97 
98 typedef struct window_S win_T;
99 typedef struct wininfo_S wininfo_T;
100 typedef struct frame_S frame_T;
101 typedef uint16_t disptick_T; // display tick type
102 
103 // for struct memline (it needs memfile_T)
104 #include "nvim/memline_defs.h"
105 // for struct memfile, bhdr_T, blocknr_T... (it needs buf_T)
106 #include "nvim/memfile_defs.h"
107 
108 // for regprog_T. Needs win_T and buf_T.
109 #include "nvim/regexp_defs.h"
110 // for synstate_T (needs reg_extmatch_T, win_T, buf_T)
111 #include "nvim/syntax_defs.h"
112 // for signlist_T
113 #include "nvim/sign_defs.h"
114 
115 #include "nvim/os/fs_defs.h" // for FileID
116 #include "nvim/terminal.h" // for Terminal
117 
118 /*
119  * The taggy struct is used to store the information about a :tag command.
120  */
121 typedef struct taggy {
122  char_u *tagname; // tag name
123  fmark_T fmark; // cursor position BEFORE ":tag"
124  int cur_match; // match number
125  int cur_fnum; // buffer number used for cur_match
126  char_u *user_data; // used with tagfunc
127 } taggy_T;
128 
129 typedef struct buffblock buffblock_T;
130 typedef struct buffheader buffheader_T;
131 
132 /*
133  * structure used to store one block of the stuff/redo/recording buffers
134  */
135 struct buffblock {
136  buffblock_T *b_next; // pointer to next buffblock
137  char_u b_str[1]; // contents (actually longer)
138 };
139 
140 /*
141  * header used for the stuff buffer and the redo buffer
142  */
143 struct buffheader {
144  buffblock_T bh_first; // first (dummy) block of list
145  buffblock_T *bh_curr; // buffblock for appending
146  size_t bh_index; // index for reading
147  size_t bh_space; // space in bh_curr for appending
148 };
149 
150 typedef struct
151 {
154 } save_redo_T;
155 
156 /*
157  * Structure that contains all options that are local to a window.
158  * Used twice in a window: for the current buffer and for all buffers.
159  * Also used in wininfo_T.
160  */
161 typedef struct {
162  int wo_arab;
163 # define w_p_arab w_onebuf_opt.wo_arab // 'arabic'
164  int wo_bri;
165 # define w_p_bri w_onebuf_opt.wo_bri // 'breakindent'
167 # define w_p_briopt w_onebuf_opt.wo_briopt // 'breakindentopt'
168  int wo_diff;
169 # define w_p_diff w_onebuf_opt.wo_diff // 'diff'
171 # define w_p_fdc w_onebuf_opt.wo_fdc // 'foldcolumn'
173 # define w_p_fdc_save w_onebuf_opt.wo_fdc_save // 'fdc' saved for diff mode
174  int wo_fen;
175 # define w_p_fen w_onebuf_opt.wo_fen // 'foldenable'
177  // 'foldenable' saved for diff mode
178 # define w_p_fen_save w_onebuf_opt.wo_fen_save
180 # define w_p_fdi w_onebuf_opt.wo_fdi // 'foldignore'
181  long wo_fdl;
182 # define w_p_fdl w_onebuf_opt.wo_fdl // 'foldlevel'
184  // 'foldlevel' state saved for diff mode
185 # define w_p_fdl_save w_onebuf_opt.wo_fdl_save
187 # define w_p_fdm w_onebuf_opt.wo_fdm // 'foldmethod'
189 # define w_p_fdm_save w_onebuf_opt.wo_fdm_save // 'fdm' saved for diff mode
190  long wo_fml;
191 # define w_p_fml w_onebuf_opt.wo_fml // 'foldminlines'
192  long wo_fdn;
193 # define w_p_fdn w_onebuf_opt.wo_fdn // 'foldnestmax'
195 # define w_p_fde w_onebuf_opt.wo_fde // 'foldexpr'
197 # define w_p_fdt w_onebuf_opt.wo_fdt // 'foldtext'
199 # define w_p_fmr w_onebuf_opt.wo_fmr // 'foldmarker'
200  int wo_lbr;
201 # define w_p_lbr w_onebuf_opt.wo_lbr // 'linebreak'
202  int wo_list;
203 #define w_p_list w_onebuf_opt.wo_list // 'list'
204  int wo_nu;
205 #define w_p_nu w_onebuf_opt.wo_nu // 'number'
206  int wo_rnu;
207 #define w_p_rnu w_onebuf_opt.wo_rnu // 'relativenumber'
208  long wo_nuw;
209 # define w_p_nuw w_onebuf_opt.wo_nuw // 'numberwidth'
210  int wo_wfh;
211 # define w_p_wfh w_onebuf_opt.wo_wfh // 'winfixheight'
212  int wo_wfw;
213 # define w_p_wfw w_onebuf_opt.wo_wfw // 'winfixwidth'
214  int wo_pvw;
215 # define w_p_pvw w_onebuf_opt.wo_pvw // 'previewwindow'
216  int wo_rl;
217 # define w_p_rl w_onebuf_opt.wo_rl // 'rightleft'
219 # define w_p_rlc w_onebuf_opt.wo_rlc // 'rightleftcmd'
220  long wo_scr;
221 #define w_p_scr w_onebuf_opt.wo_scr // 'scroll'
222  int wo_spell;
223 # define w_p_spell w_onebuf_opt.wo_spell // 'spell'
224  int wo_cuc;
225 # define w_p_cuc w_onebuf_opt.wo_cuc // 'cursorcolumn'
226  int wo_cul;
227 # define w_p_cul w_onebuf_opt.wo_cul // 'cursorline'
229 # define w_p_cc w_onebuf_opt.wo_cc // 'colorcolumn'
231 #define w_p_stl w_onebuf_opt.wo_stl // 'statusline'
232  int wo_scb;
233 # define w_p_scb w_onebuf_opt.wo_scb // 'scrollbind'
234  int wo_diff_saved; // options were saved for starting diff mode
235 # define w_p_diff_saved w_onebuf_opt.wo_diff_saved
236  int wo_scb_save; // 'scrollbind' saved for diff mode
237 # define w_p_scb_save w_onebuf_opt.wo_scb_save
238  int wo_wrap;
239 #define w_p_wrap w_onebuf_opt.wo_wrap // 'wrap'
240  int wo_wrap_save; // 'wrap' state saved for diff mode
241 # define w_p_wrap_save w_onebuf_opt.wo_wrap_save
242  char_u *wo_cocu; // 'concealcursor'
243 # define w_p_cocu w_onebuf_opt.wo_cocu
244  long wo_cole; // 'conceallevel'
245 # define w_p_cole w_onebuf_opt.wo_cole
246  int wo_crb;
247 # define w_p_crb w_onebuf_opt.wo_crb // 'cursorbind'
248  int wo_crb_save; // 'cursorbind' state saved for diff mode
249 # define w_p_crb_save w_onebuf_opt.wo_crb_save
251 # define w_p_scl w_onebuf_opt.wo_scl // 'signcolumn'
253 # define w_p_winhl w_onebuf_opt.wo_winhl // 'winhighlight'
255 # define w_p_fcs w_onebuf_opt.wo_fcs // 'fillchars'
257 # define w_p_lcs w_onebuf_opt.wo_lcs // 'listchars'
258  long wo_winbl;
259 # define w_p_winbl w_onebuf_opt.wo_winbl // 'winblend'
260 
261  LastSet wo_script_ctx[WV_COUNT]; // SCTXs for window-local options
262 # define w_p_script_ctx w_onebuf_opt.wo_script_ctx
263 } winopt_T;
264 
265 /*
266  * Window info stored with a buffer.
267  *
268  * Two types of info are kept for a buffer which are associated with a
269  * specific window:
270  * 1. Each window can have a different line number associated with a buffer.
271  * 2. The window-local options for a buffer work in a similar way.
272  * The window-info is kept in a list at b_wininfo. It is kept in
273  * most-recently-used order.
274  */
275 struct wininfo_S {
276  wininfo_T *wi_next; // next entry or NULL for last entry
277  wininfo_T *wi_prev; // previous entry or NULL for first entry
278  win_T *wi_win; // pointer to window that did set wi_fpos
279  pos_T wi_fpos; // last cursor position in the file
280  bool wi_optset; // true when wi_opt has useful values
281  winopt_T wi_opt; // local window options
282  bool wi_fold_manual; // copy of w_fold_manual
283  garray_T wi_folds; // clone of w_folds
284 };
285 
286 /*
287  * Argument list: Array of file names.
288  * Used for the global argument list and the argument lists local to a window.
289  *
290  * TODO: move struct arglist to another header
291  */
292 typedef struct arglist {
293  garray_T al_ga; // growarray with the array of file names
294  int al_refcount; // number of windows using this arglist
295  int id;
296 } alist_T;
297 
298 /*
299  * For each argument remember the file name as it was given, and the buffer
300  * number that contains the expanded file name (required for when ":cd" is
301  * used.
302  *
303  * TODO: move aentry_T to another header
304  */
305 typedef struct argentry {
306  char_u *ae_fname; // file name as specified
307  int ae_fnum; // buffer number with expanded file name
308 } aentry_T;
309 
310 # define ALIST(win) (win)->w_alist
311 #define GARGLIST ((aentry_T *)global_alist.al_ga.ga_data)
312 #define ARGLIST ((aentry_T *)ALIST(curwin)->al_ga.ga_data)
313 #define WARGLIST(wp) ((aentry_T *)ALIST(wp)->al_ga.ga_data)
314 #define AARGLIST(al) ((aentry_T *)((al)->al_ga.ga_data))
315 #define GARGCOUNT (global_alist.al_ga.ga_len)
316 #define ARGCOUNT (ALIST(curwin)->al_ga.ga_len)
317 #define WARGCOUNT(wp) (ALIST(wp)->al_ga.ga_len)
318 
319 /*
320  * Used for the typeahead buffer: typebuf.
321  */
322 typedef struct {
323  char_u *tb_buf; // buffer for typed characters
324  char_u *tb_noremap; // mapping flags for characters in tb_buf[]
325  int tb_buflen; // size of tb_buf[]
326  int tb_off; // current position in tb_buf[]
327  int tb_len; // number of valid bytes in tb_buf[]
328  int tb_maplen; // nr of mapped bytes in tb_buf[]
329  int tb_silent; // nr of silently mapped bytes in tb_buf[]
330  int tb_no_abbr_cnt; // nr of bytes without abbrev. in tb_buf[]
331  int tb_change_cnt; // nr of time tb_buf was changed; never zero
332 } typebuf_T;
333 
334 // Struct to hold the saved typeahead for save_typeahead().
335 typedef struct {
337  bool typebuf_valid; // true when save_typebuf valid
338  int old_char;
343 } tasave_T;
344 
345 /*
346  * Structure used for mappings and abbreviations.
347  */
348 typedef struct mapblock mapblock_T;
349 struct mapblock {
350  mapblock_T *m_next; // next mapblock in list
351  char_u *m_keys; // mapped from, lhs
352  char_u *m_str; // mapped to, rhs
353  char_u *m_orig_str; // rhs as entered by the user
354  int m_keylen; // strlen(m_keys)
355  int m_mode; // valid mode
356  int m_noremap; // if non-zero no re-mapping for m_str
357  char m_silent; // <silent> used, don't echo commands
358  char m_nowait; // <nowait> used
359  char m_expr; // <expr> used, m_str is an expression
360  sctx_T m_script_ctx; // SCTX where map was defined
361 };
362 
363 /*
364  * Used for highlighting in the status line.
365  */
366 struct stl_hlrec {
368  int userhl; // 0: no HL, 1-9: User HL, < 0 for syn ID
369 };
370 
371 // values for b_syn_spell: what to do with toplevel text
372 #define SYNSPL_DEFAULT 0 // spell check if @Spell not defined
373 #define SYNSPL_TOP 1 // spell check toplevel text
374 #define SYNSPL_NOTOP 2 // don't spell check toplevel text
375 
376 // values for b_syn_foldlevel: how to compute foldlevel on a line
377 #define SYNFLD_START 0 // use level of item at start of line
378 #define SYNFLD_MINIMUM 1 // use lowest local minimum level on line
379 
380 // avoid #ifdefs for when b_spell is not available
381 # define B_SPELL(buf) ((buf)->b_spell)
382 
383 typedef struct qf_info_S qf_info_T;
384 
385 /*
386  * Used for :syntime: timing of executing a syntax pattern.
387  */
388 typedef struct {
389  proftime_T total; // total time used
390  proftime_T slowest; // time of slowest call
391  long count; // nr of times used
392  long match; // nr of times matched
393 } syn_time_T;
394 
395 /*
396  * These are items normally related to a buffer. But when using ":ownsyntax"
397  * a window may have its own instance.
398  */
399 typedef struct {
400  hashtab_T b_keywtab; // syntax keywords hash table
401  hashtab_T b_keywtab_ic; // idem, ignore case
402  int b_syn_error; // TRUE when error occurred in HL
403  bool b_syn_slow; // true when 'redrawtime' reached
404  int b_syn_ic; // ignore case for :syn cmds
405  int b_syn_foldlevel; // how to compute foldlevel on a line
406  int b_syn_spell; // SYNSPL_ values
407  garray_T b_syn_patterns; // table for syntax patterns
408  garray_T b_syn_clusters; // table for syntax clusters
409  int b_spell_cluster_id; // @Spell cluster ID or 0
410  int b_nospell_cluster_id; // @NoSpell cluster ID or 0
411  int b_syn_containedin; // TRUE when there is an item with a
412  // "containedin" argument
413  int b_syn_sync_flags; // flags about how to sync
414  int16_t b_syn_sync_id; // group to sync on
415  long b_syn_sync_minlines; // minimal sync lines offset
416  long b_syn_sync_maxlines; // maximal sync lines offset
417  long b_syn_sync_linebreaks; // offset for multi-line pattern
418  char_u *b_syn_linecont_pat; // line continuation pattern
419  regprog_T *b_syn_linecont_prog; // line continuation program
421  int b_syn_linecont_ic; // ignore-case flag for above
422  int b_syn_topgrp; // for ":syntax include"
423  int b_syn_conceal; // auto-conceal for :syn cmds
424  int b_syn_folditems; // number of patterns with the HL_FOLD
425  // flag set
426  // b_sst_array[] contains the state stack for a number of lines, for the
427  // start of that line (col == 0). This avoids having to recompute the
428  // syntax state too often.
429  // b_sst_array[] is allocated to hold the state for all displayed lines,
430  // and states for 1 out of about 20 other lines.
431  // b_sst_array pointer to an array of synstate_T
432  // b_sst_len number of entries in b_sst_array[]
433  // b_sst_first pointer to first used entry in b_sst_array[] or NULL
434  // b_sst_firstfree pointer to first free entry in b_sst_array[] or NULL
435  // b_sst_freecount number of free entries in b_sst_array[]
436  // b_sst_check_lnum entries after this lnum need to be checked for
437  // validity (MAXLNUM means no check needed)
444  disptick_T b_sst_lasttick; // last display tick
445 
446  // for spell checking
447  garray_T b_langp; // list of pointers to slang_T, see spell.c
448  bool b_spell_ismw[256]; // flags: is midword char
449  char_u *b_spell_ismw_mb; // multi-byte midword chars
450  char_u *b_p_spc; // 'spellcapcheck'
451  regprog_T *b_cap_prog; // program for 'spellcapcheck'
452  char_u *b_p_spf; // 'spellfile'
453  char_u *b_p_spl; // 'spelllang'
454  char_u *b_p_spo; // 'spelloptions'
455  int b_cjk; // all CJK letters as OK
456  char_u b_syn_chartab[32]; // syntax iskeyword option
457  char_u *b_syn_isk; // iskeyword option
458 } synblock_T;
459 
463 typedef TV_DICTITEM_STRUCT(sizeof("changedtick")) ChangedtickDictItem;
464 
465 typedef struct {
470  bool utf_sizes;
472 #define BUF_UPDATE_CALLBACKS_INIT { LUA_NOREF, LUA_NOREF, LUA_NOREF, \
473  LUA_NOREF, false }
474 
475 EXTERN int curbuf_splice_pending INIT(= 0);
476 
477 #define BUF_HAS_QF_ENTRY 1
478 #define BUF_HAS_LL_ENTRY 2
479 
480 // Maximum number of maphash blocks we will have
481 #define MAX_MAPHASH 256
482 
483 /*
484  * buffer: structure that holds information about one file
485  *
486  * Several windows can share a single Buffer
487  * A buffer is unallocated if there is no memfile for it.
488  * A buffer is new if the associated file has never been loaded yet.
489  */
490 
491 struct file_buffer {
492  handle_T handle; // unique id for the buffer (buffer number)
493 #define b_fnum handle
494 
495  memline_T b_ml; // associated memline (also contains line count
496 
497  buf_T *b_next; // links in list of buffers
499 
500  int b_nwindows; // nr of windows open on this buffer
501 
502  int b_flags; // various BF_ flags
503  int b_locked; // Buffer is being closed or referenced, don't
504  // let autocommands wipe it out.
505 
506  //
507  // b_ffname has the full path of the file (NULL for no name).
508  // b_sfname is the name as the user typed it (or NULL).
509  // b_fname is the same as b_sfname, unless ":cd" has been done,
510  // then it is the same as b_ffname (NULL for no name).
511  //
512  char_u *b_ffname; // full path file name
513  char_u *b_sfname; // short file name
514  char_u *b_fname; // current file name
515 
518 
519  int b_changed; // 'modified': Set to true if something in the
520  // file has been changed and not written out.
521 
525  ChangedtickDictItem changedtick_di;
526 
527  varnumber_T b_last_changedtick; // b:changedtick when TextChanged or
528  // TextChangedI was last triggered.
529  varnumber_T b_last_changedtick_pum; // b:changedtick when TextChangedP was
530  // last triggered.
531 
532  bool b_saving; /* Set to true if we are in the middle of
533  saving the buffer. */
534 
535  /*
536  * Changes to a buffer require updating of the display. To minimize the
537  * work, remember changes made and update everything at once.
538  */
539  bool b_mod_set; /* true when there are changes since the last
540  time the display was updated */
541  linenr_T b_mod_top; // topmost lnum that was changed
542  linenr_T b_mod_bot; // lnum below last changed line, AFTER the
543  // change
544  long b_mod_xlines; // number of extra buffer lines inserted;
545  // negative when lines were deleted
546  wininfo_T *b_wininfo; // list of last used info for each window
547 
548  long b_mtime; // last change time of original file
549  long b_mtime_read; // last change time when reading
550  uint64_t b_orig_size; // size of original file in bytes
551  int b_orig_mode; // mode of original file
552  time_t b_last_used; // time when the buffer was last used; used
553  // for viminfo
554 
555  fmark_T b_namedm[NMARKS]; // current named marks (mark.c)
556 
557  // These variables are set when VIsual_active becomes FALSE
559  int b_visual_mode_eval; // b_visual.vi_mode for visualmode()
560 
561  fmark_T b_last_cursor; // cursor position when last unloading this
562  // buffer
563  fmark_T b_last_insert; // where Insert mode was left
564  fmark_T b_last_change; // position of last change: '. mark
565 
566  /*
567  * the changelist contains old change positions
568  */
570  int b_changelistlen; // number of active entries
571  bool b_new_change; // set by u_savecommon()
572 
573  /*
574  * Character table, only used in charset.c for 'iskeyword'
575  * bitset with 4*64=256 bits: 1 bit per character 0-255.
576  */
577  uint64_t b_chartab[4];
578 
579  // Table used for mappings local to a buffer.
581 
582  // First abbreviation local to a buffer.
584  // User commands local to the buffer.
586  /*
587  * start and end of an operator, also used for '[ and ']
588  */
590  pos_T b_op_start_orig; // used for Insstart_orig
592 
593  bool b_marks_read; // Have we read ShaDa marks yet?
594 
595  /*
596  * The following only used in undo.c.
597  */
598  u_header_T *b_u_oldhead; // pointer to oldest header
599  u_header_T *b_u_newhead; // pointer to newest header; may not be valid
600  // if b_u_curhead is not NULL
601  u_header_T *b_u_curhead; // pointer to current header
602  int b_u_numhead; // current number of headers
603  bool b_u_synced; // entry lists are synced
604  long b_u_seq_last; // last used undo sequence number
605  long b_u_save_nr_last; // counter for last file write
606  long b_u_seq_cur; // hu_seq of header below which we are now
607  time_t b_u_time_cur; // uh_time of header below which we are now
608  long b_u_save_nr_cur; // file write nr after which we are now
609 
610  /*
611  * variables for "U" command in undo.c
612  */
613  char_u *b_u_line_ptr; // saved line for "U" command
614  linenr_T b_u_line_lnum; // line number of line in u_line
615  colnr_T b_u_line_colnr; // optional column number
616 
617  bool b_scanned; // ^N/^P have scanned this buffer
618 
619  // flags for use of ":lmap" and IM control
620  long b_p_iminsert; // input mode for insert
621  long b_p_imsearch; // input mode for search
622 #define B_IMODE_USE_INSERT -1 // Use b_p_iminsert value for search
623 #define B_IMODE_NONE 0 // Input via none
624 #define B_IMODE_LMAP 1 // Input via langmap
625 # define B_IMODE_LAST 1
626 
627  int16_t b_kmap_state; // using "lmap" mappings
628 # define KEYMAP_INIT 1 // 'keymap' was set, call keymap_init()
629 # define KEYMAP_LOADED 2 // 'keymap' mappings have been loaded
630  garray_T b_kmap_ga; // the keymap table
631 
632  /*
633  * Options local to a buffer.
634  * They are here because their value depends on the type of file
635  * or contents of the file being edited.
636  */
637  bool b_p_initialized; // set when options initialized
638 
639  LastSet b_p_script_ctx[BV_COUNT]; // SCTXs for buffer-local options
640 
641  int b_p_ai;
644  unsigned int b_bkc_flags;
645  int b_p_ci;
646  int b_p_bin;
647  int b_p_bomb;
651  int b_p_bl;
652  long b_p_channel;
653  int b_p_cin;
663  int b_p_eol;
665  int b_p_et;
673  int b_p_inf;
678  uint32_t b_p_inex_flags;
680  uint32_t b_p_inde_flags;
684  uint32_t b_p_fex_flags;
686  int b_p_lisp;
689  int b_p_ml;
691  int b_p_ma;
693  int b_p_pi;
695  int b_p_ro;
696  long b_p_sw;
697  long b_p_scbk;
698  int b_p_si;
699  long b_p_sts;
702  int b_p_swf;
703  long b_p_smc;
705  long b_p_ts;
706  long b_p_tw;
709  long b_p_wm;
713 
714  // local values for options which are normally global
720  int b_p_ar;
723  unsigned b_tc_flags;
726  long b_p_ul;
727  int b_p_udf;
729 
730  // end of buffer options
731 
732  // values set from b_p_cino
763  int b_ind_js;
769 
770  linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary
771  * write should not have an end-of-line */
772 
773  int b_start_eol; // last line had eol when it was read
774  int b_start_ffc; // first char of 'ff' when edit started
775  char_u *b_start_fenc; // 'fileencoding' when edit started or NULL
776  int b_bad_char; // "++bad=" argument when edit started or 0
777  int b_start_bomb; // 'bomb' when it was read
778 
779  ScopeDictDictItem b_bufvar;
781 
782  /* When a buffer is created, it starts without a swap file. b_may_swap is
783  * then set to indicate that a swap file may be opened later. It is reset
784  * if a swap file could not be opened.
785  */
787  bool b_did_warn; /* Set to true if user has been warned on first
788  change of a read-only file */
789 
790  /* Two special kinds of buffers:
791  * help buffer - used for help files, won't use a swap file.
792  * spell buffer - used for spell info, never displayed and doesn't have a
793  * file name.
794  */
795  bool b_help; // TRUE for help file buffer (when set b_p_bt
796  // is "help")
797  bool b_spell; // True for a spell file buffer, most fields
798  // are not used! Use the B_SPELL macro to
799  // access b_spell without #ifdef.
800 
801  char_u *b_prompt_text; // set by prompt_setprompt()
802  Callback b_prompt_callback; // set by prompt_setcallback()
803  Callback b_prompt_interrupt; // set by prompt_setinterrupt()
804  int b_prompt_insert; // value for restart_edit when entering
805  // a prompt buffer window.
806 
807  synblock_T b_s; // Info related to syntax highlighting. w_s
808  // normally points to this, but some windows
809  // may use a different synblock_T.
810 
811  signlist_T *b_signlist; // list of signs to draw
812  int b_signcols_max; // cached maximum number of sign columns
813  int b_signcols; // last calculated number of sign columns
814 
815  Terminal *terminal; // Terminal instance associated with the buffer
816 
817  dict_T *additional_data; // Additional data from shada file if any.
818 
819  int b_mapped_ctrl_c; // modes where CTRL-C is mapped
820 
822  Map(uint64_t, ExtmarkItem) *b_extmark_index;
823  Map(uint64_t, ExtmarkNs) *b_extmark_ns; // extmark namespaces
824 
825  // array of channel_id:s which have asked to receive updates for this
826  // buffer.
827  kvec_t(uint64_t) update_channels;
828  // array of lua callbacks for buffer updates.
829  kvec_t(BufUpdateCallbacks) update_callbacks;
830 
831  // whether an update callback has requested codepoint size of deleted regions.
833 
834  // Measurements of the deleted or replaced region since the last update
835  // event. Some consumers of buffer changes need to know the byte size (like
836  // tree-sitter) or the corresponding UTF-32/UTF-16 size (like LSP) of the
837  // deleted text.
842 
843  // The number for times the current line has been flushed in the memline.
845 
846  int b_diff_failed; // internal diff failed for this buffer
847 };
848 
849 /*
850  * Stuff for diff mode.
851  */
852 # define DB_COUNT 8 // up to four buffers can be diff'ed
853 
854 /*
855  * Each diffblock defines where a block of lines starts in each of the buffers
856  * and how many lines it occupies in that buffer. When the lines are missing
857  * in the buffer the df_count[] is zero. This is all counted in
858  * buffer lines.
859  * There is always at least one unchanged line in between the diffs.
860  * Otherwise it would have been included in the diff above or below it.
861  * df_lnum[] + df_count[] is the lnum below the change. When in one buffer
862  * lines have been inserted, in the other buffer df_lnum[] is the line below
863  * the insertion and df_count[] is zero. When appending lines at the end of
864  * the buffer, df_lnum[] is one beyond the end!
865  * This is using a linked list, because the number of differences is expected
866  * to be reasonable small. The list is sorted on lnum.
867  */
868 typedef struct diffblock_S diff_T;
869 struct diffblock_S {
871  linenr_T df_lnum[DB_COUNT]; // line number in buffer
872  linenr_T df_count[DB_COUNT]; // nr of inserted/changed lines
873 };
874 
875 #define SNAP_HELP_IDX 0
876 # define SNAP_AUCMD_IDX 1
877 # define SNAP_COUNT 2
878 
883 typedef struct tabpage_S tabpage_T;
884 struct tabpage_S {
892  long tp_old_Rows;
894  long tp_ch_used;
895 
898  buf_T *(tp_diffbuf[DB_COUNT]);
901  frame_T *(tp_snapshot[SNAP_COUNT]);
902  ScopeDictDictItem tp_winvar;
905 };
906 
907 /*
908  * Structure to cache info for displayed lines in w_lines[].
909  * Each logical line has one entry.
910  * The entry tells how the logical line is currently displayed in the window.
911  * This is updated when displaying the window.
912  * When the display is changed (e.g., when clearing the screen) w_lines_valid
913  * is changed to exclude invalid entries.
914  * When making changes to the buffer, wl_valid is reset to indicate wl_size
915  * may not reflect what is actually in the buffer. When wl_valid is FALSE,
916  * the entries can only be used to count the number of displayed lines used.
917  * wl_lnum and wl_lastlnum are invalid too.
918  */
919 typedef struct w_line {
920  linenr_T wl_lnum; // buffer line number for logical line
921  uint16_t wl_size; // height in screen lines
922  char wl_valid; // TRUE values are valid for text in buffer
923  char wl_folded; // TRUE when this is a range of folded lines
924  linenr_T wl_lastlnum; // last buffer line number for logical line
925 } wline_T;
926 
927 /*
928  * Windows are kept in a tree of frames. Each frame has a column (FR_COL)
929  * or row (FR_ROW) layout or is a leaf, which has a window.
930  */
931 struct frame_S {
932  char fr_layout; // FR_LEAF, FR_COL or FR_ROW
933  int fr_width;
934  int fr_newwidth; // new width used in win_equal_rec()
936  int fr_newheight; // new height used in win_equal_rec()
937  frame_T *fr_parent; // containing frame or NULL
938  frame_T *fr_next; // frame right or below in same parent, NULL
939  // for last
940  frame_T *fr_prev; // frame left or above in same parent, NULL
941  // for first
942  // fr_child and fr_win are mutually exclusive
943  frame_T *fr_child; // first contained frame
944  win_T *fr_win; // window that fills this frame
945 };
946 
947 #define FR_LEAF 0 // frame is a leaf
948 #define FR_ROW 1 // frame with a row of windows
949 #define FR_COL 2 // frame with a column of windows
950 
951 /*
952  * Struct used for highlighting 'hlsearch' matches, matches defined by
953  * ":match" and matches defined by match functions.
954  * For 'hlsearch' there is one pattern for all windows. For ":match" and the
955  * match functions there is a different pattern for each window.
956  */
957 typedef struct {
958  regmmatch_T rm; // points to the regexp program; contains last found
959  // match (may continue in next line)
960  buf_T *buf; // the buffer to search for a match
961  linenr_T lnum; // the line to search for a match
962  int attr; // attributes to be used for a match
963  int attr_cur; // attributes currently active in win_line()
964  linenr_T first_lnum; // first lnum to search for multi-line pat
965  colnr_T startcol; // in win_line() points to char where HL starts
966  colnr_T endcol; // in win_line() points to char where HL ends
967  bool is_addpos; // position specified directly by matchaddpos()
968  proftime_T tm; // for a time limit
969 } match_T;
970 
972 #define MAXPOSMATCH 8
973 
975 typedef struct
976 {
979  int len;
980 } llpos_T;
981 
984 typedef struct posmatch posmatch_T;
985 struct posmatch
986 {
988  int cur;
991 };
992 
993 /*
994  * matchitem_T provides a linked list for storing match items for ":match" and
995  * the match functions.
996  */
997 typedef struct matchitem matchitem_T;
998 struct matchitem {
1000  int id;
1001  int priority;
1003  int hlg_id;
1008 };
1009 
1010 typedef int FloatAnchor;
1011 
1012 enum {
1015 };
1016 
1017 // NW -> 0
1018 // NE -> kFloatAnchorEast
1019 // SW -> kFloatAnchorSouth
1020 // SE -> kFloatAnchorSouth | kFloatAnchorEast
1021 EXTERN const char *const float_anchor_str[] INIT(= { "NW", "NE", "SW", "SE" });
1022 
1023 typedef enum {
1027 } FloatRelative;
1028 
1029 EXTERN const char *const float_relative_str[] INIT(= { "editor", "win",
1030  "cursor" });
1031 
1032 typedef enum {
1035 } WinStyle;
1036 
1037 typedef struct {
1038  Window window;
1040  int height, width;
1041  double row, col;
1042  FloatAnchor anchor;
1044  bool external;
1046  WinStyle style;
1047 } FloatConfig;
1048 
1049 #define FLOAT_CONFIG_INIT ((FloatConfig){ .height = 0, .width = 0, \
1050  .bufpos = { -1, 0 }, \
1051  .row = 0, .col = 0, .anchor = 0, \
1052  .relative = 0, .external = false, \
1053  .focusable = true, \
1054  .style = kWinStyleUnused })
1055 
1056 // Structure to store last cursor position and topline. Used by check_lnums()
1057 // and reset_lnums().
1058 typedef struct
1059 {
1060  int w_topline_save; // original topline value
1061  int w_topline_corr; // corrected topline value
1062  pos_T w_cursor_save; // original cursor position
1063  pos_T w_cursor_corr; // corrected cursor position
1064 } pos_save_T;
1065 
1069 enum {
1079 };
1080 
1081 typedef struct VimMenu vimmenu_T;
1082 
1083 struct VimMenu {
1084  int modes;
1085  int enabled;
1089  char_u *en_dname;
1091  int mnemonic;
1093  long priority;
1094  char_u *strings[MENU_MODES];
1095  int noremap[MENU_MODES];
1096  bool silent[MENU_MODES];
1100 };
1101 
1102 typedef struct {
1106 } winbar_item_T;
1107 
1111 struct window_S {
1113 
1115 
1118 
1121 
1122  int w_hl_ids[HLF_COUNT];
1123  int w_hl_attrs[HLF_COUNT];
1124 
1126 
1129  bool w_closing;
1130 
1133 
1135 
1137 
1140  int w_set_curswant; // If set, then update w_curswant the next
1141  // time through cursupdate() to the
1142  // current virtual column
1143 
1146 
1147  // the next seven are used to update the visual part
1155 
1156  // 'listchars' characters. Defaults set in set_chars_option().
1157  struct {
1158  int eol;
1159  int ext;
1160  int prec;
1161  int nbsp;
1162  int space;
1163  int tab1;
1164  int tab2;
1165  int tab3;
1166  int trail;
1167  int conceal;
1168  } w_p_lcs_chars;
1169 
1170  // 'fillchars' characters. Defaults set in set_chars_option().
1171  struct {
1172  int stl;
1173  int stlnc;
1174  int vert;
1175  int fold;
1176  int foldopen;
1178  int foldsep;
1179  int diff;
1180  int msgsep;
1181  int eob;
1182  } w_p_fcs_chars;
1183 
1184  /*
1185  * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for
1186  * displaying the buffer.
1187  */
1188  linenr_T w_topline; /* buffer line number of the line at the
1189  top of the window */
1190  char w_topline_was_set; /* flag set to TRUE when topline is set,
1191  e.g. by winrestview() */
1192  int w_topfill; // number of filler lines above w_topline
1193  int w_old_topfill; // w_topfill at last redraw
1194  bool w_botfill; // true when filler lines are actually
1195  // below w_topline (at end of file)
1196  bool w_old_botfill; // w_botfill at last redraw
1197  colnr_T w_leftcol; // window column number of the left most
1198  // character in the window; used when
1199  // 'wrap' is off
1200  colnr_T w_skipcol; // starting column when a single line
1201  // doesn't fit in the window
1202 
1203  //
1204  // Layout of the window in the screen.
1205  // May need to add "msg_scrolled" to "w_winrow" in rare situations.
1206  //
1207  int w_winrow; // first row of window in screen
1208  int w_height; // number of rows in window, excluding
1209  // status/command/winbar line(s)
1210  int w_status_height; // number of status lines (0 or 1)
1211  int w_wincol; // Leftmost column of window in screen.
1212  int w_width; // Width of window, excluding separation.
1213  int w_vsep_width; // Number of separator columns (0 or 1).
1214  pos_save_T w_save_cursor; // backup of cursor pos and topline
1215 
1216  // inner size of window, which can be overridden by external UI
1219  // external UI request. If non-zero, the inner size will use this.
1222 
1223  /*
1224  * === start of cached values ====
1225  */
1226  /*
1227  * Recomputing is minimized by storing the result of computations.
1228  * Use functions in screen.c to check if they are valid and to update.
1229  * w_valid is a bitfield of flags, which indicate if specific values are
1230  * valid or need to be recomputed.
1231  */
1232  int w_valid;
1233  pos_T w_valid_cursor; /* last known position of w_cursor, used
1234  to adjust w_valid */
1235  colnr_T w_valid_leftcol; // last known w_leftcol
1236 
1238 
1239  /*
1240  * w_cline_height is the number of physical lines taken by the buffer line
1241  * that the cursor is on. We use this to avoid extra calls to plines().
1242  */
1243  int w_cline_height; // current size of cursor line
1244  bool w_cline_folded; // cursor line is folded
1245 
1246  int w_cline_row; // starting row of the cursor line
1247 
1248  colnr_T w_virtcol; // column number of the cursor in the
1249  // buffer line, as opposed to the column
1250  // number we're at on the screen. This
1251  // makes a difference on lines which span
1252  // more than one screen line or when
1253  // w_leftcol is non-zero
1254 
1255  /*
1256  * w_wrow and w_wcol specify the cursor position in the window.
1257  * This is related to positions in the window, not in the display or
1258  * buffer, thus w_wrow is relative to w_winrow.
1259  */
1260  int w_wrow, w_wcol; // cursor position in window
1261 
1262  linenr_T w_botline; // number of the line below the bottom of
1263  // the window
1264  int w_empty_rows; // number of ~ rows in window
1265  int w_filler_rows; // number of filler rows at the end of the
1266  // window
1267 
1268  /*
1269  * Info about the lines currently in the window is remembered to avoid
1270  * recomputing it every time. The allocated size of w_lines[] is Rows.
1271  * Only the w_lines_valid entries are actually valid.
1272  * When the display is up-to-date w_lines[0].wl_lnum is equal to w_topline
1273  * and w_lines[w_lines_valid - 1].wl_lnum is equal to w_botline.
1274  * Between changing text and updating the display w_lines[] represents
1275  * what is currently displayed. wl_valid is reset to indicated this.
1276  * This is used for efficient redrawing.
1277  */
1278  int w_lines_valid; // number of valid entries
1280 
1281  garray_T w_folds; // array of nested folds
1282  bool w_fold_manual; // when true: some folds are opened/closed
1283  // manually
1284  bool w_foldinvalid; // when true: folding needs to be
1285  // recomputed
1286  int w_nrwidth; // width of 'number' and 'relativenumber'
1287  // column being used
1288 
1289  /*
1290  * === end of cached values ===
1291  */
1292 
1293  int w_redr_type; // type of redraw to be performed on win
1294  int w_upd_rows; // number of window lines to update when
1295  // w_redr_type is REDRAW_TOP
1296  linenr_T w_redraw_top; // when != 0: first line needing redraw
1297  linenr_T w_redraw_bot; // when != 0: last line needing redraw
1298  int w_redr_status; // if TRUE status line must be redrawn
1299 
1300  // remember what is shown in the ruler for this window (if 'ruler' set)
1301  pos_T w_ru_cursor; // cursor position shown in ruler
1302  colnr_T w_ru_virtcol; // virtcol shown in ruler
1303  linenr_T w_ru_topline; // topline shown in ruler
1304  linenr_T w_ru_line_count; // line count used for ruler
1305  int w_ru_topfill; // topfill shown in ruler
1306  char w_ru_empty; // TRUE if ruler shows 0-1 (empty line)
1307 
1308  int w_alt_fnum; // alternate file (for # and CTRL-^)
1309 
1310  alist_T *w_alist; // pointer to arglist for this window
1311  int w_arg_idx; // current index in argument list (can be
1312  // out of range!)
1313  int w_arg_idx_invalid; // editing another file than w_arg_idx
1314 
1315  char_u *w_localdir; /* absolute path of local directory or
1316  NULL */
1317  vimmenu_T *w_winbar; // The root of the WinBar menu hierarchy.
1318  winbar_item_T *w_winbar_items; // list of items in the WinBar
1319  int w_winbar_height; // 1 if there is a window toolbar
1320 
1321  // Options local to a window.
1322  // They are local because they influence the layout of the window or
1323  // depend on the window layout.
1324  // There are two values: w_onebuf_opt is local to the buffer currently in
1325  // this window, w_allbuf_opt is for all buffers in this window.
1328 
1329  // A few options have local flags for P_INSECURE.
1330  uint32_t w_p_stl_flags; // flags for 'statusline'
1331  uint32_t w_p_fde_flags; // flags for 'foldexpr'
1332  uint32_t w_p_fdt_flags; // flags for 'foldtext'
1333  int *w_p_cc_cols; // array of columns to highlight or NULL
1334  long w_p_siso; // 'sidescrolloff' local value
1335  long w_p_so; // 'scrolloff' local value
1336 
1337  int w_briopt_min; // minimum width for breakindent
1338  int w_briopt_shift; // additional shift for breakindent
1339  bool w_briopt_sbr; // sbr in 'briopt'
1340 
1341  // transform a pointer to a "onebuf" option into a "allbuf" option
1342 #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
1343 
1345 
1346  ScopeDictDictItem w_winvar;
1348 
1349  /*
1350  * The w_prev_pcmark field is used to check whether we really did jump to
1351  * a new line after setting the w_pcmark. If not, then we revert to
1352  * using the previous w_pcmark.
1353  */
1354  pos_T w_pcmark; // previous context mark
1355  pos_T w_prev_pcmark; // previous w_pcmark
1356 
1357  /*
1358  * the jumplist contains old cursor positions
1359  */
1360  xfmark_T w_jumplist[JUMPLISTSIZE];
1361  int w_jumplistlen; // number of active entries
1362  int w_jumplistidx; // current position
1363 
1364  int w_changelistidx; // current position in b_changelist
1365 
1366  matchitem_T *w_match_head; // head of match list
1367  int w_next_match_id; // next match ID
1368 
1369  /*
1370  * the tagstack grows from 0 upwards:
1371  * entry 0: older
1372  * entry 1: newer
1373  * entry 2: newest
1374  */
1375  taggy_T w_tagstack[TAGSTACKSIZE]; // the tag stack
1376  int w_tagstackidx; // idx just below active entry
1377  int w_tagstacklen; // number of tags on stack
1378 
1379  ScreenGrid w_grid; // the grid specific to the window
1380  bool w_pos_changed; // true if window position changed
1381  bool w_floating;
1383 
1384  /*
1385  * w_fraction is the fractional row of the cursor within the window, from
1386  * 0 at the top row to FRACTION_MULT at the last row.
1387  * w_prev_fraction_row was the actual cursor row when w_fraction was last
1388  * calculated.
1389  */
1392 
1393  linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width
1394  * was computed. */
1395  int w_nrwidth_width; // nr of chars to print line count.
1396 
1397  qf_info_T *w_llist; // Location list for this window
1398  // Location list reference used in the location list window.
1399  // In a non-location list window, w_llist_ref is NULL.
1401 };
1402 
1403 static inline int win_hl_attr(win_T *wp, int hlf)
1404 {
1405  return wp->w_hl_attrs[hlf];
1406 }
1407 
1409 #define CHANGEDTICK(buf) \
1410  (=== Include buffer.h & use buf_(get|set|inc)_changedtick ===)
1411 
1412 #endif // NVIM_BUFFER_DEFS_H
ScopeDictDictItem tp_winvar
Variable for "t:" Dictionary.
Definition: buffer_defs.h:902
dict_T * tp_vars
Internal variables, local to tab page.
Definition: buffer_defs.h:903
colnr_T w_valid_leftcol
Definition: buffer_defs.h:1235
int b_ind_if_for_while
Definition: buffer_defs.h:767
char_u * wo_cc
Definition: buffer_defs.h:228
int w_vsep_width
Definition: buffer_defs.h:1213
int space
Definition: buffer_defs.h:1162
int b_syn_linecont_ic
Definition: buffer_defs.h:421
int b_p_pi
&#39;preserveindent&#39;
Definition: buffer_defs.h:693
int br_fnum
Definition: buffer_defs.h:15
int wo_bri
Definition: buffer_defs.h:164
int b_start_eol
Definition: buffer_defs.h:773
int w_wincol
Definition: buffer_defs.h:1211
linenr_T botlnum
bottom buffer line
Definition: buffer_defs.h:990
uint32_t w_p_fde_flags
Definition: buffer_defs.h:1331
linenr_T lnum
Definition: buffer_defs.h:961
Definition: buffer_defs.h:335
int b_syn_foldlevel
Definition: buffer_defs.h:405
int16_t b_syn_sync_id
Definition: buffer_defs.h:414
int trail
Definition: buffer_defs.h:1166
uint16_t wl_size
Definition: buffer_defs.h:921
char_u * wo_cocu
Definition: buffer_defs.h:242
long b_u_seq_cur
Definition: buffer_defs.h:606
int len
length: 0 - to the end of line
Definition: buffer_defs.h:979
int FloatAnchor
Definition: buffer_defs.h:1010
int w_changelistidx
Definition: buffer_defs.h:1364
WinStyle style
Definition: buffer_defs.h:1046
char_u * b_p_tsr
&#39;thesaurus&#39; local value
Definition: buffer_defs.h:725
struct argentry aentry_T
Definition: quickfix.c:116
garray_T al_ga
Definition: buffer_defs.h:293
char_u * b_p_syn
&#39;syntax&#39;
Definition: buffer_defs.h:704
char_u * b_prompt_text
Definition: buffer_defs.h:801
int b_prompt_insert
Definition: buffer_defs.h:804
int w_height_inner
Definition: buffer_defs.h:1217
fmark_T b_last_cursor
Definition: buffer_defs.h:561
char_u * dname
Displayed Name ("name" without &#39;&&#39;)
Definition: buffer_defs.h:1087
int b_changelistlen
Definition: buffer_defs.h:570
Definition: buffer_defs.h:275
win_T * tp_firstwin
first window in this Tab page
Definition: buffer_defs.h:890
int tb_len
Definition: buffer_defs.h:327
long wo_scr
Definition: buffer_defs.h:220
int conceal
Definition: buffer_defs.h:1167
int b_ind_in_comment2
Definition: buffer_defs.h:748
bool b_p_initialized
Definition: buffer_defs.h:637
buf_T * w_buffer
Definition: buffer_defs.h:1114
Definition: buffer_defs.h:135
uint16_t disptick_T
Definition: buffer_defs.h:101
long b_p_tw_nobin
b_p_tw saved for binary mode
Definition: buffer_defs.h:707
int wo_diff_saved
Definition: buffer_defs.h:234
long b_p_wm_nopaste
b_p_wm saved for paste mode
Definition: buffer_defs.h:711
int w_jumplistidx
Definition: buffer_defs.h:1362
String save_inputbuf
Definition: buffer_defs.h:342
long wo_fml
Definition: buffer_defs.h:190
Definition: buffer_defs.h:884
int w_width_inner
Definition: buffer_defs.h:1218
Definition: buffer_defs.h:1075
int b_has_qf_entry
quickfix exists for buffer
Definition: buffer_defs.h:650
int wo_wfw
Definition: buffer_defs.h:212
int b_p_bl
&#39;buflisted&#39;
Definition: buffer_defs.h:651
int fr_newheight
Definition: buffer_defs.h:936
linenr_T w_old_visual_lnum
last known start of visual part
Definition: buffer_defs.h:1152
int w_filler_rows
Definition: buffer_defs.h:1265
bool b_mod_set
Definition: buffer_defs.h:539
buffheader_T save_readbuf2
Definition: buffer_defs.h:341
char_u * b_p_fp
&#39;formatprg&#39;
Definition: buffer_defs.h:682
char_u * b_p_cms
&#39;commentstring&#39;
Definition: buffer_defs.h:658
int b_p_ai
&#39;autoindent&#39;
Definition: buffer_defs.h:641
long b_mtime_read
Definition: buffer_defs.h:549
char_u * actext
accelerator text (after TAB)
Definition: buffer_defs.h:1092
char fr_layout
Definition: buffer_defs.h:932
colnr_T w_old_curswant
last known value of Curswant
Definition: buffer_defs.h:1154
wline_T * w_lines
Definition: buffer_defs.h:1279
int w_arg_idx_invalid
Definition: buffer_defs.h:1313
int tab1
first tab character
Definition: buffer_defs.h:1163
linenr_T lnum
line number
Definition: buffer_defs.h:977
char_u * m_orig_str
Definition: buffer_defs.h:353
char_u * wo_rlc
Definition: buffer_defs.h:218
int w_tagstackidx
Definition: buffer_defs.h:1376
win_T * w_prev
link to previous window
Definition: buffer_defs.h:1127
bool wi_optset
Definition: buffer_defs.h:280
size_t deleted_bytes
Definition: buffer_defs.h:838
garray_T b_langp
Definition: buffer_defs.h:447
Struct which encapsulates inode/dev_id information.
Definition: fs_defs.h:12
bool b_marks_read
Definition: buffer_defs.h:593
pos_T b_op_start_orig
Definition: buffer_defs.h:590
MarkTree b_marktree[1]
Definition: buffer_defs.h:821
Definition: buffer_defs.h:1034
long tp_old_Rows
Rows when Tab page was left.
Definition: buffer_defs.h:892
int w_width_request
Definition: buffer_defs.h:1221
vimmenu_T * wb_menu
Definition: buffer_defs.h:1105
int b_ind_matching_paren
Definition: buffer_defs.h:756
long b_p_imsearch
Definition: buffer_defs.h:621
proftime_T slowest
Definition: buffer_defs.h:390
garray_T b_syn_patterns
Definition: buffer_defs.h:407
int tb_change_cnt
Definition: buffer_defs.h:331
int fr_height
Definition: buffer_defs.h:935
long wo_winbl
Definition: buffer_defs.h:258
Definition: buffer_defs.h:150
char_u * b_syn_isk
Definition: buffer_defs.h:457
int b_ind_first_open
Definition: buffer_defs.h:736
#define NMARKS
Maximum possible number of letter marks.
Definition: mark_defs.h:17
int br_buf_free_count
Definition: buffer_defs.h:16
int wo_rnu
Definition: buffer_defs.h:206
int b_ind_level
Definition: buffer_defs.h:733
bool w_viewport_invalid
Definition: buffer_defs.h:1237
int foldopen
when fold is open
Definition: buffer_defs.h:1176
Definition: buffer_defs.h:1070
int b_visual_mode_eval
Definition: buffer_defs.h:559
frame_T * fr_child
Definition: buffer_defs.h:943
int w_briopt_shift
Definition: buffer_defs.h:1338
Definition: buffer_defs.h:1078
bool update_need_codepoints
Definition: buffer_defs.h:832
diff_T * df_next
Definition: buffer_defs.h:870
char_u * b_start_fenc
Definition: buffer_defs.h:775
#define MAX_MAPHASH
Definition: buffer_defs.h:481
Definition: buffer_defs.h:1024
char_u * b_p_fenc
&#39;fileencoding&#39;
Definition: buffer_defs.h:668
linenr_T w_old_cursor_lnum
last known end of visual part
Definition: buffer_defs.h:1149
char m_nowait
Definition: buffer_defs.h:358
int w_briopt_min
Definition: buffer_defs.h:1337
int wo_cul
Definition: buffer_defs.h:226
char_u * b_p_fex
&#39;formatexpr&#39;
Definition: buffer_defs.h:683
pos_T w_pcmark
Definition: buffer_defs.h:1354
FloatConfig w_float_config
Definition: buffer_defs.h:1382
int w_fraction
Definition: buffer_defs.h:1390
posmatch_T pos
position matches
Definition: buffer_defs.h:1005
dict_T * additional_data
Definition: buffer_defs.h:817
int b_ind_unclosed2
Definition: buffer_defs.h:752
int modes
Which modes is this menu visible for.
Definition: buffer_defs.h:1084
u_header_T * b_u_curhead
Definition: buffer_defs.h:601
int b_p_udf
&#39;undofile&#39;
Definition: buffer_defs.h:727
char_u * b_p_bt
&#39;buftype&#39;
Definition: buffer_defs.h:649
pos_T b_op_start
Definition: buffer_defs.h:589
int wo_wrap
Definition: buffer_defs.h:238
int b_ind_cpp_namespace
Definition: buffer_defs.h:766
fmark_T b_last_change
Definition: buffer_defs.h:564
garray_T b_syn_clusters
Definition: buffer_defs.h:408
bool b_new_change
Definition: buffer_defs.h:571
bool b_syn_slow
Definition: buffer_defs.h:403
matchitem_T * next
Definition: buffer_defs.h:999
win_T * tp_lastwin
last window in this Tab page
Definition: buffer_defs.h:891
int b_orig_mode
Definition: buffer_defs.h:551
LuaRef on_changedtick
Definition: buffer_defs.h:468
linenr_T b_u_line_lnum
Definition: buffer_defs.h:614
#define JUMPLISTSIZE
Maximum number of marks in jump list.
Definition: mark_defs.h:29
long b_p_sw
&#39;shiftwidth&#39;
Definition: buffer_defs.h:696
char_u * b_p_inde
&#39;indentexpr&#39;
Definition: buffer_defs.h:679
int tp_diff_invalid
list of diffs is outdated
Definition: buffer_defs.h:899
int b_ind_jump_label
Definition: buffer_defs.h:740
int w_redr_status
Definition: buffer_defs.h:1298
bool b_help
Definition: buffer_defs.h:795
size_t deleted_bytes2
Definition: buffer_defs.h:839
int b_syn_ic
Definition: buffer_defs.h:404
int tb_maplen
Definition: buffer_defs.h:328
int b_bad_char
Definition: buffer_defs.h:776
int w_topfill
Definition: buffer_defs.h:1192
Definition: defs.h:76
int wo_pvw
Definition: buffer_defs.h:214
int w_topline_save
Definition: buffer_defs.h:1060
#define DB_COUNT
Definition: buffer_defs.h:852
disptick_T b_sst_lasttick
Definition: buffer_defs.h:444
char_u * wo_fdm
Definition: buffer_defs.h:186
bool b_did_warn
Definition: buffer_defs.h:787
char_u * w_localdir
Definition: buffer_defs.h:1315
int flush_count
Definition: buffer_defs.h:844
long b_p_tw
&#39;textwidth&#39;
Definition: buffer_defs.h:706
bool w_fold_manual
Definition: buffer_defs.h:1282
buf_T * buf
Definition: buffer_defs.h:960
buffheader_T sr_redobuff
Definition: buffer_defs.h:152
char_u * b_p_lw
&#39;lispwords&#39; local value
Definition: buffer_defs.h:728
int b_ind_case
Definition: buffer_defs.h:741
int w_tagstacklen
Definition: buffer_defs.h:1377
char_u * name
Name of menu, possibly translated.
Definition: buffer_defs.h:1086
int nbsp
Definition: buffer_defs.h:1161
char_u * b_p_ep
&#39;equalprg&#39; local value
Definition: buffer_defs.h:718
int wo_scb_save
Definition: buffer_defs.h:236
int wo_fen
Definition: buffer_defs.h:174
int wo_lbr
Definition: buffer_defs.h:200
int w_set_curswant
Definition: buffer_defs.h:1140
bool w_closing
Definition: buffer_defs.h:1129
int b_p_ci
&#39;copyindent&#39;
Definition: buffer_defs.h:645
frame_T * w_frame
frame containing this window
Definition: buffer_defs.h:1132
char_u * b_p_kp
&#39;keywordprg&#39;
Definition: buffer_defs.h:685
int wo_arab
Definition: buffer_defs.h:162
char_u * tb_noremap
Definition: buffer_defs.h:324
colnr_T w_ru_virtcol
Definition: buffer_defs.h:1302
int foldclosed
when fold is closed
Definition: buffer_defs.h:1177
int b_p_fixeol
&#39;fixendofline&#39;
Definition: buffer_defs.h:664
long b_p_tw_nopaste
b_p_tw saved for paste mode
Definition: buffer_defs.h:708
Definition: buffer_defs.h:985
int b_syn_error
Definition: buffer_defs.h:402
char_u * b_u_line_ptr
Definition: buffer_defs.h:613
Definition: buffer_defs.h:366
char w_ru_empty
Definition: buffer_defs.h:1306
int wo_fdl_save
Definition: buffer_defs.h:183
varnumber_T b_last_changedtick
Definition: buffer_defs.h:527
int wo_wrap_save
Definition: buffer_defs.h:240
linenr_T toplnum
top buffer line
Definition: buffer_defs.h:989
char_u * b_spell_ismw_mb
Definition: buffer_defs.h:449
buffheader_T sr_old_redobuff
Definition: buffer_defs.h:153
char_u * b_p_path
&#39;path&#39; local value
Definition: buffer_defs.h:719
colnr_T w_skipcol
Definition: buffer_defs.h:1200
mapblock_T * b_maphash[MAX_MAPHASH]
Definition: buffer_defs.h:580
int b_signcols
Definition: buffer_defs.h:813
int fr_newwidth
Definition: buffer_defs.h:934
int w_alt_fnum
Definition: buffer_defs.h:1308
int mnemonic
mnemonic key (after &#39;&&#39;)
Definition: buffer_defs.h:1091
int eob
Definition: buffer_defs.h:1181
regprog_T * b_syn_linecont_prog
Definition: buffer_defs.h:419
int b_syn_spell
Definition: buffer_defs.h:406
linenr_T w_botline
Definition: buffer_defs.h:1262
long b_syn_sync_linebreaks
Definition: buffer_defs.h:417
matchitem_T * w_match_head
Definition: buffer_defs.h:1366
char_u * wo_fdc
Definition: buffer_defs.h:170
int hlg_id
highlight group ID
Definition: buffer_defs.h:1003
int m_keylen
Definition: buffer_defs.h:354
size_t bh_index
Definition: buffer_defs.h:146
int w_next_match_id
Definition: buffer_defs.h:1367
char_u * b_p_def
&#39;define&#39; local value
Definition: buffer_defs.h:675
int wo_wfh
Definition: buffer_defs.h:210
int b_ind_js
Definition: buffer_defs.h:763
struct arglist alist_T
char_u * b_p_bkc
&#39;backupco
Definition: buffer_defs.h:643
synblock_T b_s
Definition: buffer_defs.h:807
long count
Definition: buffer_defs.h:391
buffblock_T * b_next
Definition: buffer_defs.h:136
bool external
Definition: buffer_defs.h:1044
int tb_no_abbr_cnt
Definition: buffer_defs.h:330
linenr_T w_ru_line_count
Definition: buffer_defs.h:1304
char_u * b_p_efm
&#39;errorformat&#39; local value
Definition: buffer_defs.h:717
int b_nwindows
Definition: buffer_defs.h:500
int w_arg_idx
Definition: buffer_defs.h:1311
int wo_rl
Definition: buffer_defs.h:216
bool w_foldinvalid
Definition: buffer_defs.h:1284
char_u * b_p_cink
&#39;cinkeys&#39;
Definition: buffer_defs.h:655
int wo_scb
Definition: buffer_defs.h:232
Definition: buffer_defs.h:1058
int b_ind_in_comment
Definition: buffer_defs.h:747
char_u * b_p_tags
&#39;tags&#39; local value
Definition: buffer_defs.h:721
bool w_botfill
Definition: buffer_defs.h:1194
Map(uint64_t, ExtmarkItem)*b_extmark_index
Definition: buffer_defs.h:143
int w_empty_rows
Definition: buffer_defs.h:1264
Structure defining extended mark (mark with file name attached)
Definition: mark_defs.h:43
linenr_T b_no_eol_lnum
Definition: buffer_defs.h:770
long w_scbind_pos
Definition: buffer_defs.h:1344
fmark_T b_namedm[NMARKS]
Definition: buffer_defs.h:555
FloatRelative relative
Definition: buffer_defs.h:1043
char_u * b_p_cinw
&#39;cinwords&#39;
Definition: buffer_defs.h:656
int b_spell_cluster_id
Definition: buffer_defs.h:409
int b_ind_cpp_extern_c
Definition: buffer_defs.h:768
int b_p_ml
&#39;modeline&#39;
Definition: buffer_defs.h:689
pos_T w_cursor_save
Definition: buffer_defs.h:1062
garray_T b_ucmds
Definition: buffer_defs.h:585
ChangedtickDictItem changedtick_di
Definition: buffer_defs.h:525
int b_ind_unclosed_whiteok
Definition: buffer_defs.h:755
int w_old_topfill
Definition: buffer_defs.h:1193
int al_refcount
Definition: buffer_defs.h:294
uint32_t w_p_stl_flags
Definition: buffer_defs.h:1330
Definition: buffer_defs.h:161
int b_p_swf
&#39;swapfile&#39;
Definition: buffer_defs.h:702
proftime_T total
Definition: buffer_defs.h:389
long b_p_iminsert
Definition: buffer_defs.h:620
Definition: buffer_defs.h:1077
int b_syn_conceal
Definition: buffer_defs.h:423
int old_char
Definition: buffer_defs.h:338
int b_syn_sync_flags
Definition: buffer_defs.h:413
int b_syn_topgrp
Definition: buffer_defs.h:422
long w_p_so
Definition: buffer_defs.h:1335
char_u * wo_fdi
Definition: buffer_defs.h:179
int b_sst_freecount
Definition: buffer_defs.h:442
frame_T * fr_parent
Definition: buffer_defs.h:937
int w_hl_id_normal
&#39;winhighlight&#39; normal id
Definition: buffer_defs.h:1119
int colnr_T
Column number type.
Definition: pos.h:9
char_u * m_str
Definition: buffer_defs.h:352
int attr
Definition: buffer_defs.h:962
winopt_T w_allbuf_opt
Definition: buffer_defs.h:1327
char_u * b_p_mp
&#39;makeprg&#39; local value
Definition: buffer_defs.h:716
bool utf_sizes
Definition: buffer_defs.h:470
int tab3
third tab character
Definition: buffer_defs.h:1165
int tb_buflen
Definition: buffer_defs.h:325
Definition: buffer_defs.h:919
hashtab_T b_keywtab_ic
Definition: buffer_defs.h:401
int b_syn_folditems
Definition: buffer_defs.h:424
int m_mode
Definition: buffer_defs.h:355
int w_wrow
Definition: buffer_defs.h:1260
dict_T * b_vars
b: scope dictionary.
Definition: buffer_defs.h:780
Definition: buffer_defs.h:1033
int w_topline_corr
Definition: buffer_defs.h:1061
win_T * w_next
link to next window
Definition: buffer_defs.h:1128
FloatAnchor anchor
Definition: buffer_defs.h:1042
buffblock_T * bh_curr
Definition: buffer_defs.h:145
bool w_floating
whether the window is floating
Definition: buffer_defs.h:1381
#define EXTERN
Definition: macros.h:9
char_u * wo_fdm_save
Definition: buffer_defs.h:188
#define MAXPOSMATCH
number of positions supported by matchaddpos()
Definition: buffer_defs.h:972
int b_p_lisp
&#39;lisp&#39;
Definition: buffer_defs.h:686
int wo_diff
Definition: buffer_defs.h:168
garray_T w_folds
Definition: buffer_defs.h:1281
char_u * wo_scl
Definition: buffer_defs.h:250
unsigned b_tc_flags
flags for &#39;tagcase&#39;
Definition: buffer_defs.h:723
char_u * b_p_spl
Definition: buffer_defs.h:453
mapblock_T * m_next
Definition: buffer_defs.h:350
Definition: buffer_defs.h:1072
int tp_diff_update
update diffs before redrawing
Definition: buffer_defs.h:900
long wo_nuw
Definition: buffer_defs.h:208
int fr_width
Definition: buffer_defs.h:933
uint32_t b_p_fex_flags
flags for &#39;formatexpr&#39;
Definition: buffer_defs.h:684
char_u * b_p_sua
&#39;suffixesadd&#39;
Definition: buffer_defs.h:701
pos_T w_valid_cursor
Definition: buffer_defs.h:1233
dict_T * w_vars
Dictionary with w: variables.
Definition: buffer_defs.h:1347
int cur_fnum
Definition: buffer_defs.h:125
struct taggy taggy_T
int b_flags
Definition: buffer_defs.h:502
Definition: buffer_defs.h:305
uint32_t b_p_inex_flags
flags for &#39;includeexpr&#39;
Definition: buffer_defs.h:678
linenr_T b_mod_bot
Definition: buffer_defs.h:542
char_u * b_p_spo
Definition: buffer_defs.h:454
Definition: buffer_defs.h:1102
int w_hl_attrs[HLF_COUNT]
&#39;winhighlight&#39; final attrs
Definition: buffer_defs.h:1123
Structure defining single local mark.
Definition: mark_defs.h:35
int b_ind_scopedecl_code
Definition: buffer_defs.h:761
Definition: buffer_defs.h:957
linenr_T wl_lastlnum
Definition: buffer_defs.h:924
long tp_ch_used
Definition: buffer_defs.h:894
char_u * tb_buf
Definition: buffer_defs.h:323
ScopeDictDictItem w_winvar
Variable for "w:" dictionary.
Definition: buffer_defs.h:1346
buffblock_T bh_first
Definition: buffer_defs.h:144
char_u * b_p_cfu
&#39;completefunc&#39;
Definition: buffer_defs.h:660
pos_T wi_fpos
Definition: buffer_defs.h:279
Definition: buffer_defs.h:491
char_u * b_p_qe
&#39;quoteescape&#39;
Definition: buffer_defs.h:694
ScopeDictDictItem b_bufvar
Variable for "b:" Dictionary.
Definition: buffer_defs.h:779
long priority
Menu order priority.
Definition: buffer_defs.h:1093
winopt_T wi_opt
Definition: buffer_defs.h:281
int diff
Definition: buffer_defs.h:1179
int b_mapped_ctrl_c
Definition: buffer_defs.h:819
char_u * b_ffname
Definition: buffer_defs.h:512
long b_p_smc
&#39;synmaxcol&#39;
Definition: buffer_defs.h:703
bool w_pos_changed
Definition: buffer_defs.h:1380
char_u * wo_fcs
Definition: buffer_defs.h:254
linenr_T wl_lnum
Definition: buffer_defs.h:920
Definition: buffer_defs.h:1037
colnr_T w_curswant
Definition: buffer_defs.h:1136
int b_ind_func_type
Definition: buffer_defs.h:745
colnr_T b_u_line_colnr
Definition: buffer_defs.h:615
pos_T w_ru_cursor
Definition: buffer_defs.h:1301
Definition: buffer_defs.h:322
long b_syn_sync_maxlines
Definition: buffer_defs.h:416
int priority
match priority
Definition: buffer_defs.h:1001
char wl_valid
Definition: buffer_defs.h:922
linenr_T b_sst_check_lnum
Definition: buffer_defs.h:443
int cur
internal position counter
Definition: buffer_defs.h:988
long b_syn_sync_minlines
Definition: buffer_defs.h:415
int b_start_bomb
Definition: buffer_defs.h:777
u_header_T * b_u_oldhead
Definition: buffer_defs.h:598
kvec_t(uint64_t) update_channels
int b_ind_cpp_baseclass
Definition: buffer_defs.h:749
int wo_spell
Definition: buffer_defs.h:222
Definition: coverity-model.c:40
long b_p_wm
&#39;wrapmargin&#39;
Definition: buffer_defs.h:709
int w_jumplistlen
Definition: buffer_defs.h:1361
char_u * b_p_spf
Definition: buffer_defs.h:452
Definition: option_defs.h:804
Callback b_prompt_callback
Definition: buffer_defs.h:802
int width
Definition: buffer_defs.h:1040
int eol
Definition: buffer_defs.h:1158
regprog_T * b_cap_prog
Definition: buffer_defs.h:451
Definition: garray.h:12
pos_T w_prev_pcmark
Definition: buffer_defs.h:1355
win_T * fr_win
Definition: buffer_defs.h:944
int b_ind_scopedecl
Definition: buffer_defs.h:760
Definition: extmark_defs.h:23
Definition: option_defs.h:855
handle_T handle
unique identifier for the window
Definition: buffer_defs.h:1112
char_u * b_p_ff
&#39;fileformat&#39;
Definition: buffer_defs.h:669
double row
Definition: buffer_defs.h:1041
buf_T * b_next
Definition: buffer_defs.h:497
int wb_endcol
Definition: buffer_defs.h:1104
int b_ind_paren_prev
Definition: buffer_defs.h:757
int b_p_ma
&#39;modifiable&#39;
Definition: buffer_defs.h:691
wininfo_T * wi_prev
Definition: buffer_defs.h:277
mapblock_T * b_first_abbr
Definition: buffer_defs.h:583
char_u * b_sfname
Definition: buffer_defs.h:513
match_T hl
struct for doing the actual highlighting
Definition: buffer_defs.h:1006
colnr_T w_virtcol
Definition: buffer_defs.h:1248
bool is_addpos
Definition: buffer_defs.h:967
bool wi_fold_manual
Definition: buffer_defs.h:282
qf_info_T * w_llist
Definition: buffer_defs.h:1397
winopt_T w_onebuf_opt
Definition: buffer_defs.h:1326
int stl
Definition: buffer_defs.h:1172
char_u * b_p_mps
&#39;matchpairs&#39;
Definition: buffer_defs.h:688
int msgsep
Definition: buffer_defs.h:1180
LuaRef on_lines
Definition: buffer_defs.h:466
Definition: memline_defs.h:43
char_u * b_p_gp
&#39;grepprg&#39; local value
Definition: buffer_defs.h:715
int w_valid
Definition: buffer_defs.h:1232
int b_p_ro
&#39;readonly&#39;
Definition: buffer_defs.h:695
Definition: buffer_defs.h:465
int w_height_request
Definition: buffer_defs.h:1220
int b_ind_continuation
Definition: buffer_defs.h:750
Definition: buffer_defs.h:998
long b_u_save_nr_last
Definition: buffer_defs.h:605
int w_upd_rows
Definition: buffer_defs.h:1294
char_u * b_p_fo
&#39;formatoptions&#39;
Definition: buffer_defs.h:671
Definition: buffer_defs.h:13
int tb_silent
Definition: buffer_defs.h:329
Definition: map.h:46
colnr_T w_old_cursor_lcol
last column for block visual part
Definition: buffer_defs.h:1151
LuaRef on_bytes
Definition: buffer_defs.h:467
int w_ru_topfill
Definition: buffer_defs.h:1305
vimmenu_T * next
Next item in menu.
Definition: buffer_defs.h:1099
pos_save_T w_save_cursor
Definition: buffer_defs.h:1214
long wo_fdl
Definition: buffer_defs.h:181
Stores an identifier of a script or channel that last set an option.
Definition: option_defs.h:864
visualinfo_T b_visual
Definition: buffer_defs.h:558
Definition: syntax_defs.h:53
size_t deleted_codeunits
Definition: buffer_defs.h:841
int b_ind_open_imag
Definition: buffer_defs.h:734
char m_expr
Definition: buffer_defs.h:359
long b_p_scbk
&#39;scrollback&#39;
Definition: buffer_defs.h:697
int w_winrow
Definition: buffer_defs.h:1207
int b_ind_unclosed_wrapped
Definition: buffer_defs.h:754
#define SNAP_COUNT
Definition: buffer_defs.h:877
char_u * wo_fde
Definition: buffer_defs.h:194
int tab2
second tab character
Definition: buffer_defs.h:1164
long b_p_sts_nopaste
b_p_sts saved for paste mode
Definition: buffer_defs.h:700
sctx_T m_script_ctx
Definition: buffer_defs.h:360
garray_T b_kmap_ga
Definition: buffer_defs.h:630
char_u * b_syn_linecont_pat
Definition: buffer_defs.h:418
int tb_off
Definition: buffer_defs.h:326
int w_nrwidth_width
Definition: buffer_defs.h:1395
int w_prev_fraction_row
Definition: buffer_defs.h:1391
bool b_u_synced
Definition: buffer_defs.h:603
long b_p_ul
&#39;undolevels&#39; local value
Definition: buffer_defs.h:726
Definition: buffer_defs.h:1026
uint64_t b_chartab[4]
Definition: buffer_defs.h:577
char_u * m_keys
Definition: buffer_defs.h:351
int b_ind_open_left_imag
Definition: buffer_defs.h:739
int enabled
for which modes the menu is enabled
Definition: buffer_defs.h:1085
int b_p_et_nopaste
b_p_et saved for paste mode
Definition: buffer_defs.h:667
struct w_line wline_T
linenr_T w_ru_topline
Definition: buffer_defs.h:1303
colnr_T w_old_cursor_fcol
first column for block visual part
Definition: buffer_defs.h:1150
char_u * tp_localdir
Absolute path of local cwd or NULL.
Definition: buffer_defs.h:904
int b_ind_no_brace
Definition: buffer_defs.h:735
typedef TV_DICTITEM_STRUCT(sizeof("changedtick")) ChangedtickDictItem
int b_start_ffc
Definition: buffer_defs.h:774
char_u * b_p_inex
&#39;includeexpr&#39;
Definition: buffer_defs.h:677
Terminal * terminal
Definition: buffer_defs.h:815
bool w_old_botfill
Definition: buffer_defs.h:1196
signlist_T * b_signlist
Definition: buffer_defs.h:811
char_u * b_p_tfu
&#39;tagfunc&#39;
Definition: buffer_defs.h:662
int b_ind_maxparen
Definition: buffer_defs.h:758
bool typebuf_valid
Definition: buffer_defs.h:337
linenr_T w_redraw_bot
Definition: buffer_defs.h:1297
char_u * wo_briopt
Definition: buffer_defs.h:166
int id
match ID
Definition: buffer_defs.h:1000
int w_lines_valid
Definition: buffer_defs.h:1278
int b_ind_unclosed
Definition: buffer_defs.h:751
frame_T * fr_prev
Definition: buffer_defs.h:940
vimmenu_T * children
Children of sub-menu.
Definition: buffer_defs.h:1097
Definition: buffer_defs.h:1111
int b_sst_len
Definition: buffer_defs.h:439
uint64_t b_orig_size
Definition: buffer_defs.h:550
int b_ind_close_extra
Definition: buffer_defs.h:738
WinStyle
Definition: buffer_defs.h:1032
FileID file_id
Definition: buffer_defs.h:517
Definition: typval.h:76
char_u * b_p_tc
&#39;tagcase&#39; local value
Definition: buffer_defs.h:722
FloatRelative
Definition: buffer_defs.h:1023
handle_T handle
Definition: buffer_defs.h:885
vimmenu_T * w_winbar
Definition: buffer_defs.h:1317
LuaRef on_detach
Definition: buffer_defs.h:469
int b_syn_containedin
Definition: buffer_defs.h:411
int b_p_si
&#39;smartindent&#39;
Definition: buffer_defs.h:698
unsigned int b_bkc_flags
flags for &#39;backupco
Definition: buffer_defs.h:644
Callback b_prompt_interrupt
Definition: buffer_defs.h:803
int b_ind_java
Definition: buffer_defs.h:762
int b_signcols_max
Definition: buffer_defs.h:812
int wo_crb_save
Definition: buffer_defs.h:248
buffheader_T save_readbuf1
Definition: buffer_defs.h:340
char_u * b_p_isk
&#39;iskeyword&#39;
Definition: buffer_defs.h:674
fmark_T fmark
Definition: buffer_defs.h:123
Definition: buffer_defs.h:292
int old_mod_mask
Definition: buffer_defs.h:339
char_u * b_p_nf
&#39;nrformats&#39;
Definition: buffer_defs.h:692
int m_noremap
Definition: buffer_defs.h:356
u_header_T * b_u_newhead
Definition: buffer_defs.h:599
int ae_fnum
Definition: buffer_defs.h:307
int b_ind_case_break
Definition: buffer_defs.h:743
long b_p_wm_nobin
b_p_wm saved for binary mode
Definition: buffer_defs.h:710
char_u * b_p_ofu
&#39;omnifunc&#39;
Definition: buffer_defs.h:661
win_T * tp_curwin
current window in this Tab page
Definition: buffer_defs.h:888
linenr_T first_lnum
Definition: buffer_defs.h:964
synstate_T * b_sst_array
Definition: buffer_defs.h:438
handle_T handle
Definition: buffer_defs.h:492
int b_ind_keep_case_label
Definition: buffer_defs.h:764
int handle_T
Definition: types.h:17
uint32_t b_p_inde_flags
flags for &#39;indentexpr&#39;
Definition: buffer_defs.h:680
qf_info_T * w_llist_ref
Definition: buffer_defs.h:1400
frame_T * fr_next
Definition: buffer_defs.h:938
linenr_T w_last_cursorline
where last &#39;cursorline&#39; was drawn
Definition: buffer_defs.h:1144
int b_nospell_cluster_id
Definition: buffer_defs.h:410
int stlnc
Definition: buffer_defs.h:1173
Definition: pos.h:35
int b_locked
Definition: buffer_defs.h:503
char_u * b_p_com
&#39;comments&#39;
Definition: buffer_defs.h:657
bool b_scanned
Definition: buffer_defs.h:617
long wo_fdn
Definition: buffer_defs.h:192
int b_ind_maxcomment
Definition: buffer_defs.h:759
long linenr_T
Definition: pos.h:4
Definition: buffer_defs.h:1014
char_u * b_p_spc
Definition: buffer_defs.h:450
int w_redr_type
Definition: buffer_defs.h:1293
bool b_may_swap
Definition: buffer_defs.h:786
Definition: marktree.h:59
bool b_saving
Definition: buffer_defs.h:532
Definition: hashtab.h:62
Definition: buffer_defs.h:1071
int wo_cuc
Definition: buffer_defs.h:224
Definition: buffer_defs.h:931
fmark_T b_changelist[JUMPLISTSIZE]
Definition: buffer_defs.h:569
pos_T w_cursor_corr
Definition: buffer_defs.h:1063
colnr_T w_old_visual_col
last known start of visual part
Definition: buffer_defs.h:1153
int b_p_et
&#39;expandtab&#39;
Definition: buffer_defs.h:665
int b_u_numhead
Definition: buffer_defs.h:602
long b_p_ts
&#39;tabstop&#39;
Definition: buffer_defs.h:705
Same as lpos_T, but with additional field len.
Definition: buffer_defs.h:975
int b_diff_failed
Definition: buffer_defs.h:846
bool focusable
Definition: buffer_defs.h:1045
int w_winbar_height
Definition: buffer_defs.h:1319
int wb_startcol
Definition: buffer_defs.h:1103
Definition: buffer_defs.h:1073
int64_t varnumber_T
Type used for VimL VAR_NUMBER values.
Definition: typval.h:26
Definition: buffer_defs.h:1013
diff_T * tp_first_diff
Definition: buffer_defs.h:897
long b_u_seq_last
Definition: buffer_defs.h:604
int fold
Definition: buffer_defs.h:1175
char_u * en_name
Definition: buffer_defs.h:1088
linenr_T b_mod_top
Definition: buffer_defs.h:541
bool b_spell
Definition: buffer_defs.h:797
int id
id of this arglist
Definition: buffer_defs.h:295
long tp_old_Columns
Columns when Tab page was left.
Definition: buffer_defs.h:893
win_T * tp_prevwin
previous window in this Tab page
Definition: buffer_defs.h:889
Definition: buffer_defs.h:1083
int16_t b_kmap_state
Definition: buffer_defs.h:627
colnr_T endcol
Definition: buffer_defs.h:966
frame_T * tp_topframe
topframe for the windows
Definition: buffer_defs.h:887
long b_p_sts
&#39;softtabstop&#39;
Definition: buffer_defs.h:699
char m_silent
Definition: buffer_defs.h:357
Definition: buffer_defs.h:399
char w_old_visual_mode
last known VIsual_mode
Definition: buffer_defs.h:1148
char_u * wo_winhl
Definition: buffer_defs.h:252
#define TAGSTACKSIZE
Maximum number of tags in tag stack.
Definition: mark_defs.h:32
char_u * b_p_flp
&#39;formatlistpat&#39;
Definition: buffer_defs.h:672
int w_cline_row
Definition: buffer_defs.h:1246
LastSet b_p_script_ctx[BV_COUNT]
Definition: buffer_defs.h:639
uint32_t w_p_fdt_flags
Definition: buffer_defs.h:1332
int b_p_ml_nobin
b_p_ml saved for binary mode
Definition: buffer_defs.h:690
Definition: highlight_defs.h:101
unsigned char char_u
Definition: types.h:11
char_u * b_p_cpt
&#39;complete&#39;
Definition: buffer_defs.h:659
buf_T * b_prev
Definition: buffer_defs.h:498
Definition: undo_defs.h:35
int foldsep
continuous fold marker
Definition: buffer_defs.h:1178
long b_mtime
Definition: buffer_defs.h:548
garray_T wi_folds
Definition: buffer_defs.h:283
long b_mod_xlines
Definition: buffer_defs.h:544
Definition: buffer_defs.h:349
int b_changed
Definition: buffer_defs.h:519
long wo_cole
Definition: buffer_defs.h:244
char_u * b_p_cino
&#39;cinoptions&#39;
Definition: buffer_defs.h:654
int b_ind_hash_comment
Definition: buffer_defs.h:765
char_u * wo_stl
Definition: buffer_defs.h:230
char_u * b_p_bh
&#39;bufhidden&#39;
Definition: buffer_defs.h:648
char_u * tagname
Definition: buffer_defs.h:122
linenr_T w_nrwidth_line_count
Definition: buffer_defs.h:1393
colnr_T w_leftcol
Definition: buffer_defs.h:1197
Definition: grid_defs.h:38
int b_p_ar
&#39;autoread&#39; local value
Definition: buffer_defs.h:720
alist_T * w_alist
Definition: buffer_defs.h:1310
synblock_T * w_s
for :ownsyntax
Definition: buffer_defs.h:1117
Definition: buffer_defs.h:869
lpos_T bufpos
Definition: buffer_defs.h:1039
char_u * b_p_menc
&#39;makeencoding&#39;
Definition: buffer_defs.h:687
long b_u_save_nr_cur
Definition: buffer_defs.h:608
bool w_briopt_sbr
Definition: buffer_defs.h:1339
Definition: regexp_defs.h:55
int wo_list
Definition: buffer_defs.h:202
bool file_id_valid
Definition: buffer_defs.h:516
syn_time_T b_syn_linecont_time
Definition: buffer_defs.h:420
Definition: sign_defs.h:23
pos_T b_op_end
Definition: buffer_defs.h:591
int LuaRef
Definition: types.h:22
char_u * ae_fname
Definition: buffer_defs.h:306
char_u * b_fname
Definition: buffer_defs.h:514
pos_T w_cursor
cursor position in buffer
Definition: buffer_defs.h:1134
char_u * b_p_keymap
&#39;keymap&#39;
Definition: buffer_defs.h:712
long w_p_siso
Definition: buffer_defs.h:1334
int wo_crb
Definition: buffer_defs.h:246
int b_p_cin
&#39;cindent&#39;
Definition: buffer_defs.h:653
synstate_T * b_sst_first
Definition: buffer_defs.h:440
Definition: pos.h:25
int w_nrwidth
Definition: buffer_defs.h:1286
memline_T b_ml
Definition: buffer_defs.h:495
Definition: buffer_defs.h:1025
int w_width
Definition: buffer_defs.h:1212
int b_ind_open_extra
Definition: buffer_defs.h:737
int w_status_height
Definition: buffer_defs.h:1210
char_u * start
Definition: buffer_defs.h:367
win_T * wi_win
Definition: buffer_defs.h:278
char_u * wo_fdt
Definition: buffer_defs.h:196
time_t b_last_used
Definition: buffer_defs.h:552
int b_p_eol
&#39;endofline&#39;
Definition: buffer_defs.h:663
int w_cline_height
Definition: buffer_defs.h:1243
proftime_T tm
Definition: buffer_defs.h:968
wininfo_T * wi_next
Definition: buffer_defs.h:276
int b_cjk
Definition: buffer_defs.h:455
winbar_item_T * w_winbar_items
Definition: buffer_defs.h:1318
hashtab_T b_keywtab
Definition: buffer_defs.h:400
int cur_match
Definition: buffer_defs.h:124
int b_ind_unclosed_noignore
Definition: buffer_defs.h:753
int b_ind_comment
Definition: buffer_defs.h:746
regmmatch_T rm
Definition: buffer_defs.h:958
Definition: regexp_defs.h:70
char_u * wo_fmr
Definition: buffer_defs.h:198
int b_p_et_nobin
b_p_et saved for binary mode
Definition: buffer_defs.h:666
time_t b_u_time_cur
Definition: buffer_defs.h:607
linenr_T w_topline
Definition: buffer_defs.h:1188
varnumber_T b_last_changedtick_pum
Definition: buffer_defs.h:529
Definition: typval.h:265
int wo_nu
Definition: buffer_defs.h:204
linenr_T w_redraw_top
Definition: buffer_defs.h:1296
int w_hl_needs_update
attrs need to be recalculated
Definition: buffer_defs.h:1125
char_u * b_p_ft
&#39;filetype&#39;
Definition: buffer_defs.h:670
fmark_T b_last_insert
Definition: buffer_defs.h:563
pos_T w_last_cursormoved
for CursorMoved event
Definition: buffer_defs.h:1145
char_u * b_p_indk
&#39;indentkeys&#39;
Definition: buffer_defs.h:681
char wl_folded
Definition: buffer_defs.h:923
int b_ind_param
Definition: buffer_defs.h:744
long b_p_channel
&#39;channel&#39;
Definition: buffer_defs.h:652
synstate_T * b_sst_firstfree
Definition: buffer_defs.h:441
ScreenGrid w_grid
Definition: buffer_defs.h:1379
Definition: undo_defs.h:13
int b_p_ai_nopaste
b_p_ai saved for paste mode
Definition: buffer_defs.h:642
char_u * wo_fdc_save
Definition: buffer_defs.h:172
buf_T * br_buf
Definition: buffer_defs.h:14
int userhl
Definition: buffer_defs.h:368
int vert
Definition: buffer_defs.h:1174
Definition: terminal.c:105
Definition: buffer_defs.h:121
typebuf_T save_typebuf
Definition: buffer_defs.h:336
long match
Definition: buffer_defs.h:392
int conceal_char
cchar for Conceal highlighting
Definition: buffer_defs.h:1007
int prec
Definition: buffer_defs.h:1160
Definition: buffer_defs.h:1076
Window window
Definition: buffer_defs.h:1038
Definition: buffer_defs.h:388
char_u * b_p_dict
&#39;dictionary&#39; local value
Definition: buffer_defs.h:724
int b_p_bomb
&#39;bomb&#39;
Definition: buffer_defs.h:647
int b_ind_case_code
Definition: buffer_defs.h:742
char w_topline_was_set
Definition: buffer_defs.h:1190
int wo_fen_save
Definition: buffer_defs.h:176
regmmatch_T match
regexp program for pattern
Definition: buffer_defs.h:1004
int attr_cur
Definition: buffer_defs.h:963
EXTERN int curbuf_splice_pending INIT(=0)
char_u * user_data
Definition: buffer_defs.h:126
uint64_t proftime_T
Definition: profile.h:7
int b_p_bin
&#39;binary&#39;
Definition: buffer_defs.h:646
size_t bh_space
Definition: buffer_defs.h:147
int w_height
Definition: buffer_defs.h:1208
int b_p_inf
&#39;infercase&#39;
Definition: buffer_defs.h:673
colnr_T startcol
Definition: buffer_defs.h:965
size_t deleted_codepoints
Definition: buffer_defs.h:840
char_u * b_p_inc
&#39;include&#39;
Definition: buffer_defs.h:676
tabpage_T * tp_next
next tabpage or NULL
Definition: buffer_defs.h:886
char_u * pattern
pattern to highlight
Definition: buffer_defs.h:1002
char_u * wo_lcs
Definition: buffer_defs.h:256
wininfo_T * b_wininfo
Definition: buffer_defs.h:546
vimmenu_T * parent
Parent of menu.
Definition: buffer_defs.h:1098
Definition: buffer_defs.h:1074
int * w_p_cc_cols
Definition: buffer_defs.h:1333
int w_hl_attr_normal
&#39;winhighlight&#39; normal final attrs
Definition: buffer_defs.h:1120
colnr_T col
column number
Definition: buffer_defs.h:978
bool w_cline_folded
Definition: buffer_defs.h:1244
int ext
Definition: buffer_defs.h:1159