Data Structures | Macros | Typedefs | Enumerations | 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/marktree.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/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  stl_item
 
struct  syn_time_T
 
struct  synblock_T
 
struct  BufUpdateCallbacks
 
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  FloatConfig
 
struct  pos_save_T
 
struct  VimMenu
 
struct  window_S
 

Macros

#define GETFILE_SUCCESS(x)   ((x) <= 0)
 
#define MODIFIABLE(buf)   (buf->b_p_ma)
 
#define VALID_WROW   0x01
 
#define VALID_WCOL   0x02
 
#define VALID_VIRTCOL   0x04
 
#define VALID_CHEIGHT   0x08
 
#define VALID_CROW   0x10
 
#define VALID_BOTLINE   0x20
 
#define VALID_BOTLINE_AP   0x40
 
#define VALID_TOPLINE   0x80
 
#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_SYN_SET   0x200
 
#define BF_WRITE_MASK   (BF_NOTEDITED + BF_NEW + BF_READERR)
 
#define w_p_arab   w_onebuf_opt.wo_arab
 
#define w_p_bri   w_onebuf_opt.wo_bri
 
#define w_p_briopt   w_onebuf_opt.wo_briopt
 
#define w_p_diff   w_onebuf_opt.wo_diff
 
#define w_p_fdc   w_onebuf_opt.wo_fdc
 
#define w_p_fdc_save   w_onebuf_opt.wo_fdc_save
 
#define w_p_fen   w_onebuf_opt.wo_fen
 
#define w_p_fen_save   w_onebuf_opt.wo_fen_save
 
#define w_p_fdi   w_onebuf_opt.wo_fdi
 
#define w_p_fdl   w_onebuf_opt.wo_fdl
 
#define w_p_fdl_save   w_onebuf_opt.wo_fdl_save
 
#define w_p_fdm   w_onebuf_opt.wo_fdm
 
#define w_p_fdm_save   w_onebuf_opt.wo_fdm_save
 
#define w_p_fml   w_onebuf_opt.wo_fml
 
#define w_p_fdn   w_onebuf_opt.wo_fdn
 
#define w_p_fde   w_onebuf_opt.wo_fde
 
#define w_p_fdt   w_onebuf_opt.wo_fdt
 
#define w_p_fmr   w_onebuf_opt.wo_fmr
 
#define w_p_lbr   w_onebuf_opt.wo_lbr
 
#define w_p_list   w_onebuf_opt.wo_list
 
#define w_p_nu   w_onebuf_opt.wo_nu
 
#define w_p_rnu   w_onebuf_opt.wo_rnu
 
#define w_p_nuw   w_onebuf_opt.wo_nuw
 
#define w_p_wfh   w_onebuf_opt.wo_wfh
 
#define w_p_wfw   w_onebuf_opt.wo_wfw
 
#define w_p_pvw   w_onebuf_opt.wo_pvw
 
#define w_p_rl   w_onebuf_opt.wo_rl
 
#define w_p_rlc   w_onebuf_opt.wo_rlc
 
#define w_p_scr   w_onebuf_opt.wo_scr
 
#define w_p_spell   w_onebuf_opt.wo_spell
 
#define w_p_cuc   w_onebuf_opt.wo_cuc
 
#define w_p_cul   w_onebuf_opt.wo_cul
 
#define w_p_culopt   w_onebuf_opt.wo_culopt
 
#define w_p_cc   w_onebuf_opt.wo_cc
 
#define w_p_sbr   w_onebuf_opt.wo_sbr
 
#define w_p_stl   w_onebuf_opt.wo_stl
 
#define w_p_scb   w_onebuf_opt.wo_scb
 
#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
 
#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
 
#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_fcs   w_onebuf_opt.wo_fcs
 
#define w_p_lcs   w_onebuf_opt.wo_lcs
 
#define w_p_winbl   w_onebuf_opt.wo_winbl
 
#define w_p_script_ctx   w_onebuf_opt.wo_script_ctx
 
#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
 
#define SYNSPL_TOP   1
 
#define SYNSPL_NOTOP   2
 
#define SYNFLD_START   0
 
#define SYNFLD_MINIMUM   1
 
#define B_SPELL(buf)   ((buf)->b_spell)
 
