mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
refactor: saner options for uncrustify (#16204)
* sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
This commit is contained in:
@@ -370,8 +370,8 @@ int ignorecase_opt(char_u *pat, int ic_in, int scs)
|
||||
{
|
||||
int ic = ic_in;
|
||||
if (ic && !no_smartcase && scs
|
||||
&& !(ctrl_x_mode_not_default() &&
|
||||
curbuf->b_p_inf)) {
|
||||
&& !(ctrl_x_mode_not_default()
|
||||
&& curbuf->b_p_inf)) {
|
||||
ic = !pat_has_uppercase(pat);
|
||||
}
|
||||
no_smartcase = false;
|
||||
@@ -757,7 +757,7 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir,
|
||||
* relative to the end of the match.
|
||||
*/
|
||||
match_ok = false;
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
// Remember a position that is before the start
|
||||
// position, we use it if it's the last match in
|
||||
// the line. Always accept a position after
|
||||
@@ -1105,7 +1105,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char_u *pat, long count,
|
||||
/*
|
||||
* Repeat the search when pattern followed by ';', e.g. "/foo/;?bar".
|
||||
*/
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
bool show_top_bot_msg = false;
|
||||
|
||||
searchstr = pat;
|
||||
@@ -1465,7 +1465,7 @@ int search_for_exact_line(buf_T *buf, pos_T *pos, Direction dir, char_u *pat)
|
||||
if (buf->b_ml.ml_line_count == 0) {
|
||||
return FAIL;
|
||||
}
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
pos->lnum += dir;
|
||||
if (pos->lnum < 1) {
|
||||
if (p_ws) {
|
||||
@@ -1585,7 +1585,7 @@ int searchc(cmdarg_T *cap, int t_cmd)
|
||||
len = (int)STRLEN(p);
|
||||
|
||||
while (count--) {
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
if (dir > 0) {
|
||||
col += utfc_ptr2len(p + col);
|
||||
if (col >= len) {
|
||||
@@ -1870,7 +1870,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
if (linep[pos.col] == NUL && pos.col) {
|
||||
--pos.col;
|
||||
}
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
initc = utf_ptr2char(linep + pos.col);
|
||||
if (initc == NUL) {
|
||||
break;
|
||||
@@ -1894,7 +1894,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
|
||||
// Set "match_escaped" if there are an odd number of
|
||||
// backslashes.
|
||||
for (col = pos.col; check_prevcol(linep, col, '\\', &col); ) {
|
||||
for (col = pos.col; check_prevcol(linep, col, '\\', &col);) {
|
||||
bslcnt++;
|
||||
}
|
||||
match_escaped = (bslcnt & 1);
|
||||
@@ -2278,7 +2278,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
|
||||
int col, bslcnt = 0;
|
||||
|
||||
if (!cpo_bsl) {
|
||||
for (col = pos.col; check_prevcol(linep, col, '\\', &col); ) {
|
||||
for (col = pos.col; check_prevcol(linep, col, '\\', &col);) {
|
||||
bslcnt++;
|
||||
}
|
||||
}
|
||||
@@ -2520,7 +2520,7 @@ int findsent(Direction dir, long count)
|
||||
const int startlnum = pos.lnum;
|
||||
const bool cpo_J = vim_strchr(p_cpo, CPO_ENDOFSENT) != NULL;
|
||||
|
||||
for (;; ) { // find end of sentence
|
||||
for (;;) { // find end of sentence
|
||||
c = gchar_pos(&pos);
|
||||
if (c == NUL || (pos.col == 0 && startPS(pos.lnum, NUL, FALSE))) {
|
||||
if (dir == BACKWARD && pos.lnum != startlnum) {
|
||||
@@ -2530,7 +2530,7 @@ int findsent(Direction dir, long count)
|
||||
}
|
||||
if (c == '.' || c == '!' || c == '?') {
|
||||
tpos = pos;
|
||||
do{
|
||||
do {
|
||||
if ((c = inc(&tpos)) == -1) {
|
||||
break;
|
||||
}
|
||||
@@ -3004,7 +3004,7 @@ static void back_in_line(void)
|
||||
int sclass; // starting class
|
||||
|
||||
sclass = cls();
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
if (curwin->w_cursor.col == 0) { // stop at start of line
|
||||
break;
|
||||
}
|
||||
@@ -3527,7 +3527,7 @@ static bool in_html_tag(bool end_tag)
|
||||
int lc = NUL;
|
||||
pos_T pos;
|
||||
|
||||
for (p = line + curwin->w_cursor.col; p > line; ) {
|
||||
for (p = line + curwin->w_cursor.col; p > line;) {
|
||||
if (*p == '<') { // find '<' under/before cursor
|
||||
break;
|
||||
}
|
||||
@@ -3555,7 +3555,7 @@ static bool in_html_tag(bool end_tag)
|
||||
}
|
||||
|
||||
// check that the matching '>' is not preceded by '/'
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
if (inc(&pos) < 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -3791,7 +3791,7 @@ extend:
|
||||
} else {
|
||||
dir = FORWARD;
|
||||
}
|
||||
for (i = count; --i >= 0; ) {
|
||||
for (i = count; --i >= 0;) {
|
||||
if (start_lnum ==
|
||||
(dir == BACKWARD ? 1 : curbuf->b_ml.ml_line_count)) {
|
||||
retval = FAIL;
|
||||
@@ -3806,7 +3806,7 @@ extend:
|
||||
start_lnum -= dir;
|
||||
break;
|
||||
}
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
if (start_lnum == (dir == BACKWARD
|
||||
? 1 : curbuf->b_ml.ml_line_count)) {
|
||||
break;
|
||||
@@ -3946,7 +3946,7 @@ static int find_next_quote(char_u *line, int col, int quotechar, char_u *escape)
|
||||
{
|
||||
int c;
|
||||
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
c = line[col];
|
||||
if (c == NUL) {
|
||||
return -1;
|
||||
@@ -4118,7 +4118,7 @@ bool current_quote(oparg_T *oap, long count, bool include, int quotechar)
|
||||
// Also do this when there is a Visual area, a' may leave the cursor
|
||||
// in between two strings.
|
||||
col_start = 0;
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
// Find open quote character.
|
||||
col_start = find_next_quote(line, col_start, quotechar, NULL);
|
||||
if (col_start < 0 || col_start > first_col) {
|
||||
@@ -4842,7 +4842,7 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo
|
||||
}
|
||||
line = ml_get(lnum);
|
||||
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
if (incl_regmatch.regprog != NULL
|
||||
&& vim_regexec(&incl_regmatch, line, (colnr_T)0)) {
|
||||
char_u *p_fname = (curr_fname == curbuf->b_fname)
|
||||
@@ -5379,7 +5379,7 @@ static void show_pat_in_path(char_u *line, int type, bool did_show, int action,
|
||||
if (got_int) { // 'q' typed at "--more--" message
|
||||
return;
|
||||
}
|
||||
for (;; ) {
|
||||
for (;;) {
|
||||
p = line + STRLEN(line) - 1;
|
||||
if (fp != NULL) {
|
||||
// We used fgets(), so get rid of newline at end
|
||||
|
Reference in New Issue
Block a user