Data Structures | Macros | Typedefs | Functions
buffer_defs.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "nvim/garray.h"
#include "nvim/grid_defs.h"
#include "nvim/highlight_defs.h"
#include "nvim/pos.h"
#include "nvim/option_defs.h"
#include "nvim/mark_defs.h"
#include "nvim/undo_defs.h"
#include "nvim/hashtab.h"
#include "nvim/eval/typval.h"
#include "nvim/profile.h"
#include "nvim/api/private/defs.h"
#include "nvim/map.h"
#include "nvim/lib/kvec.h"
#include "nvim/memline_defs.h"
#include "nvim/memfile_defs.h"
#include "nvim/regexp_defs.h"
#include "nvim/syntax_defs.h"
#include "nvim/sign_defs.h"
#include "nvim/bufhl_defs.h"
#include "nvim/os/fs_defs.h"
#include "nvim/terminal.h"

Go to the source code of this file.

Data Structures

struct  bufref_T
 
struct  taggy
 
struct  buffblock
 
struct  buffheader
 
struct  save_redo_T
 
struct  winopt_T
 
struct  wininfo_S
 
struct  arglist
 
struct  argentry
 
struct  typebuf_T
 
struct  tasave_T
 
struct  mapblock
 
struct  stl_hlrec
 
struct  syn_time_T
 
struct  synblock_T
 
struct  file_buffer
 
struct  diffblock_S
 
struct  tabpage_S
 
struct  w_line
 
struct  frame_S
 
struct  match_T
 
struct  llpos_T
 Same as lpos_T, but with additional field len. More...
 
struct  posmatch
 
struct  matchitem
 
struct  window_S
 

Macros

#define GETFILE_SUCCESS(x)   ((x) <= 0)
 
#define MODIFIABLE(buf)   (buf->b_p_ma)
 
#define VALID_WROW   0x01 /* w_wrow (window row) is valid */
 
#define VALID_WCOL   0x02 /* w_wcol (window col) is valid */
 
#define VALID_VIRTCOL   0x04 /* w_virtcol (file col) is valid */
 
#define VALID_CHEIGHT   0x08 /* w_cline_height and w_cline_folded valid */
 
#define VALID_CROW   0x10 /* w_cline_row is valid */
 
#define VALID_BOTLINE   0x20 /* w_botine and w_empty_rows are valid */
 
#define VALID_BOTLINE_AP   0x40 /* w_botine is approximated */
 
#define VALID_TOPLINE   0x80 /* w_topline is valid (for cursor position) */
 
#define BF_RECOVERED   0x01
 
#define BF_CHECK_RO   0x02
 
#define BF_NEVERLOADED   0x04
 
#define BF_NOTEDITED   0x08
 
#define BF_NEW   0x10
 
#define BF_NEW_W   0x20
 
#define BF_READERR   0x40
 
#define BF_DUMMY   0x80
 
#define BF_PRESERVED   0x100
 
#define BF_WRITE_MASK   (BF_NOTEDITED + BF_NEW + BF_READERR)
 
#define w_p_arab   w_onebuf_opt.wo_arab /* 'arabic' */
 
#define w_p_bri   w_onebuf_opt.wo_bri
 
#define w_p_briopt   w_onebuf_opt.wo_briopt /* 'breakindentopt' */
 
#define w_p_diff   w_onebuf_opt.wo_diff /* 'diff' */
 
#define w_p_fdc   w_onebuf_opt.wo_fdc /* 'foldcolumn' */
 
#define w_p_fdc_save   w_onebuf_opt.wo_fdc_save /* 'foldenable' saved for diff mode */
 
#define w_p_fen   w_onebuf_opt.wo_fen /* 'foldenable' */
 
#define w_p_fen_save   w_onebuf_opt.wo_fen_save /* 'foldenable' saved for diff mode */
 
#define w_p_fdi   w_onebuf_opt.wo_fdi /* 'foldignore' */
 
#define w_p_fdl   w_onebuf_opt.wo_fdl /* 'foldlevel' */
 
#define w_p_fdl_save   w_onebuf_opt.wo_fdl_save /* 'foldlevel' state saved for diff mode */
 
#define w_p_fdm   w_onebuf_opt.wo_fdm /* 'foldmethod' */
 
#define w_p_fdm_save   w_onebuf_opt.wo_fdm_save /* 'fdm' saved for diff mode */
 
#define w_p_fml   w_onebuf_opt.wo_fml /* 'foldminlines' */
 
#define w_p_fdn   w_onebuf_opt.wo_fdn /* 'foldnestmax' */
 
#define w_p_fde   w_onebuf_opt.wo_fde /* 'foldexpr' */
 
#define w_p_fdt   w_onebuf_opt.wo_fdt /* 'foldtext' */
 
