diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-07 13:20:12 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-07 13:20:46 -0400 |
commit | 0e4a54a17b92545ce8c4d4ac0212a424bbe990ca (patch) | |
tree | 45148609ae8b230e1f901e36a0701f0ab735b72b | |
parent | a2eff8f15c277795604f03ff0ba5cce71ffde7ec (diff) | |
download | rneovim-0e4a54a17b92545ce8c4d4ac0212a424bbe990ca.tar.gz rneovim-0e4a54a17b92545ce8c4d4ac0212a424bbe990ca.tar.bz2 rneovim-0e4a54a17b92545ce8c4d4ac0212a424bbe990ca.zip |
edit: end_insert in check_auto_format() is bool
-rw-r--r-- | src/nvim/edit.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 846ff70bd0..6b131fdb43 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -5703,8 +5703,8 @@ auto_format ( pos = curwin->w_cursor; old = get_cursor_line_ptr(); - /* may remove added space */ - check_auto_format(FALSE); + // may remove added space + check_auto_format(false); /* Don't format in Insert mode when the cursor is on a trailing blank, the * user might insert normal text next. Also skip formatting when "1" is @@ -5775,7 +5775,7 @@ auto_format ( did_add_space = true; } else { // may remove added space - check_auto_format(FALSE); + check_auto_format(false); } } @@ -5787,9 +5787,8 @@ auto_format ( * delete it now. The space must be under the cursor, just after the insert * position. */ -static void -check_auto_format ( - int end_insert /* TRUE when ending Insert mode */ +static void check_auto_format( + bool end_insert // true when ending Insert mode ) { int c = ' '; @@ -6034,8 +6033,8 @@ stop_insert ( } } - /* If a space was inserted for auto-formatting, remove it now. */ - check_auto_format(TRUE); + // If a space was inserted for auto-formatting, remove it now. + check_auto_format(true); /* If we just did an auto-indent, remove the white space from the end * of the line, and put the cursor back. |