diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-26 23:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 23:23:44 +0200 |
commit | 3b0df1780e2c8526bda5dead18ee7cc45925caba (patch) | |
tree | c8415dc986f1cd3ddf6044b4ec0318a089db3ed7 /src/nvim/normal.c | |
parent | 7d0479c55810af9bf9f115ba69d1419ea81ec41e (diff) | |
download | rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.gz rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.bz2 rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.zip |
refactor: uncrustify
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 635d177ecc..da693371f3 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -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 |