59
61
#define VALID_BOTLINE_AP 0x40 /* w_botine is approximated */
60
62
#define VALID_TOPLINE 0x80 /* w_topline is valid (for cursor position) */
62
/* flags for b_flags */
63
#define BF_RECOVERED 0x01 /* buffer has been recovered */
64
#define BF_CHECK_RO 0x02 /* need to check readonly when loading file
65
into buffer (set by ":e", may be reset by
67
#define BF_NEVERLOADED 0x04 /* file has never been loaded into buffer,
68
many variables still need to be set */
69
#define BF_NOTEDITED 0x08 /* Set when file name is changed after
70
starting to edit, reset when file is
72
#define BF_NEW 0x10 /* file didn't exist when editing started */
73
#define BF_NEW_W 0x20 /* Warned for BF_NEW and file created */
74
#define BF_READERR 0x40 /* got errors while reading the file */
75
#define BF_DUMMY 0x80 /* dummy buffer, only used internally */
76
#define BF_PRESERVED 0x100 /* ":preserve" was used */
65
#define BF_RECOVERED 0x01 // buffer has been recovered
66
#define BF_CHECK_RO 0x02 // need to check readonly when loading file
67
// into buffer (set by ":e", may be reset by
69
#define BF_NEVERLOADED 0x04 // file has never been loaded into buffer,
70
// many variables still need to be set
71
#define BF_NOTEDITED 0x08 // Set when file name is changed after
72
// starting to edit, reset when file is
74
#define BF_NEW 0x10 // file didn't exist when editing started
75
#define BF_NEW_W 0x20 // Warned for BF_NEW and file created
76
#define BF_READERR 0x40 // got errors while reading the file
77
#define BF_DUMMY 0x80 // dummy buffer, only used internally
78
#define BF_PRESERVED 0x100 // ":preserve" was used
78
80
/* Mask to check for flags that prevent normal writing */
79
81
#define BF_WRITE_MASK (BF_NOTEDITED + BF_NEW + BF_READERR)
593
600
int b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */
595
int b_p_ai; /* 'autoindent' */
596
int b_p_ai_nopaste; /* b_p_ai saved for paste mode */
597
char_u *b_p_bkc; ///< 'backupcopy'
598
unsigned int b_bkc_flags; ///< flags for 'backupcopy'
599
int b_p_ci; /* 'copyindent' */
600
int b_p_bin; /* 'binary' */
601
int b_p_bomb; /* 'bomb' */
602
char_u *b_p_bh; /* 'bufhidden' */
603
char_u *b_p_bt; /* 'buftype' */
604
int b_p_bl; /* 'buflisted' */
605
int b_p_cin; /* 'cindent' */
606
char_u *b_p_cino; /* 'cinoptions' */
607
char_u *b_p_cink; /* 'cinkeys' */
608
char_u *b_p_cinw; /* 'cinwords' */
609
char_u *b_p_com; /* 'comments' */
610
char_u *b_p_cms; /* 'commentstring' */
611
char_u *b_p_cpt; /* 'complete' */
612
char_u *b_p_cfu; /* 'completefunc' */
613
char_u *b_p_ofu; /* 'omnifunc' */
614
int b_p_eol; /* 'endofline' */
615
int b_p_fixeol; /* 'fixendofline' */
616
int b_p_et; /* 'expandtab' */
617
int b_p_et_nobin; /* b_p_et saved for binary mode */
618
char_u *b_p_fenc; /* 'fileencoding' */
619
char_u *b_p_ff; /* 'fileformat' */
620
char_u *b_p_ft; /* 'filetype' */
621
char_u *b_p_fo; /* 'formatoptions' */
622
char_u *b_p_flp; /* 'formatlistpat' */
623
int b_p_inf; /* 'infercase' */
624
char_u *b_p_isk; /* 'iskeyword' */
625
char_u *b_p_def; /* 'define' local value */
626
char_u *b_p_inc; /* 'include' */
627
char_u *b_p_inex; /* 'includeexpr' */
628
uint32_t b_p_inex_flags; /* flags for 'includeexpr' */
629
char_u *b_p_inde; /* 'indentexpr' */
630
uint32_t b_p_inde_flags; /* flags for 'indentexpr' */
631
char_u *b_p_indk; /* 'indentkeys' */
632
char_u *b_p_fex; /* 'formatexpr' */
633
uint32_t b_p_fex_flags; /* flags for 'formatexpr' */
634
char_u *b_p_kp; /* 'keywordprg' */
635
int b_p_lisp; /* 'lisp' */
636
char_u *b_p_mps; /* 'matchpairs' */
637
int b_p_ml; /* 'modeline' */
638
int b_p_ml_nobin; /* b_p_ml saved for binary mode */
639
int b_p_ma; /* 'modifiable' */
640
char_u *b_p_nf; /* 'nrformats' */
641
int b_p_pi; /* 'preserveindent' */
642
char_u *b_p_qe; /* 'quoteescape' */
643
int b_p_ro; /* 'readonly' */
644
long b_p_sw; /* 'shiftwidth' */
645
int b_p_si; /* 'smartindent' */
646
long b_p_sts; /* 'softtabstop' */
647
long b_p_sts_nopaste; /* b_p_sts saved for paste mode */
648
char_u *b_p_sua; /* 'suffixesadd' */
649
bool b_p_swf; /* 'swapfile' */
650
long b_p_smc; /* 'synmaxcol' */
651
char_u *b_p_syn; /* 'syntax' */
652
long b_p_ts; /* 'tabstop' */
653
long b_p_tw; /* 'textwidth' */
654
long b_p_tw_nobin; /* b_p_tw saved for binary mode */
655
long b_p_tw_nopaste; /* b_p_tw saved for paste mode */
656
long b_p_wm; /* 'wrapmargin' */
657
long b_p_wm_nobin; /* b_p_wm saved for binary mode */
658
long b_p_wm_nopaste; /* b_p_wm saved for paste mode */
659
char_u *b_p_keymap; /* 'keymap' */
602
int b_p_ai; ///< 'autoindent'
603
int b_p_ai_nopaste; ///< b_p_ai saved for paste mode
604
char_u *b_p_bkc; ///< 'backupco
605
unsigned int b_bkc_flags; ///< flags for 'backupco
606
int b_p_ci; ///< 'copyindent'
607
int b_p_bin; ///< 'binary'
608
int b_p_bomb; ///< 'bomb'
609
char_u *b_p_bh; ///< 'bufhidden'
610
char_u *b_p_bt; ///< 'buftype'
611
int b_p_bl; ///< 'buflisted'
612
int b_p_cin; ///< 'cindent'
613
char_u *b_p_cino; ///< 'cinoptions'
614
char_u *b_p_cink; ///< 'cinkeys'
615
char_u *b_p_cinw; ///< 'cinwords'
616
char_u *b_p_com; ///< 'comments'
617
char_u *b_p_cms; ///< 'commentstring'
618
char_u *b_p_cpt; ///< 'complete'
619
char_u *b_p_cfu; ///< 'completefunc'
620
char_u *b_p_ofu; ///< 'omnifunc'
621
int b_p_eol; ///< 'endofline'
622
int b_p_fixeol; ///< 'fixendofline'
623
int b_p_et; ///< 'expandtab'
624
int b_p_et_nobin; ///< b_p_et saved for binary mode
625
int b_p_et_nopaste; ///< b_p_et saved for paste mode
626
char_u *b_p_fenc; ///< 'fileencoding'
627
char_u *b_p_ff; ///< 'fileformat'
628
char_u *b_p_ft; ///< 'filetype'
629
char_u *b_p_fo; ///< 'formatoptions'
630
char_u *b_p_flp; ///< 'formatlistpat'
631
int b_p_inf; ///< 'infercase'
632
char_u *b_p_isk; ///< 'iskeyword'
633
char_u *b_p_def; ///< 'define' local value
634
char_u *b_p_inc; ///< 'include'
635
char_u *b_p_inex; ///< 'includeexpr'
636
uint32_t b_p_inex_flags; ///< flags for 'includeexpr'
637
char_u *b_p_inde; ///< 'indentexpr'
638
uint32_t b_p_inde_flags; ///< flags for 'indentexpr'
639
char_u *b_p_indk; ///< 'indentkeys'
640
char_u *b_p_fex; ///< 'formatexpr'
641
uint32_t b_p_fex_flags; ///< flags for 'formatexpr'
642
char_u *b_p_kp; ///< 'keywordprg'
643
int b_p_lisp; ///< 'lisp'
644
char_u *b_p_mps; ///< 'matchpairs'
645
int b_p_ml; ///< 'modeline'
646
int b_p_ml_nobin; ///< b_p_ml saved for binary mode
647
int b_p_ma; ///< 'modifiable'
648
char_u *b_p_nf; ///< 'nrformats'
649
int b_p_pi; ///< 'preserveindent'
650
char_u *b_p_qe; ///< 'quoteescape'
651
int b_p_ro; ///< 'readonly'
652
long b_p_sw; ///< 'shiftwidth'
653
int b_p_si; ///< 'smartindent'
654
long b_p_sts; ///< 'softtabstop'
655
long b_p_sts_nopaste; ///< b_p_sts saved for paste mode
656
char_u *b_p_sua; ///< 'suffixesadd'
657
bool b_p_swf; ///< 'swapfile'
658
long b_p_smc; ///< 'synmaxcol'
659
char_u *b_p_syn; ///< 'syntax'
660
long b_p_ts; ///< 'tabstop'
661
long b_p_tw; ///< 'textwidth'
662
long b_p_tw_nobin; ///< b_p_tw saved for binary mode
663
long b_p_tw_nopaste; ///< b_p_tw saved for paste mode
664
long b_p_wm; ///< 'wrapmargin'
665
long b_p_wm_nobin; ///< b_p_wm saved for binary mode
666
long b_p_wm_nopaste; ///< b_p_wm saved for paste mode
667
char_u *b_p_keymap; ///< 'keymap'
661
669
/* local values for options which are normally global */
662
670
char_u *b_p_gp; /* 'grepprg' local value */