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