diff options
-rw-r--r-- | src/nvim/getchar.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index c5bb04609b..df185f1a5b 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -734,9 +734,10 @@ int start_redo(long count, bool old_redo) { int c; - /* init the pointers; return if nothing to redo */ - if (read_redo(true, old_redo) == FAIL) + // init the pointers; return if nothing to redo + if (read_redo(true, old_redo) == FAIL) { return FAIL; + } c = read_redo(false, old_redo); @@ -761,17 +762,18 @@ int start_redo(long count, bool old_redo) if (c == 'v') { /* redo Visual */ VIsual = curwin->w_cursor; - VIsual_active = TRUE; - VIsual_select = FALSE; - VIsual_reselect = TRUE; - redo_VIsual_busy = TRUE; + VIsual_active = true; + VIsual_select = false; + VIsual_reselect = true; + redo_VIsual_busy = true; c = read_redo(false, old_redo); } - /* try to enter the count (in place of a previous count) */ + // try to enter the count (in place of a previous count) if (count) { - while (ascii_isdigit(c)) /* skip "old" count */ + while (ascii_isdigit(c)) { // skip "old" count c = read_redo(false, old_redo); + } add_num_buff(&readbuf2, count); } @@ -790,11 +792,12 @@ int start_redo_ins(void) { int c; - if (read_redo(true, false) == FAIL) + if (read_redo(true, false) == FAIL) { return FAIL; + } start_stuff(); - /* skip the count and the command character */ + // skip the count and the command character while ((c = read_redo(false, false)) != NUL) { if (vim_strchr((char_u *)"AaIiRrOo", c) != NULL) { if (c == 'O' || c == 'o') { @@ -804,9 +807,9 @@ int start_redo_ins(void) } } - /* copy the typed text from the redo buffer into the stuff buffer */ + // copy the typed text from the redo buffer into the stuff buffer copy_redo(false); - block_redo = TRUE; + block_redo = true; return OK; } |