mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 12:58:16 +00:00
Macro cleanup: USER_HIGHLIGHT
This commit is contained in:

committed by
Justin M. Keyes

parent
cf663588d9
commit
49e7164165
@@ -457,11 +457,8 @@ typedef enum {
|
|||||||
'*', '#', '_', '!', '.', 'o'}
|
'*', '#', '_', '!', '.', 'o'}
|
||||||
|
|
||||||
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
||||||
# define USER_HIGHLIGHT
|
|
||||||
#ifdef USER_HIGHLIGHT
|
|
||||||
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
||||||
EXTERN int highlight_stlnc[9]; /* On top of user */
|
EXTERN int highlight_stlnc[9]; /* On top of user */
|
||||||
#endif
|
|
||||||
EXTERN int cterm_normal_fg_color INIT(= 0);
|
EXTERN int cterm_normal_fg_color INIT(= 0);
|
||||||
EXTERN int cterm_normal_fg_bold INIT(= 0);
|
EXTERN int cterm_normal_fg_bold INIT(= 0);
|
||||||
EXTERN int cterm_normal_bg_color INIT(= 0);
|
EXTERN int cterm_normal_bg_color INIT(= 0);
|
||||||
|
@@ -7174,12 +7174,10 @@ int highlight_changed(void)
|
|||||||
int attr;
|
int attr;
|
||||||
char_u *end;
|
char_u *end;
|
||||||
int id;
|
int id;
|
||||||
#ifdef USER_HIGHLIGHT
|
|
||||||
char_u userhl[10];
|
char_u userhl[10];
|
||||||
int id_SNC = -1;
|
int id_SNC = -1;
|
||||||
int id_S = -1;
|
int id_S = -1;
|
||||||
int hlcnt;
|
int hlcnt;
|
||||||
#endif
|
|
||||||
static int hl_flags[HLF_COUNT] = HL_FLAGS;
|
static int hl_flags[HLF_COUNT] = HL_FLAGS;
|
||||||
|
|
||||||
need_highlight_changed = FALSE;
|
need_highlight_changed = FALSE;
|
||||||
@@ -7251,12 +7249,10 @@ int highlight_changed(void)
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
attr = syn_id2attr(id);
|
attr = syn_id2attr(id);
|
||||||
p = end - 1;
|
p = end - 1;
|
||||||
#ifdef USER_HIGHLIGHT
|
|
||||||
if (hlf == (int)HLF_SNC)
|
if (hlf == (int)HLF_SNC)
|
||||||
id_SNC = syn_get_final_id(id);
|
id_SNC = syn_get_final_id(id);
|
||||||
else if (hlf == (int)HLF_S)
|
else if (hlf == (int)HLF_S)
|
||||||
id_S = syn_get_final_id(id);
|
id_S = syn_get_final_id(id);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
default: return FAIL;
|
default: return FAIL;
|
||||||
}
|
}
|
||||||
@@ -7267,7 +7263,6 @@ int highlight_changed(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_HIGHLIGHT
|
|
||||||
/* Setup the user highlights
|
/* Setup the user highlights
|
||||||
*
|
*
|
||||||
* Temporarily utilize 10 more hl entries. Have to be in there
|
* Temporarily utilize 10 more hl entries. Have to be in there
|
||||||
@@ -7327,8 +7322,6 @@ int highlight_changed(void)
|
|||||||
}
|
}
|
||||||
highlight_ga.ga_len = hlcnt;
|
highlight_ga.ga_len = hlcnt;
|
||||||
|
|
||||||
#endif /* USER_HIGHLIGHT */
|
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user