mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
style/lint
This commit is contained in:
@@ -5860,6 +5860,7 @@ const yankreg_T *op_register_get(const char name)
|
|||||||
///
|
///
|
||||||
/// @return true on success, false on failure.
|
/// @return true on success, false on failure.
|
||||||
bool op_register_set_previous(const char name)
|
bool op_register_set_previous(const char name)
|
||||||
|
FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
int i = op_reg_index(name);
|
int i = op_reg_index(name);
|
||||||
if (i == -1) {
|
if (i == -1) {
|
||||||
|
@@ -285,9 +285,9 @@ typedef struct {
|
|||||||
char name;
|
char name;
|
||||||
MotionType type;
|
MotionType type;
|
||||||
char **contents;
|
char **contents;
|
||||||
|
bool is_unnamed;
|
||||||
size_t contents_size;
|
size_t contents_size;
|
||||||
size_t width;
|
size_t width;
|
||||||
bool is_unnamed;
|
|
||||||
dict_T *additional_data;
|
dict_T *additional_data;
|
||||||
} reg;
|
} reg;
|
||||||
struct global_var {
|
struct global_var {
|
||||||
@@ -2329,12 +2329,14 @@ static inline void add_search_pattern(PossiblyFreedShadaEntry *const ret_pse,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initializes registers for writing to the ShaDa file
|
/// Initialize registers for writing to the ShaDa file
|
||||||
///
|
///
|
||||||
/// @param[in] wms The WriteMergerState used when writing.
|
/// @param[in] wms The WriteMergerState used when writing.
|
||||||
/// @param[in] max_reg_lines The maximum number of register lines.
|
/// @param[in] max_reg_lines The maximum number of register lines.
|
||||||
static void shada_initialize_registers(WriteMergerState *const wms,
|
static inline void shada_initialize_registers(WriteMergerState *const wms,
|
||||||
int max_reg_lines) {
|
int max_reg_lines)
|
||||||
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_ALWAYS_INLINE
|
||||||
|
{
|
||||||
const void *reg_iter = NULL;
|
const void *reg_iter = NULL;
|
||||||
const bool limit_reg_lines = max_reg_lines >= 0;
|
const bool limit_reg_lines = max_reg_lines >= 0;
|
||||||
do {
|
do {
|
||||||
@@ -2345,7 +2347,7 @@ static void shada_initialize_registers(WriteMergerState *const wms,
|
|||||||
if (name == NUL) {
|
if (name == NUL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (limit_reg_lines && reg.y_size > max_reg_lines) {
|
if (limit_reg_lines && reg.y_size > (size_t)max_reg_lines) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
wms->registers[op_reg_index(name)] = (PossiblyFreedShadaEntry) {
|
wms->registers[op_reg_index(name)] = (PossiblyFreedShadaEntry) {
|
||||||
|
Reference in New Issue
Block a user