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/textobject.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/textobject.c')
-rw-r--r-- | src/nvim/textobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c index 6683fbe8f4..428b14a68d 100644 --- a/src/nvim/textobject.c +++ b/src/nvim/textobject.c @@ -104,7 +104,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 + while (true) { // 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) { @@ -540,7 +540,7 @@ static void back_in_line(void) int sclass; // starting class sclass = cls(); - for (;;) { + while (true) { if (curwin->w_cursor.col == 0) { // stop at start of line break; } @@ -1062,7 +1062,7 @@ static bool in_html_tag(bool end_tag) } // check that the matching '>' is not preceded by '/' - for (;;) { + while (true) { if (inc(&pos) < 0) { return false; } @@ -1304,7 +1304,7 @@ extend: start_lnum -= dir; break; } - for (;;) { + while (true) { if (start_lnum == (dir == BACKWARD ? 1 : curbuf->b_ml.ml_line_count)) { break; @@ -1431,7 +1431,7 @@ extend: /// @return column number of "quotechar" or -1 when not found. static int find_next_quote(char *line, int col, int quotechar, char *escape) { - for (;;) { + while (true) { int c = (uint8_t)line[col]; if (c == NUL) { return -1; @@ -1605,7 +1605,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 (;;) { + while (true) { // Find open quote character. col_start = find_next_quote(line, col_start, quotechar, NULL); if (col_start < 0 || col_start > first_col) { |