#define w_p_fmr   w_onebuf_opt.wo_fmr /* 'foldmarker' */
 
#define w_p_lbr   w_onebuf_opt.wo_lbr /* 'linebreak' */
 
#define w_p_list   w_onebuf_opt.wo_list /* 'list' */
 
#define w_p_nu   w_onebuf_opt.wo_nu /* 'number' */
 
#define w_p_rnu   w_onebuf_opt.wo_rnu /* 'relativenumber' */
 
#define w_p_nuw   w_onebuf_opt.wo_nuw /* 'numberwidth' */
 
#define w_p_wfh   w_onebuf_opt.wo_wfh /* 'winfixheight' */
 
#define w_p_wfw   w_onebuf_opt.wo_wfw /* 'winfixwidth' */
 
#define w_p_pvw   w_onebuf_opt.wo_pvw /* 'previewwindow' */
 
#define w_p_rl   w_onebuf_opt.wo_rl /* 'rightleft' */
 
#define w_p_rlc   w_onebuf_opt.wo_rlc /* 'rightleftcmd' */
 
#define w_p_scr   w_onebuf_opt.wo_scr /* 'scroll' */
 
#define w_p_spell   w_onebuf_opt.wo_spell /* 'spell' */
 
#define w_p_cuc   w_onebuf_opt.wo_cuc /* 'cursorcolumn' */
 
#define w_p_cul   w_onebuf_opt.wo_cul /* 'cursorline' */
 
#define w_p_cc   w_onebuf_opt.wo_cc /* 'colorcolumn' */
 
#define w_p_stl   w_onebuf_opt.wo_stl /* 'statusline' */
 
#define w_p_scb   w_onebuf_opt.wo_scb /* 'scrollbind' */
 
#define w_p_diff_saved   w_onebuf_opt.wo_diff_saved
 
#define w_p_scb_save   w_onebuf_opt.wo_scb_save
 
#define w_p_wrap   w_onebuf_opt.wo_wrap /* 'wrap' */
 
#define w_p_wrap_save   w_onebuf_opt.wo_wrap_save
 
#define w_p_cocu   w_onebuf_opt.wo_cocu
 
#define w_p_cole   w_onebuf_opt.wo_cole
 
#define w_p_crb   w_onebuf_opt.wo_crb /* 'cursorbind' */
 
#define w_p_crb_save   w_onebuf_opt.wo_crb_save
 
#define w_p_scl   w_onebuf_opt.wo_scl
 
#define w_p_winhl   w_onebuf_opt.wo_winhl
 
#define w_p_scriptID   w_onebuf_opt.wo_scriptID
 
#define ALIST(win)   (win)->w_alist
 
#define GARGLIST   ((aentry_T *)global_alist.al_ga.ga_data)
 
#define ARGLIST   ((aentry_T *)ALIST(curwin)->al_ga.ga_data)
 
#define WARGLIST(wp)   ((aentry_T *)ALIST(wp)->al_ga.ga_data)
 
#define AARGLIST(al)   ((aentry_T *)((al)->al_ga.ga_data))
 
#define GARGCOUNT   (global_alist.al_ga.ga_len)
 
#define ARGCOUNT   (ALIST(curwin)->al_ga.ga_len)
 
#define WARGCOUNT(wp)   (ALIST(wp)->al_ga.ga_len)
 
#define SYNSPL_DEFAULT   0 /* spell check if @Spell not defined */
 
#define SYNSPL_TOP   1 /* spell check toplevel text */
 
#define SYNSPL_NOTOP   2 /* don't spell check toplevel text */
 
#define B_SPELL(buf)   ((buf)->b_spell)
 
#define BUF_HAS_QF_ENTRY   1
 
#define BUF_HAS_LL_ENTRY   2
 
#define MAX_MAPHASH   256
 
#define b_fnum   handle
 
#define B_IMODE_USE_INSERT   -1
 
#define B_IMODE_NONE   0
 
#define B_IMODE_LMAP   1
 
#define B_IMODE_LAST   1
 
#define KEYMAP_INIT   1 /* 'keymap' was set, call keymap_init() */
 
#define KEYMAP_LOADED   2 /* 'keymap' mappings have been loaded */
 
#define DB_COUNT   8
 
#define SNAP_HELP_IDX   0
 
#define SNAP_AUCMD_IDX   1
 
#define SNAP_COUNT   2
 
#define FR_LEAF   0 /* frame is a leaf */
 
#define FR_ROW   1 /* frame with a row of windows */
 
#define FR_COL   2 /* frame with a column of windows */
 
#define MAXPOSMATCH   8
 number of positions supported by matchaddpos() More...
 
#define GLOBAL_WO(p)   ((char *)p + sizeof(winopt_T))
 
#define CHANGEDTICK(buf)   (=== Include buffer.h & use buf_(get|set|inc)_changedtick ===)
 Macros defined in Vim, but not in Neovim. More...
 

