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/usercmd.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/usercmd.c')
-rw-r--r-- | src/nvim/usercmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c index 0aacc73529..b18318b5ff 100644 --- a/src/nvim/usercmd.c +++ b/src/nvim/usercmd.c @@ -139,7 +139,7 @@ char *find_ucmd(exarg_T *eap, char *p, int *full, expand_T *xp, int *complp) // Look for buffer-local user commands first, then global ones. gap = &prevwin_curwin()->w_buffer->b_ucmds; - for (;;) { + while (true) { for (j = 0; j < gap->ga_len; j++) { uc = USER_CMD_GA(gap, j); cp = eap->cmd; @@ -445,7 +445,7 @@ static void uc_list(char *name, size_t name_len) // In cmdwin, the alternative buffer should be used. const garray_T *gap = &prevwin_curwin()->w_buffer->b_ucmds; - for (;;) { + while (true) { for (i = 0; i < gap->ga_len; i++) { cmd = USER_CMD_GA(gap, i); a = cmd->uc_argt; @@ -1066,7 +1066,7 @@ void ex_delcommand(exarg_T *eap) } gap = &curbuf->b_ucmds; - for (;;) { + while (true) { for (i = 0; i < gap->ga_len; i++) { cmd = USER_CMD_GA(gap, i); res = strcmp(arg, cmd->uc_name); @@ -1645,12 +1645,12 @@ int do_ucmd(exarg_T *eap, bool preview) // First round: "buf" is NULL, compute length, allocate "buf". // Second round: copy result into "buf". buf = NULL; - for (;;) { + while (true) { p = cmd->uc_rep; // source q = buf; // destination totlen = 0; - for (;;) { + while (true) { start = vim_strchr(p, '<'); if (start != NULL) { end = vim_strchr(start + 1, '>'); |