aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-26 23:23:44 +0200
committerGitHub <noreply@github.com>2023-04-26 23:23:44 +0200
commit3b0df1780e2c8526bda5dead18ee7cc45925caba (patch)
treec8415dc986f1cd3ddf6044b4ec0318a089db3ed7 /src/nvim/edit.c
parent7d0479c55810af9bf9f115ba69d1419ea81ec41e (diff)
downloadrneovim-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/edit.c')
-rw-r--r--src/nvim/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 9e4457f793..0fb1102f4f 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -1858,7 +1858,7 @@ int get_literal(bool no_simplify)
no_mapping++; // don't map the next key hits
cc = 0;
i = 0;
- for (;;) {
+ while (true) {
nc = plain_vgetc();
if (!no_simplify) {
nc = merge_modifiers(nc, &mod_mask);
@@ -2356,7 +2356,7 @@ static void stop_insert(pos_T *end_insert_pos, int esc, int nomove)
curwin->w_cursor = *end_insert_pos;
check_cursor_col(); // make sure it is not past the line
- for (;;) {
+ while (true) {
if (gchar_cursor() == NUL && curwin->w_cursor.col > 0) {
curwin->w_cursor.col--;
}
@@ -2505,7 +2505,7 @@ int oneleft(void)
// We might get stuck on 'showbreak', skip over it.
width = 1;
- for (;;) {
+ while (true) {
coladvance(v - width);
// getviscol() is slow, skip it when 'showbreak' is empty,
// 'breakindent' is not set and there are no multi-byte
@@ -2886,7 +2886,7 @@ static void mb_replace_pop_ins(int cc)
}
// Handle composing chars.
- for (;;) {
+ while (true) {
int c = replace_pop();
if (c == -1) { // stack empty
break;