mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
refactor: iwyu (#26269)
This commit is contained in:
@@ -9,63 +9,62 @@
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
#include "nvim/func_attr.h"
|
||||
#include "nvim/grid_defs.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/memline.h"
|
||||
#include "nvim/memline_defs.h"
|
||||
#include "nvim/pos_defs.h"
|
||||
|
||||
// Values for buflist_getfile()
|
||||
/// Values for buflist_getfile()
|
||||
enum getf_values {
|
||||
GETF_SETMARK = 0x01, // set pcmark before jumping
|
||||
GETF_ALT = 0x02, // jumping to alternate file (not buf num)
|
||||
GETF_SWITCH = 0x04, // respect 'switchbuf' settings when jumping
|
||||
GETF_SETMARK = 0x01, ///< set pcmark before jumping
|
||||
GETF_ALT = 0x02, ///< jumping to alternate file (not buf num)
|
||||
GETF_SWITCH = 0x04, ///< respect 'switchbuf' settings when jumping
|
||||
};
|
||||
|
||||
// Return values of getfile()
|
||||
enum getf_retvalues {
|
||||
GETFILE_ERROR = 1, // normal error
|
||||
GETFILE_NOT_WRITTEN = 2, // "not written" error
|
||||
GETFILE_SAME_FILE = 0, // success, same file
|
||||
GETFILE_OPEN_OTHER = (-1), // success, opened another file
|
||||
GETFILE_ERROR = 1, ///< normal error
|
||||
GETFILE_NOT_WRITTEN = 2, ///< "not written" error
|
||||
GETFILE_SAME_FILE = 0, ///< success, same file
|
||||
GETFILE_OPEN_OTHER = -1, ///< success, opened another file
|
||||
GETFILE_UNUSED = 8,
|
||||
};
|
||||
|
||||
// Values for buflist_new() flags
|
||||
/// Values for buflist_new() flags
|
||||
enum bln_values {
|
||||
BLN_CURBUF = 1, // May re-use curbuf for new buffer
|
||||
BLN_LISTED = 2, // Put new buffer in buffer list
|
||||
BLN_DUMMY = 4, // Allocating dummy buffer
|
||||
BLN_NEW = 8, // create a new buffer
|
||||
BLN_NOOPT = 16, // Don't copy options to existing buffer
|
||||
BLN_CURBUF = 1, ///< May re-use curbuf for new buffer
|
||||
BLN_LISTED = 2, ///< Put new buffer in buffer list
|
||||
BLN_DUMMY = 4, ///< Allocating dummy buffer
|
||||
BLN_NEW = 8, ///< create a new buffer
|
||||
BLN_NOOPT = 16, ///< Don't copy options to existing buffer
|
||||
// BLN_DUMMY_OK = 32, // also find an existing dummy buffer
|
||||
// BLN_REUSE = 64, // may re-use number from buf_reuse
|
||||
BLN_NOCURWIN = 128, // buffer is not associated with curwin
|
||||
BLN_NOCURWIN = 128, ///< buffer is not associated with curwin
|
||||
};
|
||||
|
||||
// Values for action argument for do_buffer()
|
||||
/// Values for action argument for do_buffer()
|
||||
enum dobuf_action_values {
|
||||
DOBUF_GOTO = 0, // go to specified buffer
|
||||
DOBUF_SPLIT = 1, // split window and go to specified buffer
|
||||
DOBUF_UNLOAD = 2, // unload specified buffer(s)
|
||||
DOBUF_DEL = 3, // delete specified buffer(s) from buflist
|
||||
DOBUF_WIPE = 4, // delete specified buffer(s) really
|
||||
DOBUF_GOTO = 0, ///< go to specified buffer
|
||||
DOBUF_SPLIT = 1, ///< split window and go to specified buffer
|
||||
DOBUF_UNLOAD = 2, ///< unload specified buffer(s)
|
||||
DOBUF_DEL = 3, ///< delete specified buffer(s) from buflist
|
||||
DOBUF_WIPE = 4, ///< delete specified buffer(s) really
|
||||
};
|
||||
|
||||
// Values for start argument for do_buffer()
|
||||
/// Values for start argument for do_buffer()
|
||||
enum dobuf_start_values {
|
||||
DOBUF_CURRENT = 0, // "count" buffer from current buffer
|
||||
DOBUF_FIRST = 1, // "count" buffer from first buffer
|
||||
DOBUF_LAST = 2, // "count" buffer from last buffer
|
||||
DOBUF_MOD = 3, // "count" mod. buffer from current buffer
|
||||
DOBUF_CURRENT = 0, ///< "count" buffer from current buffer
|
||||
DOBUF_FIRST = 1, ///< "count" buffer from first buffer
|
||||
DOBUF_LAST = 2, ///< "count" buffer from last buffer
|
||||
DOBUF_MOD = 3, ///< "count" mod. buffer from current buffer
|
||||
};
|
||||
|
||||
// flags for buf_freeall()
|
||||
/// flags for buf_freeall()
|
||||
enum bfa_values {
|
||||
BFA_DEL = 1, // buffer is going to be deleted
|
||||
BFA_WIPE = 2, // buffer is going to be wiped out
|
||||
BFA_KEEP_UNDO = 4, // do not free undo information
|
||||
BFA_IGNORE_ABORT = 8, // do not abort for aborting()
|
||||
BFA_DEL = 1, ///< buffer is going to be deleted
|
||||
BFA_WIPE = 2, ///< buffer is going to be wiped out
|
||||
BFA_KEEP_UNDO = 4, ///< do not free undo information
|
||||
BFA_IGNORE_ABORT = 8, ///< do not abort for aborting()
|
||||
};
|
||||
|
||||
EXTERN char *msg_loclist INIT( = N_("[Location List]"));
|
||||
@@ -136,6 +135,5 @@ static inline void buf_inc_changedtick(buf_T *const buf)
|
||||
|
||||
static inline bool buf_is_empty(buf_T *buf)
|
||||
{
|
||||
return buf->b_ml.ml_line_count == 1
|
||||
&& *ml_get_buf(buf, 1) == '\0';
|
||||
return buf->b_ml.ml_line_count == 1 && *ml_get_buf(buf, 1) == '\0';
|
||||
}
|
||||
|
Reference in New Issue
Block a user