mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix linting errors.
This commit is contained in:
parent
c3ac16cfeb
commit
ad34a376eb
@ -6589,7 +6589,7 @@ void fixthisline(IndentGetter get_the_indent)
|
||||
if (amount >= 0) {
|
||||
change_indent(INDENT_SET, amount, false, 0, true);
|
||||
if (linewhite(curwin->w_cursor.lnum)) {
|
||||
did_ai = TRUE; // delete the indent if the line stays empty
|
||||
did_ai = true; // delete the indent if the line stays empty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,9 +159,7 @@ static char_u *skip_string(char_u *p)
|
||||
}
|
||||
if (p[0] == '"')
|
||||
continue; /* continue for another string */
|
||||
}
|
||||
else if (p[0] == 'R' && p[1] == '"')
|
||||
{
|
||||
} else if (p[0] == 'R' && p[1] == '"') {
|
||||
/* Raw string: R"[delim](...)[delim]" */
|
||||
char_u *delim = p + 2;
|
||||
char_u *paren = vim_strchr(delim, '(');
|
||||
@ -1748,7 +1746,7 @@ int get_c_indent(void)
|
||||
/*
|
||||
* #defines and so on always go at the left when included in 'cinkeys'.
|
||||
*/
|
||||
if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE))) {
|
||||
if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', true))) {
|
||||
amount = curbuf->b_ind_hash_comment;
|
||||
goto theend;
|
||||
}
|
||||
@ -1842,13 +1840,13 @@ int get_c_indent(void)
|
||||
lead_middle_len) == 0) {
|
||||
amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
|
||||
break;
|
||||
}
|
||||
} else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
|
||||
lead_start, lead_start_len) != 0) {
|
||||
/* If the start comment string doesn't match with the
|
||||
* start of the comment, skip this entry. XXX */
|
||||
else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
|
||||
lead_start, lead_start_len) != 0)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (start_off != 0)
|
||||
amount += start_off;
|
||||
else if (start_align == COM_RIGHT)
|
||||
@ -3225,7 +3223,7 @@ term_again:
|
||||
&& !cin_ends_in(theline, (char_u *)",", NULL)
|
||||
&& cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
|
||||
cur_curpos.lnum + 1)
|
||||
&& !cin_isterminated(theline, FALSE, TRUE)) {
|
||||
&& !cin_isterminated(theline, false, true)) {
|
||||
amount = curbuf->b_ind_func_type;
|
||||
goto theend;
|
||||
}
|
||||
@ -3253,7 +3251,7 @@ term_again:
|
||||
* Are we at the start of a cpp base class declaration or
|
||||
* constructor initialization?
|
||||
*/ /* XXX */
|
||||
n = FALSE;
|
||||
n = false;
|
||||
if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{') {
|
||||
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
|
||||
l = get_cursor_line_ptr();
|
||||
|
@ -1452,14 +1452,14 @@ static int find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos)
|
||||
char_u *delim_copy;
|
||||
size_t delim_len;
|
||||
linenr_T lnum;
|
||||
int found = FALSE;
|
||||
int found = false;
|
||||
|
||||
for (p = linep + startpos->col + 1; *p && *p != '('; ++p) {}
|
||||
|
||||
for (p = linep + startpos->col + 1; *p && *p != '('; ++p)
|
||||
;
|
||||
delim_len = (p - linep) - startpos->col - 1;
|
||||
delim_copy = vim_strnsave(linep + startpos->col + 1, delim_len);
|
||||
if (delim_copy == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
for (lnum = startpos->lnum; lnum <= endpos->lnum; ++lnum)
|
||||
{
|
||||
char_u *line = ml_get(lnum);
|
||||
@ -1472,7 +1472,7 @@ static int find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos)
|
||||
if (*p == ')' && p[delim_len + 1] == '"'
|
||||
&& STRNCMP(delim_copy, p + 1, delim_len) == 0)
|
||||
{
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1510,9 +1510,9 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
int findc = 0; /* matching brace */
|
||||
int c;
|
||||
int count = 0; /* cumulative number of braces */
|
||||
int backwards = FALSE; /* init for gcc */
|
||||
int raw_string = FALSE; /* search for raw string */
|
||||
int inquote = FALSE; /* TRUE when inside quotes */
|
||||
int backwards = false; /* init for gcc */
|
||||
int raw_string = false; /* search for raw string */
|
||||
int inquote = false; /* true when inside quotes */
|
||||
char_u *linep; /* pointer to current line */
|
||||
char_u *ptr;
|
||||
int do_quotes; /* check for quotes in current line */
|
||||
@ -1555,16 +1555,15 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
if (initc == '/' || initc == '*' || initc == 'R') {
|
||||
comment_dir = dir;
|
||||
if (initc == '/')
|
||||
ignore_cend = TRUE;
|
||||
backwards = (dir == FORWARD) ? FALSE : TRUE;
|
||||
ignore_cend = true;
|
||||
backwards = (dir == FORWARD) ? false : true;
|
||||
raw_string = (initc == 'R');
|
||||
initc = NUL;
|
||||
} else if (initc != '#' && initc != NUL) {
|
||||
find_mps_values(&initc, &findc, &backwards, TRUE);
|
||||
if (findc == NUL)
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/*
|
||||
* Either initc is '#', or no initc was given and we need to look
|
||||
* under the cursor.
|
||||
@ -1832,8 +1831,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
}
|
||||
linep = ml_get(pos.lnum); /* may have been released */
|
||||
}
|
||||
}
|
||||
else if ( linep[pos.col - 1] == '/'
|
||||
} else if ( linep[pos.col - 1] == '/'
|
||||
&& linep[pos.col] == '*'
|
||||
&& (int)pos.col < comment_col) {
|
||||
count++;
|
||||
|
Loading…
Reference in New Issue
Block a user