Typedefs

typedef struct file_buffer buf_T
 
typedef struct window_S win_T
 
typedef struct wininfo_S wininfo_T
 
typedef struct frame_S frame_T
 
typedef uint16_t disptick_T
 
typedef struct taggy taggy_T
 
typedef struct buffblock buffblock_T
 
typedef struct buffheader buffheader_T
 
typedef struct arglist alist_T
 
typedef struct argentry aentry_T
 
typedef struct mapblock mapblock_T
 
typedef struct qf_info_S qf_info_T
 
typedef struct diffblock_S diff_T
 
typedef struct tabpage_S tabpage_T
 
typedef struct w_line wline_T
 
typedef struct posmatch posmatch_T
 
typedef struct matchitem matchitem_T
 

Functions

typedef TV_DICTITEM_STRUCT (sizeof("changedtick")) ChangedtickDictItem
 

Macro Definition Documentation

#define AARGLIST (   al)    ((aentry_T *)((al)->al_ga.ga_data))
#define ALIST (   win)    (win)->w_alist
#define ARGCOUNT   (ALIST(curwin)->al_ga.ga_len)
#define ARGLIST   ((aentry_T *)ALIST(curwin)->al_ga.ga_data)
#define b_fnum   handle
#define B_IMODE_LAST   1
#define B_IMODE_LMAP   1
#define B_IMODE_NONE   0
#define B_IMODE_USE_INSERT   -1
#define B_SPELL (   buf)    ((buf)->b_spell)
#define BF_CHECK_RO   0x02
#define BF_DUMMY   0x80
#define BF_NEVERLOADED   0x04
#define BF_NEW   0x10
#define BF_NEW_W   0x20
#define BF_NOTEDITED   0x08
#define BF_PRESERVED   0x100
#define BF_READERR   0x40
#define BF_RECOVERED   0x01
#define BF_WRITE_MASK   (BF_NOTEDITED + BF_NEW + BF_READERR)
#define BUF_HAS_LL_ENTRY   2
#define BUF_HAS_QF_ENTRY   1
#define CHANGEDTICK (   buf)    (=== Include buffer.h & use buf_(get|set|inc)_changedtick ===)

Macros defined in Vim, but not in Neovim.

#define DB_COUNT   8
#define FR_COL   2 /* frame with a column of windows */
#define FR_LEAF   0 /* frame is a leaf */
#define FR_ROW   1 /* frame with a row of windows */
#define GARGCOUNT   (global_alist.al_ga.ga_len)
#define GARGLIST   ((aentry_T *)global_alist.al_ga.ga_data)
#define GETFILE_SUCCESS (   x)    ((x) <= 0)
#define GLOBAL_WO (   p)    ((char *)p + sizeof(winopt_T))
#define KEYMAP_INIT   1 /* 'keymap' was set, call keymap_init() */
#define KEYMAP_LOADED   2 /* 'keymap' mappings have been loaded */
#define MAX_MAPHASH   256
#define MAXPOSMATCH   8

number of positions supported by matchaddpos()

