mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
Linting
This commit is contained in:
@@ -6171,12 +6171,11 @@ do_highlight (
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Isolate the key ("term", "ctermfg", "ctermbg", "font", "guifg",
|
||||||
* Isolate the key ("term", "ctermfg", "ctermbg", "font", "guifg",
|
// "guibg" or "guisp").
|
||||||
* "guibg" or "guisp").
|
while (*linep && !ascii_iswhite(*linep) && *linep != '=') {
|
||||||
*/
|
linep++;
|
||||||
while (*linep && !ascii_iswhite(*linep) && *linep != '=')
|
}
|
||||||
++linep;
|
|
||||||
xfree(key);
|
xfree(key);
|
||||||
key = vim_strnsave_up(key_start, (int)(linep - key_start));
|
key = vim_strnsave_up(key_start, (int)(linep - key_start));
|
||||||
linep = skipwhite(linep);
|
linep = skipwhite(linep);
|
||||||
@@ -6579,10 +6578,11 @@ static void highlight_clear(int idx)
|
|||||||
HL_TABLE()[idx].sg_rgb_bg_name = NULL;
|
HL_TABLE()[idx].sg_rgb_bg_name = NULL;
|
||||||
xfree(HL_TABLE()[idx].sg_rgb_sp_name);
|
xfree(HL_TABLE()[idx].sg_rgb_sp_name);
|
||||||
HL_TABLE()[idx].sg_rgb_sp_name = NULL;
|
HL_TABLE()[idx].sg_rgb_sp_name = NULL;
|
||||||
/* Clear the script ID only when there is no link, since that is not
|
// Clear the script ID only when there is no link, since that is not
|
||||||
* cleared. */
|
// cleared.
|
||||||
if (HL_TABLE()[idx].sg_link == 0)
|
if (HL_TABLE()[idx].sg_link == 0) {
|
||||||
HL_TABLE()[idx].sg_scriptID = 0;
|
HL_TABLE()[idx].sg_scriptID = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6766,7 +6766,7 @@ static void highlight_list_one(int id)
|
|||||||
didh = highlight_list_arg(id, didh, LIST_STRING,
|
didh = highlight_list_arg(id, didh, LIST_STRING,
|
||||||
0, sgp->sg_rgb_bg_name, "guibg");
|
0, sgp->sg_rgb_bg_name, "guibg");
|
||||||
didh = highlight_list_arg(id, didh, LIST_STRING,
|
didh = highlight_list_arg(id, didh, LIST_STRING,
|
||||||
0, sgp->sg_rgb_sp_name, "guisp");
|
0, sgp->sg_rgb_sp_name, "guisp");
|
||||||
|
|
||||||
if (sgp->sg_link && !got_int) {
|
if (sgp->sg_link && !got_int) {
|
||||||
(void)syn_list_header(didh, 9999, id);
|
(void)syn_list_header(didh, 9999, id);
|
||||||
@@ -6880,8 +6880,9 @@ highlight_color (
|
|||||||
if (modec == 'g') {
|
if (modec == 'g') {
|
||||||
if (fg)
|
if (fg)
|
||||||
return HL_TABLE()[id - 1].sg_rgb_fg_name;
|
return HL_TABLE()[id - 1].sg_rgb_fg_name;
|
||||||
if (sp)
|
if (sp) {
|
||||||
return HL_TABLE()[id - 1].sg_rgb_sp_name;
|
return HL_TABLE()[id - 1].sg_rgb_sp_name;
|
||||||
|
}
|
||||||
return HL_TABLE()[id - 1].sg_rgb_bg_name;
|
return HL_TABLE()[id - 1].sg_rgb_bg_name;
|
||||||
}
|
}
|
||||||
if (font || sp)
|
if (font || sp)
|
||||||
|
@@ -69,7 +69,7 @@ struct syn_state {
|
|||||||
|
|
||||||
// Structure shared between syntax.c, screen.c
|
// Structure shared between syntax.c, screen.c
|
||||||
typedef struct attr_entry {
|
typedef struct attr_entry {
|
||||||
short rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc.
|
int16_t rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc.
|
||||||
RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color;
|
RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color;
|
||||||
int cterm_fg_color, cterm_bg_color;
|
int cterm_fg_color, cterm_bg_color;
|
||||||
} attrentry_T;
|
} attrentry_T;
|
||||||
|
@@ -21,7 +21,7 @@ struct ugrid {
|
|||||||
UCell **cells;
|
UCell **cells;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EMPTY_ATTRS ((HlAttrs){false, false, false, false, false, -1, -1, -1})
|
#define EMPTY_ATTRS ((HlAttrs){ false, false, false, false, false, -1, -1, -1 })
|
||||||
|
|
||||||
#define UGRID_FOREACH_CELL(grid, top, bot, left, right, code) \
|
#define UGRID_FOREACH_CELL(grid, top, bot, left, right, code) \
|
||||||
do { \
|
do { \
|
||||||
|
Reference in New Issue
Block a user