aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-30 03:57:24 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-30 05:13:06 -0400
commit0e7048ae0558e457d37ce2d13dc5f1f9e62deb49 (patch)
tree7b892b17acbcac5e8298b641e336ee7de05647dd /src/nvim/undo.c
parentc3edbf813a2a67d5d0889ff1420407dfb78847cb (diff)
downloadrneovim-0e7048ae0558e457d37ce2d13dc5f1f9e62deb49.tar.gz
rneovim-0e7048ae0558e457d37ce2d13dc5f1f9e62deb49.tar.bz2
rneovim-0e7048ae0558e457d37ce2d13dc5f1f9e62deb49.zip
lint
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index f5ee0ece8d..10996d99d5 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2151,7 +2151,7 @@ static void u_undoredo(int undo, bool do_buf_event)
int new_flags;
fmark_T namedm[NMARKS];
visualinfo_T visualinfo;
- int empty_buffer; /* buffer became empty */
+ bool empty_buffer; // buffer became empty
u_header_T *curhead = curbuf->b_u_curhead;
/* Don't want autocommands using the undo structures here, they are
@@ -2218,7 +2218,7 @@ static void u_undoredo(int undo, bool do_buf_event)
}
}
- empty_buffer = FALSE;
+ empty_buffer = false;
/* delete the lines between top and bot and save them in newarray */
if (oldsize > 0) {
@@ -2229,9 +2229,10 @@ static void u_undoredo(int undo, bool do_buf_event)
newarray[i] = u_save_line(lnum);
/* remember we deleted the last line in the buffer, and a
* dummy empty line will be inserted */
- if (curbuf->b_ml.ml_line_count == 1)
- empty_buffer = TRUE;
- ml_delete(lnum, FALSE);
+ if (curbuf->b_ml.ml_line_count == 1) {
+ empty_buffer = true;
+ }
+ ml_delete(lnum, false);
}
} else
newarray = NULL;
@@ -2246,7 +2247,7 @@ static void u_undoredo(int undo, bool do_buf_event)
if (empty_buffer && lnum == 0) {
ml_replace((linenr_T)1, uep->ue_array[i], true);
} else {
- ml_append(lnum, uep->ue_array[i], (colnr_T)0, FALSE);
+ ml_append(lnum, uep->ue_array[i], (colnr_T)0, false);
}
xfree(uep->ue_array[i]);
}