mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
refactor: uncrustify
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
This commit is contained in:
@@ -2342,7 +2342,7 @@ bool find_decl(char *ptr, size_t len, bool locally, bool thisblock, int flags_ar
|
||||
|
||||
// Search forward for the identifier, ignore comment lines.
|
||||
clearpos(&found_pos);
|
||||
for (;;) {
|
||||
while (true) {
|
||||
t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
|
||||
pat, 1L, searchflags, RE_LAST, NULL);
|
||||
if (curwin->w_cursor.lnum >= old_pos.lnum) {
|
||||
@@ -2692,7 +2692,7 @@ static bool nv_z_get_count(cmdarg_T *cap, int *nchar_arg)
|
||||
}
|
||||
long n = nchar - '0';
|
||||
|
||||
for (;;) {
|
||||
while (true) {
|
||||
no_mapping++;
|
||||
allow_keys++; // no mapping for nchar, but allow key codes
|
||||
nchar = plain_vgetc();
|
||||
@@ -4162,7 +4162,7 @@ static void nv_bracket_block(cmdarg_T *cap, const pos_T *old_pos)
|
||||
pos = NULL;
|
||||
}
|
||||
while (n > 0) {
|
||||
for (;;) {
|
||||
while (true) {
|
||||
if ((findc == '{' ? dec_cursor() : inc_cursor()) < 0) {
|
||||
// if not found anything, that's an error
|
||||
if (pos == NULL) {
|
||||
@@ -4310,7 +4310,7 @@ static void nv_brackets(cmdarg_T *cap)
|
||||
fm = prev_fm;
|
||||
}
|
||||
MarkMove flags = kMarkContext;
|
||||
flags |= cap->nchar == '\'' ? kMarkBeginLine: 0;
|
||||
flags |= cap->nchar == '\'' ? kMarkBeginLine : 0;
|
||||
nv_mark_move_to(cap, flags, fm);
|
||||
} else if (cap->nchar >= K_RIGHTRELEASE && cap->nchar <= K_LEFTMOUSE) {
|
||||
// [ or ] followed by a middle mouse click: put selected text with
|
||||
|
Reference in New Issue
Block a user