aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.h')
-rw-r--r--src/nvim/ops.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/nvim/ops.h b/src/nvim/ops.h
index 643d2a2deb..3cca52572f 100644
--- a/src/nvim/ops.h
+++ b/src/nvim/ops.h
@@ -7,7 +7,6 @@
#include "nvim/eval/typval_defs.h"
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/extmark_defs.h" // IWYU pragma: keep
-#include "nvim/func_attr.h"
#include "nvim/macros_defs.h"
#include "nvim/normal_defs.h"
#include "nvim/option_defs.h" // IWYU pragma: keep
@@ -99,6 +98,10 @@ enum {
OP_NR_SUB = 29, ///< "<C-X>" Subtract from the number or alphabetic character
};
+struct yank_registers;
+typedef struct yank_registers yank_registers_T;
+typedef size_t iter_register_T;
+
/// Flags for get_reg_contents().
enum GRegFlags {
kGRegNoExpr = 1, ///< Do not allow expression register.
@@ -113,7 +116,7 @@ typedef struct {
MotionType y_type; ///< Register type
colnr_T y_width; ///< Register width (only valid for y_type == kBlockWise).
Timestamp timestamp; ///< Time when register was last modified.
- dict_T *additional_data; ///< Additional data from ShaDa file.
+ AdditionalData *additional_data; ///< Additional data from ShaDa file.
} yankreg_T;
/// Modes for get_yank_register()
@@ -125,8 +128,10 @@ typedef enum {
/// Returns a reference to a user-defined register.
int get_userreg(int regname);
-static inline int op_reg_index(int regname)
- REAL_FATTR_CONST;
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "ops.h.generated.h"
+# include "ops.h.inline.generated.h"
+#endif
/// Convert register name into register index
///
@@ -134,6 +139,7 @@ static inline int op_reg_index(int regname)
///
/// @return Index in y_regs array or -1 if register name was not recognized.
static inline int op_reg_index(const int regname)
+ FUNC_ATTR_CONST
{
if (ascii_isdigit(regname)) {
return regname - '0';
@@ -152,23 +158,13 @@ static inline int op_reg_index(const int regname)
}
}
-struct yank_registers;
-typedef struct yank_registers yank_registers_T;
-
-typedef size_t iter_register_T;
-
-static inline bool is_literal_register(int regname)
- REAL_FATTR_CONST;
/// @see get_yank_register
/// @return true when register should be inserted literally
/// (selection or clipboard)
static inline bool is_literal_register(const int regname)
+ FUNC_ATTR_CONST
{
return regname == '*' || regname == '+';
}
-#ifdef INCLUDE_GENERATED_DECLARATIONS
-# include "ops.h.generated.h"
-#endif
-
EXTERN LuaRef repeat_luaref INIT( = LUA_NOREF); ///< LuaRef for "."