aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r--src/nvim/autocmd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index 783cec4d60..bfeb70dce9 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -4,6 +4,7 @@
// autocmd.c: Autocommand related functions
#include <signal.h>
+#include "lauxlib.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/autocmd.h"
@@ -28,8 +29,6 @@
#include "nvim/vim.h"
#include "nvim/window.h"
-#include "lauxlib.h"
-
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "auevents_name_map.generated.h"
# include "autocmd.c.generated.h"
@@ -625,8 +624,7 @@ event_T event_name2nr(const char_u *start, char_u **end)
int i;
// the event name ends with end of line, '|', a blank or a comma
- for (p = start; *p && !ascii_iswhite(*p) && *p != ',' && *p != '|'; p++) {
- }
+ for (p = start; *p && !ascii_iswhite(*p) && *p != ',' && *p != '|'; p++) {}
for (i = 0; event_names[i].name != NULL; i++) {
int len = (int)event_names[i].len;
if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0) {
@@ -833,7 +831,7 @@ void do_autocmd(char_u *arg_in, int forceit)
// Find the start of the commands.
// Expand <sfile> in it.
if (*cmd != NUL) {
- cmd = expand_sfile(cmd);
+ cmd = (char_u *)expand_sfile((char *)cmd);
if (cmd == NULL) { // some error
return;
}
@@ -2609,8 +2607,7 @@ static int arg_augroup_get(char_u **argp)
char_u *arg = *argp;
int group = AUGROUP_ALL;
- for (p = arg; *p && !ascii_iswhite(*p) && *p != '|'; p++) {
- }
+ for (p = arg; *p && !ascii_iswhite(*p) && *p != '|'; p++) {}
if (p > arg) {
char_u *group_name = vim_strnsave(arg, (size_t)(p - arg));
group = augroup_find((char *)group_name);