mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
refactor(option.c): reduce scope or errbuf
This commit is contained in:
@@ -1417,8 +1417,6 @@ int do_set(char *arg, int opt_flags)
|
|||||||
goto theend;
|
goto theend;
|
||||||
}
|
}
|
||||||
|
|
||||||
char errbuf[80];
|
|
||||||
|
|
||||||
while (*arg != NUL) { // loop to process all options
|
while (*arg != NUL) { // loop to process all options
|
||||||
char *startarg = arg; // remember for error message
|
char *startarg = arg; // remember for error message
|
||||||
|
|
||||||
@@ -1441,6 +1439,8 @@ int do_set(char *arg, int opt_flags)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char *errmsg = NULL;
|
char *errmsg = NULL;
|
||||||
|
char errbuf[80];
|
||||||
|
|
||||||
do_set_option(opt_flags, &arg, &did_show, errbuf, sizeof(errbuf), &errmsg);
|
do_set_option(opt_flags, &arg, &did_show, errbuf, sizeof(errbuf), &errmsg);
|
||||||
|
|
||||||
// Advance to next argument.
|
// Advance to next argument.
|
||||||
|
Reference in New Issue
Block a user