mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
refactor: fix clang-tidy warnings
Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
This commit is contained in:
@@ -87,10 +87,12 @@ typedef struct insert_state {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "edit.c.generated.h"
|
||||
#endif
|
||||
#define BACKSPACE_CHAR 1
|
||||
#define BACKSPACE_WORD 2
|
||||
#define BACKSPACE_WORD_NOT_SPACE 3
|
||||
#define BACKSPACE_LINE 4
|
||||
enum {
|
||||
BACKSPACE_CHAR = 1,
|
||||
BACKSPACE_WORD = 2,
|
||||
BACKSPACE_WORD_NOT_SPACE = 3,
|
||||
BACKSPACE_LINE = 4,
|
||||
};
|
||||
|
||||
/// Set when doing something for completion that may call edit() recursively,
|
||||
/// which is not allowed.
|
||||
@@ -1227,9 +1229,8 @@ bool edit(int cmdchar, bool startln, long count)
|
||||
restart_edit = 'i';
|
||||
force_restart_edit = true;
|
||||
return false;
|
||||
} else {
|
||||
return terminal_enter();
|
||||
}
|
||||
return terminal_enter();
|
||||
}
|
||||
|
||||
// Don't allow inserting in the sandbox.
|
||||
|
Reference in New Issue
Block a user