aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-14 23:41:43 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-23 00:03:47 -0400
commitbbc32fc8313bc18080a3943a8129ba5bbf7081b9 (patch)
treeb636fd473b7d749f835e8824642879b3436833b2 /src
parent07a182c6b57e13e2563aef667131b976db8711cc (diff)
downloadrneovim-bbc32fc8313bc18080a3943a8129ba5bbf7081b9.tar.gz
rneovim-bbc32fc8313bc18080a3943a8129ba5bbf7081b9.tar.bz2
rneovim-bbc32fc8313bc18080a3943a8129ba5bbf7081b9.zip
lint
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer_defs.h36
-rw-r--r--src/nvim/regexp.c5
-rw-r--r--src/nvim/screen.c8
-rw-r--r--src/nvim/syntax.c20
4 files changed, 36 insertions, 33 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 28f3889dd3..6d99a06eb9 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -388,25 +388,25 @@ typedef struct {
* a window may have its own instance.
*/
typedef struct {
- hashtab_T b_keywtab; /* syntax keywords hash table */
- hashtab_T b_keywtab_ic; /* idem, ignore case */
- int b_syn_error; /* TRUE when error occurred in HL */
+ hashtab_T b_keywtab; // syntax keywords hash table
+ hashtab_T b_keywtab_ic; // idem, ignore case
+ int b_syn_error; // TRUE when error occurred in HL
bool b_syn_slow; // true when 'redrawtime' reached
- int b_syn_ic; /* ignore case for :syn cmds */
- int b_syn_spell; /* SYNSPL_ values */
- garray_T b_syn_patterns; /* table for syntax patterns */
- garray_T b_syn_clusters; /* table for syntax clusters */
- int b_spell_cluster_id; /* @Spell cluster ID or 0 */
- int b_nospell_cluster_id; /* @NoSpell cluster ID or 0 */
- int b_syn_containedin; /* TRUE when there is an item with a
- "containedin" argument */
- int b_syn_sync_flags; /* flags about how to sync */
- short b_syn_sync_id; /* group to sync on */
- long b_syn_sync_minlines; /* minimal sync lines offset */
- long b_syn_sync_maxlines; /* maximal sync lines offset */
- long b_syn_sync_linebreaks; /* offset for multi-line pattern */
- char_u *b_syn_linecont_pat; /* line continuation pattern */
- regprog_T *b_syn_linecont_prog; /* line continuation program */
+ int b_syn_ic; // ignore case for :syn cmds
+ int b_syn_spell; // SYNSPL_ values
+ garray_T b_syn_patterns; // table for syntax patterns
+ garray_T b_syn_clusters; // table for syntax clusters
+ int b_spell_cluster_id; // @Spell cluster ID or 0
+ int b_nospell_cluster_id; // @NoSpell cluster ID or 0
+ int b_syn_containedin; // TRUE when there is an item with a
+ // "containedin" argument
+ int b_syn_sync_flags; // flags about how to sync
+ int16_t b_syn_sync_id; // group to sync on
+ long b_syn_sync_minlines; // minimal sync lines offset
+ long b_syn_sync_maxlines; // maximal sync lines offset
+ long b_syn_sync_linebreaks; // offset for multi-line pattern
+ char_u *b_syn_linecont_pat; // line continuation pattern
+ regprog_T *b_syn_linecont_prog; // line continuation program
syn_time_T b_syn_linecont_time;
int b_syn_linecont_ic; /* ignore-case flag for above */
int b_syn_topgrp; /* for ":syntax include" */
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 187609cd22..39ce7ff844 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -7224,7 +7224,8 @@ static void report_re_switch(char_u *pat)
/// @param nl
///
/// @return TRUE if there is a match, FALSE if not.
-static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col, bool nl)
+static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col,
+ bool nl)
{
regexec_T rex_save;
bool rex_in_use_save = rex_in_use;
@@ -7273,7 +7274,7 @@ static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col, bool n
int vim_regexec_prog(regprog_T **prog, bool ignore_case, char_u *line,
colnr_T col)
{
- regmatch_T regmatch = {.regprog = *prog, .rm_ic = ignore_case};
+ regmatch_T regmatch = { .regprog = *prog, .rm_ic = ignore_case };
int r = vim_regexec_string(&regmatch, line, col, false);
*prog = regmatch.regprog;
return r;
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 8a51a0a21e..38fc1ee021 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1364,7 +1364,8 @@ static void win_update(win_T *wp)
/*
* Display one line.
*/
- row = win_line(wp, lnum, srow, wp->w_grid.Rows, mod_top == 0, false, &syntax_tm);
+ row = win_line(wp, lnum, srow, wp->w_grid.Rows, mod_top == 0, false,
+ &syntax_tm);
wp->w_lines[idx].wl_folded = FALSE;
wp->w_lines[idx].wl_lastlnum = lnum;
@@ -1395,7 +1396,8 @@ static void win_update(win_T *wp)
if (fold_count != 0) {
fold_line(wp, fold_count, &win_foldinfo, lnum, row);
} else {
- (void)win_line(wp, lnum, srow, wp->w_grid.Rows, true, true, &syntax_tm);
+ (void)win_line(wp, lnum, srow, wp->w_grid.Rows, true, true,
+ &syntax_tm);
}
}
@@ -2544,7 +2546,7 @@ win_line (
}
wp->w_cursor = pos;
- /* Need to restart syntax highlighting for this line. */
+ // Need to restart syntax highlighting for this line.
if (has_syntax) {
syntax_start(wp, lnum, syntax_tm);
}
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 1d959027f6..543c131b58 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -356,16 +356,16 @@ static reg_extmatch_T *next_match_extmatch = NULL;
* The current state (within the line) of the recognition engine.
* When current_state.ga_itemsize is 0 the current state is invalid.
*/
-static win_T *syn_win; /* current window for highlighting */
-static buf_T *syn_buf; /* current buffer for highlighting */
-static synblock_T *syn_block; /* current buffer for highlighting */
+static win_T *syn_win; // current window for highlighting
+static buf_T *syn_buf; // current buffer for highlighting
+static synblock_T *syn_block; // current buffer for highlighting
static proftime_T *syn_tm;
-static linenr_T current_lnum = 0; /* lnum of current state */
-static colnr_T current_col = 0; /* column of current state */
-static int current_state_stored = 0; /* TRUE if stored current state
- * after setting current_finished */
-static int current_finished = 0; /* current line has been finished */
-static garray_T current_state /* current stack of state_items */
+static linenr_T current_lnum = 0; // lnum of current state
+static colnr_T current_col = 0; // column of current state
+static int current_state_stored = 0; // TRUE if stored current state
+ // after setting current_finished
+static int current_finished = 0; // current line has been finished
+static garray_T current_state // current stack of state_items
= GA_EMPTY_INIT_VALUE;
static int16_t *current_next_list = NULL; // when non-zero, nextgroup list
static int current_next_flags = 0; // flags for current_next_list
@@ -5764,7 +5764,7 @@ int syn_get_foldlevel(win_T *wp, long lnum)
{
int level = 0;
- /* Return quickly when there are no fold items at all. */
+ // Return quickly when there are no fold items at all.
if (wp->w_s->b_syn_folditems != 0
&& !wp->w_s->b_syn_error
&& !wp->w_s->b_syn_slow) {