#define BUF_UPDATE_CALLBACKS_INIT
 
#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
 
#define KEYMAP_LOADED   2
 
#define DB_COUNT   8
 
#define SNAP_HELP_IDX   0
 
#define SNAP_AUCMD_IDX   1
 
#define SNAP_COUNT   2
 
#define FR_LEAF   0
 
#define FR_ROW   1
 
#define FR_COL   2
 
#define MAXPOSMATCH   8
 number of positions supported by matchaddpos() More...
 
#define FLOAT_CONFIG_INIT
 
#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 stl_hlrec stl_hlrec_t
 Used for highlighting in the status line. More...
 
typedef struct stl_item stl_item_t
 Used for building the status line. More...
 
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
 
typedef int FloatAnchor
 
typedef struct VimMenu vimmenu_T
 

Enumerations

enum  { kFloatAnchorEast = 1, kFloatAnchorSouth = 2 }
 
enum  FloatRelative { kFloatRelativeEditor = 0, kFloatRelativeWindow = 1, kFloatRelativeCursor = 2 }
 
enum  WinStyle { kWinStyleUnused = 0, kWinStyleMinimal }
 
enum  {
  MENU_INDEX_INVALID = -1, MENU_INDEX_NORMAL = 0, MENU_INDEX_VISUAL = 1, MENU_INDEX_SELECT = 2,
  MENU_INDEX_OP_PENDING = 3, MENU_INDEX_INSERT = 4, MENU_INDEX_CMDLINE = 5, MENU_INDEX_TIP = 6,
  MENU_MODES = 7
}
 

Functions

typedef TV_DICTITEM_STRUCT (sizeof("changedtick")) ChangedtickDictItem
 
EXTERN int curbuf_splice_pending INIT (=0)
 

Macro Definition Documentation

◆ AARGLIST

#define AARGLIST (   al)    ((aentry_T *)((al)->al_ga.ga_data))

◆ ALIST

#define ALIST (   win)    (win)->w_alist

◆ ARGCOUNT

#define ARGCOUNT   (ALIST(curwin)->al_ga.ga_len)

◆ ARGLIST

#define ARGLIST   ((aentry_T *)ALIST(curwin)->al_ga.ga_data)

◆ B_SPELL

#define B_SPELL (   buf)    ((buf)->b_spell)

◆ BF_CHECK_RO

#define BF_CHECK_RO   0x02

◆ BF_DUMMY

#define BF_DUMMY   0x80

◆ BF_NEVERLOADED

#define BF_NEVERLOADED   0x04

◆ BF_NEW

#define BF_NEW   0x10

◆ BF_NEW_W

#define BF_NEW_W   0x20

◆ BF_NOTEDITED

#define BF_NOTEDITED   0x08

◆ BF_PRESERVED

#define BF_PRESERVED   0x100

◆ BF_READERR

#define BF_READERR   0x40

◆ BF_RECOVERED

#define BF_RECOVERED   0x01

◆ BF_SYN_SET

#define BF_SYN_SET   0x200

◆ BF_WRITE_MASK

#define BF_WRITE_MASK   (BF_NOTEDITED + BF_NEW + BF_READERR)

◆ BUF_HAS_LL_ENTRY

#define BUF_HAS_LL_ENTRY   2

◆ BUF_HAS_QF_ENTRY

#define BUF_HAS_QF_ENTRY   1

◆ BUF_UPDATE_CALLBACKS_INIT

#define BUF_UPDATE_CALLBACKS_INIT
Value:
{ LUA_NOREF, LUA_NOREF, LUA_NOREF, \
LUA_NOREF, LUA_NOREF, false, false }

◆ DB_COUNT

#define DB_COUNT   8

◆ FLOAT_CONFIG_INIT

#define FLOAT_CONFIG_INIT
Value:
((FloatConfig){ .height = 0, .width = 0, \
.bufpos = { -1, 0 }, \
.row = 0, .col = 0, .anchor = 0, \
.relative = 0, .external = false, \
.focusable = true, \
.zindex = kZIndexFloatDefault, \
.style = kWinStyleUnused, \
.noautocmd = false })

◆ FR_COL

#define FR_COL   2

◆ FR_LEAF

