mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
Merge branch 'master' into expression-parser
This commit is contained in:
@@ -4009,10 +4009,10 @@ get_syn_options (
|
||||
{
|
||||
char_u *gname_start, *gname;
|
||||
int syn_id;
|
||||
int len;
|
||||
int len = 0;
|
||||
char *p;
|
||||
int fidx;
|
||||
static struct flag {
|
||||
static const struct flag {
|
||||
char *name;
|
||||
int argtype;
|
||||
int flags;
|
||||
@@ -4035,7 +4035,7 @@ get_syn_options (
|
||||
{"cCoOnNtTaAiInNsS", 1, 0},
|
||||
{"cCoOnNtTaAiInNeEdDiInN", 2, 0},
|
||||
{"nNeExXtTgGrRoOuUpP", 3, 0},};
|
||||
static char *first_letters = "cCoOkKeEtTsSgGdDfFnN";
|
||||
static const char *const first_letters = "cCoOkKeEtTsSgGdDfFnN";
|
||||
|
||||
if (arg == NULL) /* already detected error */
|
||||
return NULL;
|
||||
@@ -4055,9 +4055,10 @@ get_syn_options (
|
||||
for (fidx = ARRAY_SIZE(flagtab); --fidx >= 0; ) {
|
||||
p = flagtab[fidx].name;
|
||||
int i;
|
||||
for (i = 0, len = 0; p[i] != NUL; i += 2, ++len)
|
||||
for (i = 0, len = 0; p[i] != NUL; i += 2, ++len) {
|
||||
if (arg[len] != p[i] && arg[len] != p[i + 1])
|
||||
break;
|
||||
}
|
||||
if (p[i] == NUL && (ascii_iswhite(arg[len])
|
||||
|| (flagtab[fidx].argtype > 0
|
||||
? arg[len] == '='
|
||||
@@ -6853,7 +6854,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
|
||||
if (error && idx == highlight_ga.ga_len) {
|
||||
syn_unadd_group();
|
||||
} else {
|
||||
if (is_normal_group) {
|
||||
if (!error && is_normal_group) {
|
||||
// Need to update all groups, because they might be using "bg" and/or
|
||||
// "fg", which have been changed now.
|
||||
highlight_attr_set_all();
|
||||
|
Reference in New Issue
Block a user