aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdnoC <adam.r.cutler@gmail.com>2016-04-25 15:28:56 -0400
committerAdnoC <adam.r.cutler@gmail.com>2016-05-17 16:36:41 -0400
commit954aeafa8999d4b3ea9cc9f823457a223e086863 (patch)
treea04c7d4615a581d1e85b1e42820b83905c40e8d6 /src
parent724fc8859745370b7ebe971eee79f21dedadcdc2 (diff)
downloadrneovim-954aeafa8999d4b3ea9cc9f823457a223e086863.tar.gz
rneovim-954aeafa8999d4b3ea9cc9f823457a223e086863.tar.bz2
rneovim-954aeafa8999d4b3ea9cc9f823457a223e086863.zip
Linting
Diffstat (limited to 'src')
-rw-r--r--src/nvim/syntax.c23
-rw-r--r--src/nvim/syntax_defs.h2
-rw-r--r--src/nvim/ugrid.h2
3 files changed, 14 insertions, 13 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 630ec23962..0b4e80f2e1 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -6171,12 +6171,11 @@ do_highlight (
break;
}
- /*
- * Isolate the key ("term", "ctermfg", "ctermbg", "font", "guifg",
- * "guibg" or "guisp").
- */
- while (*linep && !ascii_iswhite(*linep) && *linep != '=')
- ++linep;
+ // Isolate the key ("term", "ctermfg", "ctermbg", "font", "guifg",
+ // "guibg" or "guisp").
+ while (*linep && !ascii_iswhite(*linep) && *linep != '=') {
+ linep++;
+ }
xfree(key);
key = vim_strnsave_up(key_start, (int)(linep - key_start));
linep = skipwhite(linep);
@@ -6579,10 +6578,11 @@ static void highlight_clear(int idx)
HL_TABLE()[idx].sg_rgb_bg_name = NULL;
xfree(HL_TABLE()[idx].sg_rgb_sp_name);
HL_TABLE()[idx].sg_rgb_sp_name = NULL;
- /* Clear the script ID only when there is no link, since that is not
- * cleared. */
- if (HL_TABLE()[idx].sg_link == 0)
+ // Clear the script ID only when there is no link, since that is not
+ // cleared.
+ if (HL_TABLE()[idx].sg_link == 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,
0, sgp->sg_rgb_bg_name, "guibg");
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) {
(void)syn_list_header(didh, 9999, id);
@@ -6880,8 +6880,9 @@ highlight_color (
if (modec == 'g') {
if (fg)
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_bg_name;
}
if (font || sp)
diff --git a/src/nvim/syntax_defs.h b/src/nvim/syntax_defs.h
index aa4211cf7c..8d207e6286 100644
--- a/src/nvim/syntax_defs.h
+++ b/src/nvim/syntax_defs.h
@@ -69,7 +69,7 @@ struct syn_state {
// Structure shared between syntax.c, screen.c
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;
int cterm_fg_color, cterm_bg_color;
} attrentry_T;
diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h
index 852734560a..ad6d96a168 100644
--- a/src/nvim/ugrid.h
+++ b/src/nvim/ugrid.h
@@ -21,7 +21,7 @@ struct ugrid {
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) \
do { \