diff options
author | Dundar Göc <gocdundar@gmail.com> | 2021-08-03 11:04:43 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-08-12 10:37:40 +0200 |
commit | c0767bd4f3ce7b34bb77da0657c49ba10ba1b32e (patch) | |
tree | 485cf37c24193992d9eea6def2c7d0ab2fee7b4d /src/nvim/undo.c | |
parent | 7d2233fad007a3dd42481f8ffc01e69b57a17f9e (diff) | |
download | rneovim-c0767bd4f3ce7b34bb77da0657c49ba10ba1b32e.tar.gz rneovim-c0767bd4f3ce7b34bb77da0657c49ba10ba1b32e.tar.bz2 rneovim-c0767bd4f3ce7b34bb77da0657c49ba10ba1b32e.zip |
refactor: replace TRUE/FALSE with true/false
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 3096fe84c0..c4b48a6ee2 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1297,8 +1297,8 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf, goto theend; } - /* Undo must be synced. */ - u_sync(TRUE); + // Undo must be synced. + u_sync(true); /* * Write the header. @@ -1783,7 +1783,7 @@ void u_undo(int count) * be compatible. */ if (curbuf->b_u_synced == false) { - u_sync(TRUE); + u_sync(true); count = 1; } @@ -1943,9 +1943,10 @@ void undo_time(long step, bool sec, bool file, bool absolute) bool above = false; bool did_undo = true; - /* First make sure the current undoable change is synced. */ - if (curbuf->b_u_synced == false) - u_sync(TRUE); + // First make sure the current undoable change is synced. + if (curbuf->b_u_synced == false) { + u_sync(true); + } u_newcount = 0; u_oldcount = 0; @@ -2601,13 +2602,10 @@ static void u_undo_end( msgbuf); } -/* - * u_sync: stop adding to the current entry list - */ -void -u_sync( - int force // Also sync when no_u_sync is set. -) +/// u_sync: stop adding to the current entry list +/// +/// @param force if true, also sync when no_u_sync is set. +void u_sync(bool force) { // Skip it when already synced or syncing is disabled. if (curbuf->b_u_synced || (!force && no_u_sync > 0)) { |