#define MODIFIABLE (   buf)    (buf->b_p_ma)
#define SNAP_AUCMD_IDX   1
#define SNAP_COUNT   2
#define SNAP_HELP_IDX   0
#define SYNSPL_DEFAULT   0 /* spell check if @Spell not defined */
#define SYNSPL_NOTOP   2 /* don't spell check toplevel text */
#define SYNSPL_TOP   1 /* spell check toplevel text */
#define VALID_BOTLINE   0x20 /* w_botine and w_empty_rows are valid */
#define VALID_BOTLINE_AP   0x40 /* w_botine is approximated */
#define VALID_CHEIGHT   0x08 /* w_cline_height and w_cline_folded valid */
#define VALID_CROW   0x10 /* w_cline_row is valid */
#define VALID_TOPLINE   0x80 /* w_topline is valid (for cursor position) */
#define VALID_VIRTCOL   0x04 /* w_virtcol (file col) is valid */
#define VALID_WCOL   0x02 /* w_wcol (window col) is valid */
#define VALID_WROW   0x01 /* w_wrow (window row) is valid */
#define w_p_arab   w_onebuf_opt.wo_arab /* 'arabic' */
#define w_p_bri   w_onebuf_opt.wo_bri
#define w_p_briopt   w_onebuf_opt.wo_briopt /* 'breakindentopt' */
#define w_p_cc   w_onebuf_opt.wo_cc /* 'colorcolumn' */
#define w_p_cocu   w_onebuf_opt.wo_cocu
#define w_p_cole   w_onebuf_opt.wo_cole
#define w_p_crb   w_onebuf_opt.wo_crb /* 'cursorbind' */
#define w_p_crb_save   w_onebuf_opt.wo_crb_save
#define w_p_cuc   w_onebuf_opt.wo_cuc /* 'cursorcolumn' */
#define w_p_cul   w_onebuf_opt.wo_cul /* 'cursorline' */
#define w_p_diff   w_onebuf_opt.wo_diff /* 'diff' */
#define w_p_diff_saved   w_onebuf_opt.wo_diff_saved
#define w_p_fdc   w_onebuf_opt.wo_fdc /* 'foldcolumn' */
#define w_p_fdc_save   w_onebuf_opt.wo_fdc_save /* 'foldenable' saved for diff mode */
#define w_p_fde   w_onebuf_opt.wo_fde /* 'foldexpr' */
#define w_p_fdi   w_onebuf_opt.wo_fdi /* 'foldignore' */
#define w_p_fdl   w_onebuf_opt.wo_fdl /* 'foldlevel' */
#define w_p_fdl_save   w_onebuf_opt.wo_fdl_save /* 'foldlevel' state saved for diff mode */
#define w_p_fdm   w_onebuf_opt.wo_fdm /* 'foldmethod' */
#define w_p_fdm_save   w_onebuf_opt.wo_fdm_save /* 'fdm' saved for diff mode */
#define w_p_fdn   w_onebuf_opt.wo_fdn /* 'foldnestmax' */
#define w_p_fdt   w_onebuf_opt.wo_fdt /* 'foldtext' */
#define w_p_fen   w_onebuf_opt.wo_fen /* 'foldenable' */
#define w_p_fen_save   w_onebuf_opt.wo_fen_save /* 'foldenable' saved for diff mode */
#define w_p_fml   w_onebuf_opt.wo_fml /* 'foldminlines' */
#define w_p_fmr   w_onebuf_opt.wo_fmr /* 'foldmarker' */
#define w_p_lbr   w_onebuf_opt.wo_lbr /* 'linebreak' */
#define w_p_list   w_onebuf_opt.wo_list /* 'list' */
#define w_p_nu   w_onebuf_opt.wo_nu /* 'number' */
#define w_p_nuw   w_onebuf_opt.wo_nuw /* 'numberwidth' */
#define w_p_pvw   w_onebuf_opt.wo_pvw /* 'previewwindow' */
#define w_p_rl   w_onebuf_opt.wo_rl /* 'rightleft' */
#define w_p_rlc   w_onebuf_opt.wo_rlc /* 'rightleftcmd' */
#define w_p_rnu   w_onebuf_opt.wo_rnu /* 'relativenumber' */
#define w_p_scb   w_onebuf_opt.wo_scb /* 'scrollbind' */
#define w_p_scb_save   w_onebuf_opt.wo_scb_save
#define w_p_scl   w_onebuf_opt.wo_scl
#define w_p_scr   w_onebuf_opt.wo_scr /* 'scroll' */
#define w_p_scriptID   w_onebuf_opt.wo_scriptID
#define w_p_spell   w_onebuf_opt.wo_spell /* 'spell' */
#define w_p_stl   w_onebuf_opt.wo_stl /* 'statusline' */
#define w_p_wfh   w_onebuf_opt.wo_wfh /* 'winfixheight' */
#define w_p_wfw   w_onebuf_opt.wo_wfw /* 'winfixwidth' */
#define w_p_winhl   w_onebuf_opt.wo_winhl
#define w_p_wrap   w_onebuf_opt.wo_wrap /* 'wrap' */
#define w_p_wrap_save   w_onebuf_opt.wo_wrap_save
#define WARGCOUNT (   wp)    (ALIST(wp)->al_ga.ga_len)
#define WARGLIST (   wp)    ((aentry_T *)ALIST(wp)->al_ga.ga_data)

Typedef Documentation

typedef struct argentry aentry_T
typedef struct arglist alist_T
typedef struct file_buffer buf_T
typedef struct buffblock buffblock_T
typedef struct buffheader buffheader_T
typedef struct diffblock_S diff_T
typedef uint16_t disptick_T
typedef struct frame_S frame_T
typedef struct mapblock mapblock_T
typedef struct matchitem matchitem_T
typedef struct posmatch posmatch_T

posmatch_T provides an array for storing match items for matchaddpos() function.

typedef struct qf_info_S qf_info_T
typedef struct tabpage_S tabpage_T

Tab pages point to the top frame of each tab page. Note: Most values are NOT valid for the current tab page! Use "curwin", "firstwin", etc. for that. "tp_topframe" is always valid and can be compared against "topframe" to find the current tab page.

typedef struct taggy taggy_T
typedef struct window_S win_T
typedef struct wininfo_S wininfo_T
typedef struct w_line wline_T

Function Documentation

typedef TV_DICTITEM_STRUCT ( sizeof("changedtick")  )

Type used for changedtick_di member in buf_T

Primary exists so that literals of relevant type can be made.