edit: end_insert in check_auto_format() is bool

This commit is contained in:
Jan Edmund Lazo 2018-08-07 13:20:12 -04:00
parent a2eff8f15c
commit 0e4a54a17b

View File

@ -5703,8 +5703,8 @@ auto_format (
pos = curwin->w_cursor; pos = curwin->w_cursor;
old = get_cursor_line_ptr(); old = get_cursor_line_ptr();
/* may remove added space */ // may remove added space
check_auto_format(FALSE); check_auto_format(false);
/* Don't format in Insert mode when the cursor is on a trailing blank, the /* 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 * user might insert normal text next. Also skip formatting when "1" is
@ -5775,7 +5775,7 @@ auto_format (
did_add_space = true; did_add_space = true;
} else { } else {
// may remove added space // 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 * delete it now. The space must be under the cursor, just after the insert
* position. * position.
*/ */
static void static void check_auto_format(
check_auto_format ( bool end_insert // true when ending Insert mode
int end_insert /* TRUE when ending Insert mode */
) )
{ {
int c = ' '; int c = ' ';
@ -6034,8 +6033,8 @@ stop_insert (
} }
} }
/* If a space was inserted for auto-formatting, remove it now. */ // If a space was inserted for auto-formatting, remove it now.
check_auto_format(TRUE); check_auto_format(true);
/* If we just did an auto-indent, remove the white space from the end /* If we just did an auto-indent, remove the white space from the end
* of the line, and put the cursor back. * of the line, and put the cursor back.