#define FR_LEAF   0

◆ FR_ROW

#define FR_ROW   1

◆ GARGCOUNT

#define GARGCOUNT   (global_alist.al_ga.ga_len)

◆ GARGLIST

#define GARGLIST   ((aentry_T *)global_alist.al_ga.ga_data)

◆ GETFILE_SUCCESS

#define GETFILE_SUCCESS (   x)    ((x) <= 0)

◆ MAX_MAPHASH

#define MAX_MAPHASH   256

◆ MAXPOSMATCH

#define MAXPOSMATCH   8

number of positions supported by matchaddpos()

◆ MODIFIABLE

#define MODIFIABLE (   buf)    (buf->b_p_ma)

◆ SNAP_AUCMD_IDX

#define SNAP_AUCMD_IDX   1

◆ SNAP_COUNT

#define SNAP_COUNT   2

◆ SNAP_HELP_IDX

#define SNAP_HELP_IDX   0

◆ SYNFLD_MINIMUM

#define SYNFLD_MINIMUM   1

◆ SYNFLD_START

#define SYNFLD_START   0

◆ SYNSPL_DEFAULT

#define SYNSPL_DEFAULT   0

◆ SYNSPL_NOTOP

#define SYNSPL_NOTOP   2

◆ SYNSPL_TOP

#define SYNSPL_TOP   1

◆ VALID_BOTLINE

#define VALID_BOTLINE   0x20

◆ VALID_BOTLINE_AP

#define VALID_BOTLINE_AP   0x40

◆ VALID_CHEIGHT

#define VALID_CHEIGHT   0x08

◆ VALID_CROW

#define VALID_CROW   0x10

◆ VALID_TOPLINE

#define VALID_TOPLINE   0x80

◆ VALID_VIRTCOL

#define VALID_VIRTCOL   0x04

◆ VALID_WCOL

#define VALID_WCOL   0x02

◆ VALID_WROW

#define VALID_WROW   0x01

◆ WARGCOUNT

#define WARGCOUNT (   wp)    (ALIST(wp)->al_ga.ga_len)

◆ WARGLIST

#define WARGLIST (   wp)    ((aentry_T *)ALIST(wp)->al_ga.ga_data)

Typedef Documentation

◆ aentry_T

typedef struct argentry aentry_T

◆ alist_T

typedef struct arglist alist_T

◆ buf_T

typedef struct file_buffer buf_T

◆ buffblock_T

typedef struct buffblock buffblock_T

◆ buffheader_T

typedef struct buffheader buffheader_T

◆ diff_T

typedef struct diffblock_S diff_T

◆ disptick_T

typedef uint16_t disptick_T

◆ FloatAnchor

typedef int FloatAnchor

◆ frame_T

typedef struct frame_S frame_T

◆ mapblock_T

typedef struct mapblock mapblock_T

◆ matchitem_T

typedef struct matchitem matchitem_T

◆ posmatch_T

typedef struct posmatch posmatch_T

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

◆ qf_info_T

typedef struct qf_info_S qf_info_T

◆ stl_hlrec_t

typedef struct stl_hlrec stl_hlrec_t

Used for highlighting in the status line.

◆ stl_item_t

typedef struct stl_item stl_item_t

Used for building the status line.

◆ tabpage_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.

◆ taggy_T

typedef struct taggy taggy_T

◆ win_T

typedef struct window_S win_T

◆ wininfo_T

typedef struct wininfo_S wininfo_T

◆ wline_T

typedef struct w_line wline_T

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kFloatAnchorEast 
kFloatAnchorSouth 

◆ FloatRelative

Enumerator
kFloatRelativeEditor 
kFloatRelativeWindow 
kFloatRelativeCursor 

◆ WinStyle

enum WinStyle
Enumerator
kWinStyleUnused 
kWinStyleMinimal 

Function Documentation

◆ INIT()

EXTERN int curbuf_splice_pending INIT ( )

◆ TV_DICTITEM_STRUCT()

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.

kZIndexFloatDefault
@ kZIndexFloatDefault
Definition: grid_defs.h:18
kWinStyleUnused
@ kWinStyleUnused
Definition: buffer_defs.h:1079
FloatConfig
Definition: buffer_defs.h:1083